Commit Graph

110 Commits

Author SHA1 Message Date
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
sylefeb f688fc080c
gatemate: adding missing iomanip header for std::setprecision (#1695) 2026-04-09 10:22:18 +02:00
Miodrag Milanovic 2ace82d9ce gatemate: force chipdb bump 2026-03-18 13:14:56 +01:00
myrtle e953c250a4
himbaechel: Add getDefaultRouter, default to router2 for gatemate (#1649)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-25 16:16:36 +01:00
Miodrag Milanović b0d6b97936
gatemate: floorplanning [sc-168] (#1607)
* gatemate: add CCF floorplanning parser

* apply constraints

* cleanup

* print detected region and error if not found

* Add wildcard matching

* Validate placebox and use official coordinate system

* Fix some messages
2026-02-25 10:05:36 +01:00
mrcmry 0c970d6891
gatemate: improve --help and error messages (#1639)
* gatemate: improve mode arg error message

* gatemate: fix initial capitals and periods in log_*() messages

* gatemate: replace operation -> performance for mode in help and log_*()

This is the term used both in the datasheet and the primitive library PDF.
2026-02-25 09:39:05 +01:00
Miodrag Milanović a60fdbb9a2
gatemate: initial support for MX4b (#1624) 2026-02-25 08:47:27 +01:00
Miodrag Milanović 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 <dan.ravensloft@gmail.com>
2026-02-25 08:22:16 +01:00
Miodrag Milanovic 1c099cfca1 clangformat 2026-01-23 09:35:51 +01:00
Patrick Urban 25c81e3a3e
gatemate: fix block RAM ECC status signal wiring and delay annotation (#1629)
* gatemate: fix ECC CPE connection

* gatemate: fix typos

* gatemate: add ECC signals to `ram_signal_clk` dictionary

* gatemate: allow switching between NOECC and ECC block RAM delays
2026-01-23 09:34:57 +01:00
Miodrag Milanović 7bd1336f88
gatemate: RAMIO packing optimization (#1602)
* gatemate: RAMIO packing optimization

* Disable packing DFF in RAMIO
2025-12-23 09:03:06 +01:00
Miodrag Milanović c30f810ee0
gatemate: Add LUT permutation support (#1619)
Adds LUT permutation support
2025-12-22 15:10:53 +01:00
Miodrag Milanović 210e6c8158
gatemate: add missing MULT timing path (#1618) 2025-12-17 11:53:10 +01:00
Lofty 12342a60e6
gatemate: fix output register packing (#1608) 2025-12-12 08:52:26 +01:00
Lofty cfa5f77dd9
gatemate: pack multiplier output registers (#1603)
* small cleanup

* gatemate: pack output flops for multipliers

* remove possibly-inaccurate comments
2025-11-24 15:35:18 +00:00
Miodrag Milanovic 69facd7c9a Bump gatemate chip database 2025-11-10 12:05:33 +01:00
Patrick Urban 30669eca60
gatemate: fix SERDES CDR parameters (#1596) 2025-10-28 09:49:55 +01:00
tgingold 35629d0a43
gatemate: handle default parameters for IO (#1595)
* gatemate: handle default parameters for IO

This is probably a VHDL specific issue.  In VHDL, there is no
black-box. Primitive instantiations are done using VHDL component
instantiations and the component must have been declared with all its
ports and parameters (generic).  Currently the components are
translated from cells_sim.v and cells_bb.v

If a user doesn't override a parameter, the default value is used
instead.  As a consequence, nextpnr can have 'UNDEFINED' for DRIVER
or SLEW parameters of CC_IOBUF.  I think this is a main difference
with verilog, where unspecified parameters do not appear.

With this change, the UNPLACED value of PIN_NAME and UNDEFINED value
of DRIVE are simply ignored.

* gatemate/pack_io.cc: also handle UNDEFINED for id_SLEW
2025-10-28 08:16:02 +01:00
Miodrag Milanović 9ccd132437
himbaechel: add uarch specific options parsing (#1582)
* himbaechel: add uarch specific options parsing

* fix tests

* add reference to additional help

* review comments addressed

* cleanup and unify other uarch

* Adressed PR comments
2025-10-21 14:41:53 +02:00
Miodrag Milanović c6f408dfa7
gatemate: additional region handling (#1583)
* gatemate: Use GATEMATE_DIE attribute to select placement die

* add DIE parameter in CCF

* add penalty delay when crossing between dies

* Add predictDelay
2025-10-21 13:47:07 +02:00
Miodrag Milanović 924f3a50ab
gatemate: properly name timing and operational mode (#1587) 2025-10-21 13:46:34 +02:00
Miodrag Milanovic 9d7e1d0ad1 gatemate: bump chipdb to 1.9 2025-10-17 11:57:53 +02:00
Miodrag Milanović f19a67122f
gatemate: document clock distribution strategies (#1580)
* gatemate: document clock distribution strategies

* gatemate: rename option to strategy
2025-10-16 10:54:55 +02:00
Miodrag Milanović 36045543c7
gatemate: support multiple clock distribution strategies (#1574)
* gatemate: support multiple clock distribution strategies

* error out on non supported cases

* Implement full use strategy

* Address review comments
2025-10-15 15:33:21 +02:00
Miodrag Milanović ad76625d4d
gatemate: respect keep attribute and prevent crash with BEL set (#1566) 2025-10-02 11:27:44 +02:00
Miodrag Milanović abb52f81c2
gatemate: cleanup of PLL and BUFG (#1562)
* Check SER_CLK more

* Use connectPorts

* move rewire code

* Move data structures

* move placement decision for later

* cleanups

* find working layout

* clangformat

* Inverted input on ODDR

* Fix some tests

* Copy clocks for multi die

* cleanup

* reporting

* bugfix

* handle PLL special inputs

* Fix user globals

* Proper DDR per bank and cleanup

* Add extra data for die regions and create them

* Better forced_die implementation

* Copy region to newly generated cells, and update when constrained

* Update PLL error messages

* Add TODO comment
2025-09-30 13:00:02 +02:00
Miodrag Milanović 8381827fa5
gatemate: Include and use connection timing data (#1559)
* convert nodes to pips

* add plane info for node pips

* a few multiplier router fixes

* do not need node delay

* add pip delays

* cleanup

* tried fixing clock router

* add PLL delays

* fix clock routing

* Do not use actual pip delay, determine best by number of passed pips

* optimize

* proper parameter check

* more multiplier fixes

* another mult fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* another multiplier fix

* log number of clock net users

* Revert "Do not use actual pip delay, determine best by number of passed pips"

This reverts commit c66e422dd0.

We want to guarantee minimum clock skew, so we need pip delay.

* route clocks from source to sink

* add time spent to route_clock

* weakly-bind non-global clocks

* clangformat

* remove dead code

* Require version 1.8

* change to assert

* add revisits in clock router

---------

Co-authored-by: Lofty <dan.ravensloft@gmail.com>
2025-09-30 09:13:29 +02:00
Patrick Urban 00cf81e463
gatemate: fix static and handle dynamic FIFO almost full/empty offsets (#1555)
* gatemate/pack_bram: fix CC_FIFO_40K almost full/empty parameters

* gatemate/pack_bram: fifo read/write pointers are 16 bit wide

* gatemate/pack_bram: handle dynamic almost full/empty offsets
2025-09-12 15:02:28 +02:00
Miodrag Milanovic b8d2372019 gatemate: BUFG must be optional 2025-09-10 14:42:47 +02:00
Miodrag Milanović 8ac7ed161a
gatemate: code cleanup and netlist fix (#1554) 2025-09-10 14:04:42 +02:00
myrtle 9715a1d565
heap: Allow chains to ripup other chains (opt-in only) (#1552)
Signed-off-by: gatecat <gatecat@ds0.me>
2025-09-05 09:02:19 +02:00
Miodrag Milanović 141abe60a6
gatemate: cleanup BRAM handling (#1551) 2025-09-05 08:37:29 +02:00
Miodrag Milanović 21bfda4165
gatemate: fix fourgroup for multi die (#1550) 2025-09-03 12:20:11 +02:00
Miodrag Milanović 3eb682bcbb
gatemate: use CPE bridge (#1538)
* Add bridge support

* Use bridge only if CPE is unused

* do not use CPE_MULT for MUX routing

* Fixed and documented

* delay for CPE_BRIDGE

* Convert bridge pips into bels

Co-authored-by: Miodrag Milanovic <mmicko@gmail.com>

* recursively reassign bridges

* reconnect cell ports to new nets

* handle inversion bits

* sort data in output for easier compare

* one to be removed after testing

* debug message

* Remove need for notifyPipChange

* use same logic for detecting bridge pips

* make sure that the pip used is the one assigned

* one wire may feed multiple ports

* remove #if

* clean up wire binding

* add debugging

* fix

* clangformat

* put back to error

* use tile instead of getting name out of bel/pip

* bump chipdb

* adressing review comments

* Addressed last one

---------

Co-authored-by: Lofty <dan.ravensloft@gmail.com>
2025-09-02 18:00:01 +02:00
Miodrag Milanović 4e4f4ab113
gatemate: update bounding box (#1548) 2025-09-02 14:04:28 +02:00
Miodrag Milanović 0399b8865e
gatemate: Enable placing RAM halfs (#1544)
* gatemate: Split BRAMs into halfs

* Cleanups

* move code arround

* optmize remapping halfs

* Name RAM cells

* fix cluster setting for cascade mode

* attach ECC pins

* rewire global clocks

* bump chip database version

* Fix KEEPER setting

* Fix conflict check

* cleanup
2025-09-02 08:03:22 +02:00
Miodrag Milanovic e1ba78094f gatemate: clean data bitmask 2025-08-27 12:28:58 +02:00
Miodrag Milanovic 2b203d21ae gatemate: add missing RAM port mapping 2025-08-27 10:37:10 +02:00
Miodrag Milanovic ca4f727ffc gatemate: fix CI/CO RAM connections 2025-08-25 12:24:46 +02:00
Miodrag Milanovic 84234e7d79 gatemate: delay, assign proper RAM clock 2025-08-25 10:55:19 +02:00
Miodrag Milanović 6a598b945e
gatemate: add iopath delays (#1537)
* Timing

* clangformat

* Import some new data

* Import all timing data

* Add constants for needed timings

* Add separate file for delay handling

* wip

* Added helpers

* wip

* proper place for assignArchInfo

* wip

* wip

* Fixes for IO

* Add IOSEL delays

* Fix logic loops

* help figure out some ram paths

* return true only if exists

* cover all primitives

* Disable not used paths

* clockToQ

* Added some RAM timings

* Add more IOPATHs

* cleanup

* cleanup

* Map few more timings

* remove short name options

* support strings as options

* no need for return
2025-08-22 11:07:34 +02:00
Miodrag Milanović e598b2f4d9
gatemate: special case RAMIO when needed (#1536) 2025-08-21 15:11:08 +02:00
Miodrag Milanović 95ab16f380
gatemate: add IOSEL as separate primitive (#1533) 2025-08-14 12:20:24 +02:00
Lofty 5355222e09 Revert "gatemate: don't place cells all at once (#1528)"
This reverts commit 2d393c2487.
2025-08-09 04:35:20 +01:00
Lofty 2d393c2487
gatemate: don't place cells all at once (#1528) 2025-08-08 18:19:42 +02:00
Lofty 0ad43e6ec7
gatemate: remove placement density restriction (#1527) 2025-08-08 17:02:56 +02:00
Lofty 8938c73fc9
Merge pull request #1524 from YosysHQ/lofty/gatemate-mult-router
gatemate: multiplier router
2025-08-05 11:20:25 +01:00
Miodrag Milanovic 6b11a82d04 cleanup 2025-08-04 14:28:43 +02:00
Miodrag Milanovic f0e03ed6e7 cleanup 2025-08-04 14:23:18 +02:00
Miodrag Milanovic 89e7e059d8 cleanup 2025-08-04 13:55:19 +02:00