Commit Graph
155 Commits
Author SHA1 Message Date
gatecat 073bb87efb clangformat
Signed-off-by: gatecat <[email protected]>
2026-09-28 13:22:17 +02:00
gatecat 3edea68ef3 Tidy up pin constraint handling for singleton vectors
Signed-off-by: gatecat <[email protected]>
2026-09-21 10:01:14 +02:00
Lofty 3e53a0bf44 Merge pull request #1801 from FelipeCalliari/fix-related-clock-delay-sign
timing: Fix sign of related clock-to-clock delay
2026-09-17 11:19:21 +01:00
Simon Richter 813d876d02 Fix build on GNU Hurd
Hurd has /proc/self/exe like Linux, so the same mechanism as for Linux
works here.

Because Hurd does not have a path length limit, PATH_MAX is not defined.

Technically, we'd have to allocate a buffer, check whether the returned
size is greater or equal to the buffer size (so the path was truncated),
and then retry with a larger buffer to handle excessively long paths on
Hurd, but in practice there is no NixOS on Hurd and the path is only used
to find Himbächel chipdb files in the absence of an explicit setting, so we
should be safe in assuming the path name will be less than 4kB.

Many thanks to Lofty for doing most of the research here.

Fixes: https://github.com/YosysHQ/nextpnr/issues/1797
2026-09-16 16:38:32 +02:00
Felipe Calliari f5164be536 timing: Fix sign of related clock-to-clock delay
identify_related_domains() stored D(c2) - D(c1) for the pair (c1, c2),
where D is the delay from the common driver to each clock. The pair is
looked up as (launch, capture) and the value is added to the path delay,
so a late launch clock made paths shorter and a late capture clock made
them longer. This is the opposite of what happens physically: hold
violations were reported on paths with extra hold margin and missed on
the ones at risk, and setup slack and cross-domain Fmax were mirrored
the same way.

Store D(c1) - D(c2) instead, which fixes all users of clock_delays
(setup/hold slack, hold violations, cross-domain Fmax and the clk-to-clk
report segment).
2026-09-13 01:50:15 -03:00
gatecat a601751d08 Remove long-unimplemented function and associated dead code
Signed-off-by: gatecat <[email protected]>
2026-09-10 10:38:03 +02:00
gatecat 7d4f72c0aa clangformat
Signed-off-by: gatecat <[email protected]>
2026-08-26 09:45:26 +02:00
gatecat 7c0c1c4019 python: bind getWireDelay
Signed-off-by: gatecat <[email protected]>
2026-08-20 16:33:50 +02:00
Catherine de8cd9782f Accept UTF-8 filenames and terminal I/O on Windows. 2026-08-06 17:49:16 +02:00
gatecat d324239345 xilinx: clean up some compiler warnings
Signed-off-by: gatecat <[email protected]>
2026-08-04 10:51:04 +02:00
gatecat 049f38659a util: Replace use of strcasecmp in boolstr_or_default
Signed-off-by: gatecat <[email protected]>
2026-08-04 10:47:56 +02:00
gatecat 0d4fffae10 Fix BaseArch::archId()
Fixes #1761

Signed-off-by: gatecat <[email protected]>
2026-08-04 10:41:12 +02:00
gatecat fc9e96a6e6 python: Fix binding for getNetinfoRouteDelay
Fixes #1744

