Commit Graph

4970 Commits

Author SHA1 Message Date
Miodrag Milanović 7e68bea863
gatemate: fix SER_CLK wiring from CLKIN to PLL (#1523)
* gatemate: fix SER_CLK wiring from CLKIN to PLL

* fix some output formatting

---------

Co-authored-by: Patrick Urban <patrick.urban@web.de>
2025-07-29 11:26:49 +02:00
Lofty d26aa342b7 bugfix for x2y2 in8 binding a pip twice 2025-07-29 09:37:45 +01:00
Lofty ac8a12aee5 bugfix for number of hops 2025-07-29 09:37:45 +01:00
Lofty ff9fa6f4cc route comments 2025-07-29 09:37:45 +01:00
Lofty 95b32a2b56 working diagonal router; unhappy inversion checker 2025-07-29 09:37:45 +01:00
Lofty 9837b6f676 current progress (broken diagonal router) 2025-07-29 09:37:45 +01:00
Lofty 80664e55b7 current progress (fixed routing done?) 2025-07-29 09:37:45 +01:00
Lofty 78b614ed31 current progress 2025-07-29 09:37:45 +01:00
Lofty 1576703937 current progress (route zero driver too) 2025-07-29 09:37:45 +01:00
Lofty d1f80ca5bb current progress 2025-07-29 09:37:45 +01:00
Lofty 4cf33090a9 current progress 2025-07-29 09:37:45 +01:00
Lofty 8637e3bc18 heavy refactoring 2025-07-29 09:37:45 +01:00
Lofty 56e1452d31 refactor common routes 2025-07-29 09:37:45 +01:00
Lofty 90f5f719f3 current progress 2025-07-29 09:37:45 +01:00
Lofty 530a08606b current progress 2025-07-29 09:37:45 +01:00
Lofty 0829b46e9b move multiplier router to its own file 2025-07-29 09:37:45 +01:00
Lofty 0533a4c12b fixed missing pip 2025-07-29 09:37:45 +01:00
Hannah Ravensloft 8047369347 better inversion verification 2025-07-29 09:37:45 +01:00
Hannah Ravensloft f2c736ef81 Beginnings of the multiplier router 2025-07-29 09:37:45 +01:00
Miodrag Milanovic af6e9aa6a3 gatemate: Proper KEEPER handling 2025-07-28 12:11:32 +02:00
Miodrag Milanovic 2c20ca917c clangformat 2025-07-28 12:11:07 +02:00
YRabbit 356278d068
Gowin. Preparing to support the 5A series. (#1520)
* Gowin. Preparing to support the 5A series.

Family recognition is added, as well as minor fixes, but base generation
itself is not allowed for GW5 - this gives the ability to test the next
Apicula release and still not break installations for those who simply
specify `HIMBAECHEL_GOWIN_DEVICES = "all"`.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

* Gowin. Recognize GW5A family chips.

Construct chip base name for

 - GW5A-LV25MG121C1/l0 - TangPrimer 25k

 - GW5AT-LV60PG484A - TangMega 60k

 - GW5AST-LV138PG484A - TangMega 138k

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-07-23 08:45:24 +02:00
Miodrag Milanović 2d7d1e2408
gatemate: optimizations and cleanups (#1517)
* Add log output

* Optimize CC_LUT1

* Update tests

* Optimize CC_LUT2 as well

* Use init enumerations

* Merge DFF in MX4

* Move repack code

* Move ramio code to pack_cpe

* Merge LUT1/2 to ADDF inputs

* Note actual CPE ports

* Merge DFF in ADDF

* Update FF params and ports first

* Check if DFFs are compatible before merging

* Optimize DFF/Latch

* Add reporting of optimized cells

* Optimize MX2/4

* Add statistics

* Use special nets for VCC/GND to skip using name

* Add warning for carry chain split

* Merge FFs where possible

* Cleanup

* Keep statistics out for now

* Add logs for packing sections

* review fixes

---------

Co-authored-by: Lofty <dan.ravensloft@gmail.com>
2025-07-17 08:50:24 +02:00
YRabbit 4831e50843
Gowin. Allow clock network routing from GP pins. (#1518)
Adds automatic connection of a general-purpose pin to the global clock
network.

The old behaviour, where such networks have to be explicitly specified,
can be activated with the command line key
"--vopt disable_gp_clock_routing".

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-07-13 09:24:40 +02:00
via 840354a28a
Fixes for I3C pins and RPLL (#1516) 2025-07-10 14:47:49 +02:00
myrtle 24785a3219
ecp5: Fix placement of ECLKSYNCB driving PLL CLKFB (#1512)
* ecp5: Fix placement of ECLKSYNCB driving PLL CLKFB

Signed-off-by: gatecat <gatecat@ds0.me>

* ecp5: Improve PLL placement algorithm slightly

Signed-off-by: gatecat <gatecat@ds0.me>

---------

Signed-off-by: gatecat <gatecat@ds0.me>
2025-07-08 08:50:12 +02:00
Miodrag Milanovic 0ebd7afab9 clangformat 2025-07-07 10:15:50 +02:00
Miodrag Milanović 84d8e1abe7
Use improved CPE model (#1503)
* CPE mapping improvements

* Use CP_OUT for adders

* Fixes

* Small fixes

* Cleanups

* Cleanup

* Cleanups

* Fixes

* Fixes

* Optimize

* Cleanup

* clangformat

* Cleanup

* Cleanup

* Bump required version of database

* Cleanup

* Resolve name conflicts

* Fix signal routing

* Make CPE_LATCH separate

* Add more timings models, need updated values

* Fixed warning

* multiplier support from lofty/gatemate-mult

* explicitly zero some params in B passthrough

* comment the relevant CPE inputs in check_multipliers

* Rename some of bels

* remove _lower from name

* refactor multiplier checking

* Revert "remove _lower from name"

This reverts commit daa1041bdf.

* Fixe net name to be unique

* Make sure we at least generate bitstream with all info

* Simplify zero

* Bounded cell type in gui

* typo fix

* Remove A passthrough inversion option

* Clean up CarryGenCell config

* Update a passthru to use new primitives

* Cleanup for adders

* Clean up MsbRoutingCell

* Cleanup

* Refactor A connection code

* Make it more as in PR #1513

* Added cplines to bpassthru and fixed constant driver for A

* Add parts

* Added comp out connections

* clangformat

* clangformat

* Clean up B passthrough connections

* wire up a bunch of intermediate signals

* Bit of cleanup

* handing of C_EN_IN

* C_EN_CIN fixes

* connect f_route to its lines

* fix cite for FRoutingCell

* fixup, oops

* connect multfab to its lines

* Commented line

* Connect CPOUTs

* Handle C_I params

* connect CINY1 for CarryGenCell

* fix carry gen CINX

* Update L2T4 model

* Updates for ADDCIN

* clangformat

* fix some issues with multfab and f_route

* look at C_I when doing inversion

* Only set some C_I signals when used

* Fix one more place

* do not use cplines so we can merge in one cell

* Cover cases that could be optimized out

* clangformat

* Cleanups

* Disable multiplier usage for now

---------

Co-authored-by: Lofty <dan.ravensloft@gmail.com>
2025-07-07 10:14:48 +02:00
José Miguel Sánchez García 1d4b0eeac4
himbaechel: xilinx: misc `CMakeLists.txt` improvements (#1509)
* himbaechel: xilinx: replace `/usr/bin/pypy3` with `${Python3_EXECUTABLE}`

* himbaechel: xilinx: recognize `IMPORT_BBA_FILES` inside `CMakeLists.txt`

* himbaechel: xilinx: align CMake device selection behavior with gatemate
2025-07-02 14:58:09 +02:00
José Miguel Sánchez García cb9f3117ba
himbaechel: gatemate: replace VLA with C++ features (#1513) 2025-07-01 19:39:25 +02:00
myrtle 27635785c8
heap: Allow customising legalisation ordering (#1507)
Signed-off-by: gatecat <gatecat@ds0.me>
2025-07-01 15:32:28 +02:00
YRabbit 39f020b033
Gowin. Unbreak the segment routing. (#1508)
Use loop enumeration of PIPs instead of direct name construction for the
upper and lower ends of the segment wire.

Also do not allow clock wires for segments.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-06-30 10:14:21 +02:00
Lofty e642e21f9b
himbaechel: output normalised wire in getWireByName (#1506) 2025-06-25 18:46:19 +02:00
gatecat 9ade2d1877 himbaechel: Add Python binding for get_tile_wire_range
Signed-off-by: gatecat <gatecat@ds0.me>
2025-06-25 18:37:17 +02:00
gatecat 1cd1e4a8d9 xilinx: Fix packing of weird mux trees
Signed-off-by: gatecat <gatecat@ds0.me>
2025-06-25 12:38:11 +02:00
gatecat 23cf1d3b92 docs: Fix outdated content in generic.md
Fixes #1263

Signed-off-by: gatecat <gatecat@ds0.me>
2025-06-25 12:02:27 +02:00
gatecat ff695f26d5 sdc: Fix EOF handling during string parse
Fixes #1490

Signed-off-by: gatecat <gatecat@ds0.me>
2025-06-25 11:58:11 +02:00
gatecat f74aee7047 gowin: Remove logspam during build
Signed-off-by: gatecat <gatecat@ds0.me>
2025-06-25 11:49:45 +02:00
gatecat a77eb9e941 ice40: Fix accidental division by DIVR in 2_PAD mode
Fixes #1500

Signed-off-by: gatecat <gatecat@ds0.me>
2025-06-25 11:44:16 +02:00
Frans Skarman 0c86a218fd
Add sources to detailed timing report (#1502) 2025-06-25 11:39:25 +02:00
YRabbit 66f051d853
Gowin. BUGFIX. Stupid == vs = (#1504)
he good thing is that these cases are very few.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-06-24 13:24:10 +02:00
Miodrag Milanovic 311a1a711d gatemate: do not use special serdes pins for auto placement 2025-06-18 09:56:54 +02:00
Miodrag Milanovic f58dd2d719 clangformat 2025-06-18 09:12:14 +02:00
Miodrag Milanović 7318d6a8ba
gatemate: Multi die support and primitives model improvement (#1501)
* SER_CLK support

* Update constids

* wip

* CLK_FEEDBACK

* Handle SER_CLK and SER_CLK_N

* clangformat

* Cleanup

* Use _ as separator for PLL CFGs

* Remove unused clocking cells

* Do not use same name for IO models

* Fix IDDR merge

* Cleanup

* Properly handle user global signals

* Move signal inversion in bitstream creation

* Start adding multi die support

* Display die location for pins used

* Do not use constant s as locations

* Cleanup SB_DRIVE handling

* Use DDR locations from chip database

* Place only in prefered die for now

* Set D2D

* Fixed typos
2025-06-18 08:32:57 +02:00
Lofty 5275c14ac0
gatemate: include DDR route-throughs in clock router (#1499)
* route_clock: small cleanup

* gatemate: include DDR route-throughs for clock router
2025-06-10 18:00:15 +02:00
YRabbit 000faab213
Gowin. BUGFIX. Fix routing of the FF inputs. (#1498)
A segment router replaces the source-to-sink connection by
general-purpose PIPs with bus-branch segment network connections.

The problem arises when the source is connected to the sinks directly
without switching as in the case of LUT->DFF, such wires should be left
as is, which is what this PR does.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2025-06-10 07:54:20 +02:00
Miodrag Milanovic fd3b4d36e7 gatemate: fix CLK inversion 2025-06-04 18:53:58 +02:00
Miodrag Milanovic bac5a9145f gatemate: memory clock signal handling 2025-05-29 13:26:35 +02:00
Miodrag Milanovic 9994fdb393 gatemate: make sure to use latest chipdb 2025-05-27 15:37:25 +02:00
Miodrag Milanović 12f597dcd1
gatemate: propagate clock constraints on input ports (#1497) 2025-05-26 11:16:45 +02:00