Commit Graph
5140 Commits
Author SHA1 Message Date
Catherine 2622bbfcda WASI: fix thread presence detection. 2026-05-10 13:49:45 +01:00
gatecat 9cb5fc6428 static: Use centroid as position
Signed-off-by: gatecat <[email protected]>
2026-05-06 12:32:24 +02:00
gatecat 516f6874a6 static: Compute a 'dense' placement grid to avoid excess dark nodes
Signed-off-by: gatecat <[email protected]>
2026-05-06 11:55:36 +02:00
gatecat ec87cdcc80 xilinx: Better model how LUTs pack for static
Signed-off-by: gatecat <[email protected]>
2026-05-06 11:27:52 +02:00
gatecat fc18d9c1e8 xilinx: Tweaks to static config
Signed-off-by: gatecat <[email protected]>
2026-05-06 11:19:25 +02:00
gatecat c4cbc3ff88 static: Log legalisation displacement per group
Signed-off-by: gatecat <[email protected]>
2026-05-06 08:29:47 +02:00
gatecat 6fffc4d2c7 static: Fix offset when aligning macros
Signed-off-by: gatecat <[email protected]>
2026-05-06 07:59:27 +02:00
gatecat 946faea376 static: Fallback termination criteria for tricky cases
Signed-off-by: gatecat <[email protected]>
2026-05-05 15:44:20 +02:00
gatecat 272b1097d0 static: Fix handling of heterogeneous macros
Signed-off-by: gatecat <[email protected]>
2026-05-05 15:29:38 +02:00
gatecat 91ecaa6ad6 gatemate: Enable static placer as an option
Signed-off-by: gatecat <[email protected]>
2026-05-05 15:13:31 +02:00
gatecat ebd364bfee gui: Fix crash when pass throws error
Signed-off-by: gatecat <[email protected]>
2026-05-05 14:26:05 +02:00
gatecat 211cb5703c static: Consistent HPWL reporting with other placers
Signed-off-by: gatecat <[email protected]>
2026-05-04 18:12:09 +02:00
gatecat ca6a25e41e static: Fix exponent overflow on big designs
Signed-off-by: gatecat <[email protected]>
2026-05-04 18:12:09 +02:00
gatecat fcc80c5332 himbaechel: bounds check getBelByLocation
Signed-off-by: gatecat <[email protected]>
2026-05-04 13:38:04 +02:00
gatecat 92c392f5f5 heap: Fix updating of chain cells
Signed-off-by: gatecat <[email protected]>
2026-05-04 13:11:05 +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 42e248b99e gowin: Initial estimateDelay and ripup penalty (#1708)
Signed-off-by: gatecat <[email protected]>
2026-04-30 08:07:11 +02:00
Josef Gajdusek 0a8a848a72 Minor UX improvements to the generic example code (#1706)
* generic: Fix Python path not including the examples/ directory in the example

It seems that at some point, the embedded Python stopped including the
directory that nextpnr-generic was executed in inside of its sys.path.
This likely happened by de3d5be8 specifying an explicit argv to
the interpreter init function.

* generic: Improve the example for K != 4

Configuring K < 4 used to result in "dangling" inputs to the cells being
generated (those are just not driven by anything in the resulting Verilog/JSON).

Configuring K > 4 used to result in an assertion crash in cells.cc.

The ctx.setLutK call fixes both cases.
2026-04-28 13:08:44 +02:00
myrtle 3c29cc217e gatemate: Handle missing INIT on BRAMs (#1707)
Signed-off-by: gatecat <[email protected]>
2026-04-28 13:08:08 +02:00
gatecat 98c18d7f14 router2: Fix ripup of constant nets
Signed-off-by: gatecat <[email protected]>
2026-04-21 14:00:12 +02:00
myrtle ce08c3053c Remove unused --slack_redist_iter option (#1704)
Signed-off-by: gatecat <[email protected]>
2026-04-20 16:19:00 +02:00
gatecat d5e6bfc74e clangformat
Signed-off-by: gatecat <[email protected]>
2026-04-20 15:45:20 +02:00
gatecat f2e650223a xilinx: Routeability tuning
Signed-off-by: gatecat <[email protected]>
2026-04-20 15:44:45 +02:00
myrtle 2a84cc9c55 xilinx: Add LUT route-thru pips (#1703)
Signed-off-by: gatecat <[email protected]>
2026-04-20 11:47:38 +02:00
gatecat 68978f076f router2: Also write congestion-per-net in heatmap mode
Signed-off-by: gatecat <[email protected]>
2026-04-20 10:04:41 +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
gatecat 28fefe6172 xilinx: Allow loading post-place JSON for router dev
Signed-off-by: gatecat <[email protected]>
2026-04-17 10:47:04 +02:00
gatecat 0fa7ee0ce5 xilinx: Improve delay estimate
Signed-off-by: gatecat <[email protected]>
2026-04-17 10:20:32 +02:00
gatecat 7de80fbb9c ecp5: Fix placement of LUT permutation switchboxes
Signed-off-by: gatecat <[email protected]>
2026-04-15 14:41:04 +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
gatecat 4e9debe4e5 ecp5: Fix timing for DCU clock outputs
Signed-off-by: gatecat <[email protected]>
2026-04-15 09:24:33 +02:00
sylefeb e6ecd8fab4 gatemate: removing recursion in GateMateImpl::reassign_bridges (#1697)
* gatemate: removing recursion in GateMateImpl::reassign_bridges

* gatemate: improving comments in GateMateImpl:reassign_bridges

* gatemate: making naming more consistent, adding comments about the need for recursion removal
2026-04-12 09:13:48 +02:00
gatecat a3bccdd33d xilinx: Use clock router for MMCMs too
Signed-off-by: gatecat <[email protected]>
2026-04-09 14:22:06 +02:00
gatecat f99422dcad xilinx: Better use global clocking resources
Signed-off-by: gatecat <[email protected]>
2026-04-09 13:37:52 +02:00
Leo Moser ca74f47c3f Improvements to FABulous (#1692)
* fabulous: fix I0mux naming

Signed-off-by: Leo Moser <[email protected]>

* fabulous: pack more FF types: reset before enable

Signed-off-by: Leo Moser <[email protected]>

* fabulous: fix block tracking of FABULOUS_LC, improve debug messages, fix masking of 1

Signed-off-by: Leo Moser <[email protected]>

* fabulous: add 'corner' argument

Signed-off-by: Leo Moser <[email protected]>

---------

Signed-off-by: Leo Moser <[email protected]>
2026-04-09 11:38:36 +02:00
gatecat ae7843fbf0 ecp5: Fix case of one net driving multiple DCSs
Signed-off-by: gatecat <[email protected]>
2026-04-09 10:34:22 +02:00
sylefeb f688fc080c gatemate: adding missing iomanip header for std::setprecision (#1695) 2026-04-09 10:22:18 +02:00
myrtle 5d46a5eeea ice40: Hide IO and PLL that can't be used from utilisation report (#1694)
Signed-off-by: gatecat <[email protected]>
2026-04-08 14:28:53 +02:00
YRabbit 764c6a6696 Gowin. Implement CLKDIV. (#1691)
Add CLKDIV — a frequency divider with ratios of 1, 2, 3, 3.5, 4,
5, 6, 7, and 8.

A direct, non-switchable connection to CLKDIV2 makes placement more
difficult — we have to account for CLKDIV2’s occupancy for IOLOGIC and,
if necessary, duplicate the cell, as well as create clusters of CLKDIV
and CLKDIV2.

Signed-off-by: YRabbit <[email protected]>
2026-04-06 15:34:34 +02:00
Lunaphied 25482d990f nix: fix issue with latest apycula being needed and it not being in Nixpkgs stable (#1690)
* nix: fix issue with latest apycula being needed and it not being in Nixpkgs stable

* nix: we really should be using the latest version unless a regression happens tbh
2026-04-04 16:38:55 +02:00
myrtle 41032f9d77 cleanup: Remove dead files (#1688)
Signed-off-by: gatecat <[email protected]>
2026-04-03 09:41:32 +02:00
YRabbit c7da64d8c8 Gowin. Implement GW5A HCLK and CLKDIV2. (#1687)
* Gowin. Implement GW5A HCLK and CLKDIV2.

HCLK pins have been added for the GW5A series, and the placement of
CLKDIV2 primitives has been updated to account for the specific
characteristics of this chip series.

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

* Gowin. Fix style.

* Gowin. Fix style.

---------

Signed-off-by: YRabbit <[email protected]>
2026-04-03 09:40:45 +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
jdavidberger b8c350b3e4 Update pack.cc (#1685)
This fixes a memory issue. When you assign to base_iodelay_rules from itself, the LHS when you do `base_iodelay_rules[id_DELAYA] = base_iodelay_rules[id_DELAYB]`, can cause a heap allocation which possibly invalidates the memory of the RHS. 

This was found while running nextpnr under ASAN. It might be useful to add testing under libasan into CI.
2026-04-02 20:53:07 +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
jdavidberger 12bb6df237 Update archdefs.h (#1684)
Fix typo in != operator
2026-04-01 19:17:04 +02:00
myrtle 10c5997007 xilinx: Improve LUT/CARRY->FF packing (#1683)
Signed-off-by: gatecat <[email protected]>
2026-04-01 11:22:00 +02:00
Balint Cristian 497d685139 xilinx: Use proper xray-db device family subfolder (#1680) 2026-04-01 11:10:07 +02:00