Commit Graph

5063 Commits

Author SHA1 Message Date
Lofty 9748914263
Merge 1178707d70 into 575689b7e4 2026-03-03 13:58:05 +01:00
myrtle 575689b7e4
himbaechel: Enable use of electrostatic placer (#1657)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-03-03 12:19:41 +01:00
gatecat ab7aa9ffab ci: Actually build some himbaechel uarches
Signed-off-by: gatecat <gatecat@ds0.me>
2026-03-02 18:34:47 +01:00
Leo Moser 50c2ca21a3
fabulous: improve pcf implementation, create global clock only if necessary (#1654)
* fabulous: report port as unconstrained unless BEL attr set

Signed-off-by: Leo Moser <leomoser99@gmail.com>

* fabulous: only create global clock if needed

Signed-off-by: Leo Moser <leomoser99@gmail.com>

---------

Signed-off-by: Leo Moser <leomoser99@gmail.com>
2026-03-02 18:26:04 +01:00
myrtle eba9764645
xilinx: Import timings for BRAM (#1653)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-03-02 10:10:55 +01:00
gatecat 858177d136 Update README
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-26 15:30:43 +01:00
YRabbit 6235ba21e3
Gowin.DSP. Add MULTALU27X18. (#1650)
This primitive occupies one DSP block entirely and can be connected into
complex chains both by arguments (shifting operands from SOA to SIA) and
by results (CASO->CASI cascades).

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-02-26 12:25:10 +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
gatecat 2ecd41e495 Cleanups in README
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-25 15:43:02 +01:00
myrtle 2b4deb4313
timing: Fix critical path report with async resets (#1648)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-25 14:21:25 +01:00
gatecat 0d3a578539 run clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-25 11:18:14 +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
myrtle 501b36e646
gowin placement performance improvements, phase 3 (#1646)
* gowin: Improve placer performance

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

* Add blocker cells for LUTRAM

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

* gowin: Faster validity checks

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

* heap: Improve macro handling, in verbose report per cell type

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

---------

Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-24 20:56:54 +01:00
myrtle 2400a90e04
router2: Try harder on constants to prevent infinite loop (#1647)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-24 14:28:25 +01:00
gatecat 1f4d3fdc91 Add a workaround for DCI for now
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-21 20:17:34 +01:00
gatecat fc1f50937c xilinx: Enable MMCM related pips
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-21 20:17:34 +01:00
gatecat 05e6915369 xilinx: Fix RAM256X1S packing
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-21 20:17:34 +01:00
gatecat 0cd6e72d5f xilinx: Add MMCM support
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-21 20:17:34 +01:00
gatecat c0ff514582 xilinx: Work around missing kintex7 timing for now
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-21 17:52:08 +01:00
YRabbit d43c09d070
Gowin. Divide packer. (#1645)
Split the packer into several files.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-02-21 08:11:39 +01:00
myrtle d065288979
ecp5: Fix DCC selection (#1644)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-20 15:21:57 +01:00
YRabbit 5bbaac8572
Gowin. Implement GW5A DSP. (#1641)
* Gowin. DSP. Implement MULT12x12.

The 5A series DSP differs from previous ones. Many things have been
greatly simplified: there are only two control signals of one type per
cell (2 CLK, 2 CE and 2 RESET), and these signals are now explicitly
specified in the DSP attributes, which makes the automatic assignment
mechanism unnecessary for them.

The DSP occupies 3 cells instead of nine due to the exclusion of 4
low-bit multipliers - now there are only two 12x12. There will naturally
be clusters, but they will be simpler and consist of other primitives.

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

* Gowin. Implement MULTADDALU12X12.

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

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-02-20 07:48:22 +01:00
Kelvin Chung f1fc47e139
feat: basic pcf implementation (#1637)
chore: seems like working pcf

feat: add reg support and clean up

chore: add clean up

delay io check and add cell timing min-max delay

fix rebase error

better pcf syntax

add regex support for prohibit command

fix regex and repeat create

fix cell can potentially have no bel

fix IO

chore: clean up

chore: review comment

feat: set pseudo cell loc by wire info

yosys based IO insert

finalise

final finalise
2026-02-17 17:38:01 +01:00
myrtle 49ba0b277f
Support use of router2 for gowin (#1636)
Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-17 09:26:25 +01:00
Pepijn de Vos 06ae973aa8
Msgspec serialization (#1640)
* gowin: Update arch gen to use msgspec chipdb format

Apycula now uses msgspec MessagePack serialization instead of pickle
for the chipdb files. This change:

- Replaces pickle with msgspec via load_chipdb()
- Changes file extension from .pickle to .msgpack.gz
- Updates grid access patterns for new Device structure where
  db.grid[y][x] returns ttyp (int) directly, use db[y, x] for Tile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update chipdb extension to .msgpack.xz

Apicula switched from gzip to lzma compression for chipdb files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 08:47:16 +01:00
myrtle 2a8bab976d
gowin: Perfomance improvements round 1 (#1632)
* gowin: Configure HeAP

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

* gowin: Use fast constant value routing

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

---------

Signed-off-by: gatecat <gatecat@ds0.me>
2026-02-10 20:54:09 +01:00
bwisn 35f14336c0
gui: make it compatible with musl libc (#1635) 2026-02-08 20:23:12 +01:00
YRabbit 3c558d6e3d
Gowin. DSP. Allow combinatorial modes. (#1634)
Do not assume that RESET, CE, and CLK pins are always present.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-02-06 07:01:09 +01:00
YRabbit 826a534195
Gowin. BUGFIX. DSP. (#1633)
Only one bit per macro is responsible for the bit width of operands. We
add operand width tracking and do not allow different operands to be
combined in a single macro.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-02-05 09:39:53 +01:00
YRabbit b4da86edce
Gowin. Add GW5AST-138C chip. (#1631)
* Gowin. Add GW5AST-138C chip.

The ability to perform P&R for the largest GW5A series chip currently
available has been added, which has its own characteristics:

  - the need to invert pin function configuration signals - these
    signals are not part of the design, but are nextpnr command line
    keys  for specifying the activation of alternative pin functions such as
    I2C;

  - some clock PIPs are encoded not by fuses, but by applying VCC/GND to
    special inputs. This is also not part of the design and is not a
    dynamic clock selection primitive - it is simply an addition to the
    fuses.

  - added check for DFF and SSRAM placement in upper slots - prior to
    this chip, SSRAM was not supported and there was no need for this
    check.

  - since the chip is divided into two parts in terms of the global
    clock network, a flag is introduced to indicate which part the wire
    belongs to. This is only requested for clock wires.

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

* Gowin. Fix style.

Use C++ type cast.

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

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-01-31 13:01:22 +01:00
gatecat 8c6278170b nexus: Support for packing IODELAY and DDR
Signed-off-by: gatecat <gatecat@ds0.me>
2026-01-26 11:10:53 +01:00
gatecat 94ac6d087e WIP: nexus iodelay
Signed-off-by: gatecat <gatecat@ds0.me>
2026-01-25 17:00:26 +01:00
gatecat 9ae5de7c7c nexus: Support for CONFIG_LMMI and CONFIG_CLKRST_CORE
Signed-off-by: gatecat <gatecat@ds0.me>
2026-01-23 09:53:33 +01:00
gatecat ee159126e1 nexus: Support for MULTIBOOT
Signed-off-by: gatecat <gatecat@ds0.me>
2026-01-23 09:53:33 +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
gatecat e2e7cf4997 nexus: Also disable broken DCS route-through on -40
Signed-off-by: gatecat <gatecat@ds0.me>
2026-01-22 11:13:54 +01:00
YRabbit 15d94b40a5
Gowin. Ignore empty lines. (#1626)
Including those containing nothing but spaces and tabs.

Fixes https://github.com/YosysHQ/apicula/issues/432

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-01-20 08:11:48 +01:00
Darren Kulp 58e3b85866
Correct broken hyperlink to prjxray (#1623) 2026-01-16 08:33:22 +01:00
YRabbit 1ce187ab5a
Gowin. BUGFIX. BSRAM SP separation. (#1622)
* Gowin. BUGFIX. BSRAM SP separation.

The new SP cell must inherit the byte size - 8 or 9 bits.

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

* Gowin. Byte Enables processing in SP.

Single Port with a data width of 32/36 is internally configured as Dual
Port with 16/18. Even and odd words are processed separately by ports A
and B.

With the advent of byte enable support, it became necessary to switch
these signals differently.

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

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2026-01-05 11:27:43 +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
Robert Ward 8ce87ab7f9
Update README to add section for mistral (cyclonev) backend (#1606) 2025-12-22 16:36:38 +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
Miodrag Milanović f5374d6de4
himbaechel: fix parsing vopt memory issue (#1614) 2025-12-12 14:11:34 +01:00
Lofty 12342a60e6
gatemate: fix output register packing (#1608) 2025-12-12 08:52:26 +01:00
Lofty 1178707d70 gatemate: input register packing 2025-12-09 13:22:07 +00:00