Signed-off-by: gatecat <[email protected]>
2026-07-12 11:39:41 +02:00
gatecat 2b560ad0cc clangformat
Signed-off-by: gatecat <[email protected]>
2026-06-19 09:13:08 +02:00
William D. Jones 3a3b273f06 Explicitly use ANSI versions of Windows functions, due to changes in Qt6 Unicode behavior. (#1727) 2026-05-22 16:21:51 +02:00
Michael OffelandMiO 2894e53934 fix visual studio build (#1722)
* fix visual studio build
add natural share path after build on visual studio

* fix cmake syntax

---------

Co-authored-by: MiO <[email protected]>
2026-05-15 10:27:07 +02:00
Catherine ec1b3fde8f Merge pull request #1711 from YosysHQ/cat/wasm-exception-cleanup
Remove Wasm exception handling workarounds
2026-05-01 13:34:28 +01:00
Catherine 1407b33558 Ensure only non-truncating values are returned from main().
POSIX allows any `int` value to be returned but specifies that only
the low 8 bits are available in some contexts:
  https://pubs.opengroup.org/onlinepubs/9699919799/functions/_exit.html

For reasons that aren't entirely clear, WASI requires the value to be
in range [0;126), and this is enforced with an assertion at runtime
level in Wasmtime. This should probably be fixed in Wasmtime but until
it is done there doesn't seem to be any harm in returning `125` instead
of `-1`. This also removes any discrepancy due to truncation.
2026-05-01 11:22:38 +00:00
Catherine 6cf255cc2b Remove Wasm exception handling workarounds. 2026-05-01 11:08:43 +00:00
myrtle ce08c3053c Remove unused --slack_redist_iter option (#1704)
Signed-off-by: gatecat <[email protected]>
2026-04-20 16:19:00 +02:00
mrcmry 33e1c9033b Improve file open error messages (#1700)
Define open_(o|i)fstream_and_log_error in log.h to:
- quote 'filename'
- add error cause to easier troubleshoot
- use existing consistent string style
- easily allows OS specific message

Introduce it when file are opened and add it where error message
was missing.
2026-04-19 16:41:47 +02:00
Lunaphied 8db8311103 remove scopedlock (#1698)
* common/kernel: removed ScopedLock type in favor of C++11 lock_guard

* fix unlock_early() usages
2026-04-15 09:30:42 +02:00
myrtle 41032f9d77 cleanup: Remove dead files (#1688)
Signed-off-by: gatecat <[email protected]>
2026-04-03 09:41:32 +02:00
Lunaphied d6b4d3ed3d common: fix missing header in array2d.h (#1686)
This trips up my LSP and is technically wrong.
2026-04-02 21:37:20 +02:00
myrtle c6b876fc85 control set awareness in the HeAP legaliser (#1678)
* xilinx: Index control sets

Signed-off-by: gatecat <[email protected]>

* heap: data structure for control sets

Signed-off-by: gatecat <[email protected]>

* heap: fail faster on control set mismatch

Signed-off-by: gatecat <[email protected]>

* xilinx: Reduce control set search radius

Signed-off-by: gatecat <[email protected]>

* Fix compiler warning

Signed-off-by: gatecat <[email protected]>

* heap: Allow disabling control set awareness for comparison/debug

Signed-off-by: gatecat <[email protected]>

* heap: Add some notes about control sets

Signed-off-by: gatecat <[email protected]>

* heap: Fix typo and regression

Signed-off-by: gatecat <[email protected]>

* heap: Add a schedule for ctrlset search radius

Signed-off-by: gatecat <[email protected]>

* heap: Tidy up

Signed-off-by: gatecat <[email protected]>

---------

Signed-off-by: gatecat <[email protected]>
2026-04-02 13:36:50 +02:00
mrcmry 4f5db1f7b9 gui: fix segfault when providing --sdc (#1682) 2026-04-01 11:09:00 +02:00
myrtle 2b4deb4313 timing: Fix critical path report with async resets (#1648)
Signed-off-by: gatecat <[email protected]>
2026-02-25 14:21:25 +01:00
Miodrag MilanovićandLofty b8a6559a3f gatemate: add CP lines as clock and general routing [sc-184] (#1638)
* gatemate: add alternate clock routes

* use additional pins

* Fix clock router and timings

* Fix DDR nets

* Test passtrough concept

* remove not used variable

* wip

* handle pip masks

* Cleanup

* create CPE_CPLINES cells and set properties on them

* Fix pip masking

* rough code to break cplines into subnets

* add ports to cell

* mux bridges need cell bel pins too

* fix multiplier output register packing

* remove empty if

* Fix ODDR

* Add options to disable some pips

* Use resources info

* mask field to resource field

* produce valid netlist with propagation netlist at least

* adapt reassign_cplines for internal resource pips

* Handle block and resources

* fix formatting

* It is required to set all mandatory properties now

* arch API for resources

* current progress

* Add option to skip bridges

* perform per-wire resource congestion costing

* Added no-cpe-cp option

* resource bugfix

* comment out spammy debug message

* Fix routing conflicts issues

* allow only some pass trough for clock router

* handle inversion bits for pass signals

* verify inversion before/after assigning bridges

* we care only if there is net

* Revert "we care only if there is net"

This reverts commit 3da2769e31.

* Revert "verify inversion before/after assigning bridges"

This reverts commit 8613ee17c8.

* chipdb version bump

* clangformat

* cleanup

* cleanup

* Initial conversion to GroupId

* Keep group info in pip extra

* Cleanup headers

* Initialize resource efficiently

* Addressing review comments

* improve resource docs

* Make CP lines not use as clocks as default

---------

Co-authored-by: Lofty <[email protected]>
2026-02-25 08:22:16 +01:00
Miodrag Milanović a530283600 Cleanup Context API (#1593)
* Cleanup Context API

* Remove exit to prvent crash
2025-10-23 14:44:14 +02:00
myrtle c7cfb0aa4b Remove use of boost system and filesystem (#1591)
Signed-off-by: gatecat <[email protected]>
2025-10-22 15:01:21 +02:00
Miodrag Milanovic d796cc720b clangformat 2025-08-22 11:08:39 +02:00
Lofty 0ad43e6ec7 gatemate: remove placement density restriction (#1527) 2025-08-08 17:02:56 +02:00
Miodrag Milanovic 0ebd7afab9 clangformat 2025-07-07 10:15:50 +02:00
gatecat ff695f26d5 sdc: Fix EOF handling during string parse
Fixes #1490

Signed-off-by: gatecat <[email protected]>
2025-06-25 11:58:11 +02:00
Frans Skarman 0c86a218fd Add sources to detailed timing report (#1502) 2025-06-25 11:39:25 +02:00
gatecat 226a2dfdb4 clangformat
Signed-off-by: gatecat <[email protected]>
2025-05-20 13:19:52 +02:00
William D. Jones b127fa9c11 bba: fix #embed on Windows. 2025-05-14 05:38:30 +01:00
Lofty 661f76d51a Add arch API function for pip inversion (#1457) 2025-02-27 12:21:15 +01:00
Catherine 77187613e3 kernel: look up ports when applying clock constraints. (#1448)
prjunnamed does not emit a net alias for toplevel ports. This works
fine for constraining IOs but breaks clock constraints. This commit
expands clock constraint application code to look up net aliases first,
ports second.
2025-01-31 08:30:39 +00:00
Catherine cd7f7c12f1 CMake: refactor architecture-specific build system parts.
Two user-visible changes were made:
* `-DUSE_RUST` is replaced with `-DBUILD_RUST`, by analogy with
  `-DBUILD_PYTHON`
* `-DCOVERAGE` was removed as it doesn't work with either modern GCC
  or Clang
2025-01-21 17:13:03 +00:00
Catherine 43b2f38520 CMake: use imported target for pybind11.
This accounts for the use of either the system or the vendored pybind11.

Fixes #1428.
2025-01-21 15:05:57 +00:00
Catherine 155adc3f5d CMake: rationalize and refactor build system.
The two main changes, done together in this commit, are:
* Eliminating most instances of `aux_source_directory()`, replacing
  them with explicit file listings; and
* Moving these file listings into respective subdirectories by
  representing respective nextpnr components as interface libraries.

In addition, the GUI CMake script tree was simplified since it had
a lot of unused/redundant code.

The `aux_source_directory()` command is not recommended for use by
CMake itself because it misses dependency changes when adding/removing
files, and consequently causes build failures requiring a clean rebuild.

This commit does not touch anything related to architectures/families,
which are very complex and redundant all on their own.
2025-01-16 11:36:44 +01:00
Catherine 5fe680390f Various fixes for clang/libc++ build (#1415)
* Gowin: add header includes required on libstdc++.

* kernel: fix incorrect printf-style format.

* himbaechel: add missing `override` qualifiers.

* Gowin: remove unnecessary `std::move`.

These calls inhibit RVO, a stronger optimization than moving an object.
2025-01-12 08:11:33 +01:00
Tarik Graba f01465f628 Add attributes to the hierarchical cells (#1405)
* Adds attributes to the hierarchical cells

* python: add binding for hierarchical cells attributes

* frontend/base: import hierarchical cells attributes
2024-12-17 11:30:39 +01:00
Miodrag Milanović d810aac867 Add GroupId related calls to Himbaechel API (#1399)
* Add GroupId related calls to Himbaechel API

* Example uarch using new API features

* Update drawGroup to propagate only GroupId
2024-12-05 13:59:33 +01:00
Miodrag Milanović 0e69425794 Add expandBoundingBox method to API (#1395)
* Add expandBoundingBox method to API

* Update API documentation
2024-11-26 10:13:41 +01:00
Meinhard Kissich cf42baa43b Fix RNG seed initialization (#1383) 2024-10-09 18:25:02 +02:00
Pepijn de Vos 028be1462a apicula: add support for magic sip pins (#1370)
* apicula: add support for magic sip pins

* fix nullptr check

* DDR fix by xiwang

* WIP support for setting the iostd

* add iostd
2024-10-09 15:16:36 +02:00
Rowan Goemans 0e5b1348e6 timing_log: Handle potentially missing net when reporting crit path (#1381) 2024-10-04 08:07:55 +02:00
Adrien Prost-Boucle b3b2392893 clang-format on basectx.h 2024-10-01 15:24:40 +02:00