Commit Graph

4749 Commits

Author SHA1 Message Date
Rowan Goemans
93e233dad9 timing: Fix hold slack not matching reported path delay 2024-09-24 08:57:21 +02:00
Rowan Goemans
098dcaedec timing: remove the articial clock delay inflation 2024-09-24 08:57:21 +02:00
Rowan Goemans
0fce4b8f4e timing: lower clock_delay_fact to 1 to check if CI passes 2024-09-24 08:57:21 +02:00
Rowan Goemans
25d64b2105 timing_log: Fix logging indendation to match master
timing: Disable clock_skew analysis by default
2024-09-24 08:57:21 +02:00
Rowan Goemans
5488cd994b router: Enable clock skew analysis during routing 2024-09-24 08:57:21 +02:00
Rowan Goemans
8ee2c5612c timing: Add safe zero check function for delay_t 2024-09-24 08:57:21 +02:00
Rowan Goemans
a7f79fd681 timing: minor cleanup and stupid mistake fixups 2024-09-24 08:57:21 +02:00
Rowan Goemans
bca6f6394a timing: Fix slack calculations
timing: Fix max_delay_by_domain_pair function
timing: Fix hold time check
2024-09-24 08:57:21 +02:00
Rowan Goemans
eb0bf9ea9c report: Handle new segment types
timing_log: Use common segment type strings
2024-09-24 08:57:21 +02:00
Rowan Goemans
3b7fec8c4f report: Handle new segment types 2024-09-24 08:57:21 +02:00
Rowan Goemans
4488d42368 log: Remove bad usage of [[no_return]] 2024-09-24 08:57:21 +02:00
Rowan Goemans
8e12dfc693 timing: cleanup clock2clock reporting
timing: Add clock2clock delay as seperate
        timing line item.
2024-09-24 08:57:21 +02:00
Rowan Goemans
86106cb49a timing: integrate c2c delays and cleanup code 2024-09-24 08:57:21 +02:00
Rowan Goemans
fc3b2de8da timing: Add clock skew to arrival and required time 2024-09-24 08:57:21 +02:00
Rowan Goemans
60ee682d58 timing: Make hold violations an error 2024-09-24 08:57:21 +02:00
Rowan Goemans
82ea65d984 timing: Report min delay violated in timing logger 2024-09-24 08:57:21 +02:00
Rowan Goemans
7aeed52c06 common: Add some convenience functions for development 2024-09-24 08:57:21 +02:00
Rowan Goemans
c25da06d03 timing: Start identification of min_delay violations 2024-09-24 08:57:21 +02:00
Rowan Goemans
44665a9c4d timing: Allow critical path traversal for shortest paths 2024-09-24 08:57:21 +02:00
Rowan Goemans
2d542eb63a timing: Add hold time to bound of critical path report 2024-09-24 08:57:21 +02:00
gatecat
4b63b1115e Bump tests submodule
Signed-off-by: gatecat <gatecat@ds0.me>
2024-09-20 13:44:45 +02:00
Jonas Thörnblad
6ca64526bb Fix handling of RNG seed
* Fix truncation of output seed value from 64 bits to 32 bits (int
  instead of uint64) when written to json file.

* Fix input seed value conversion when --seed option is used.

* Remove input seed value scrambling (use of rngseed()) when --seed
  or --randomize-seed option is used since the output seed value will
  be the scrambled value and not the seed that was actually supplied
  or generated.
2024-09-18 16:29:32 +02:00
Rowan Goemans
2627d4e0ad
ecp5: Allow disabling of global promotion (#1367) 2024-09-12 20:16:17 +02:00
YRabbit
50bd8d09b0
Gowin. Implement the EMCU primitive. (#1366)
* Gowin. Implement the EMCU primitive.

Add support for the GW1NSR-4C's embedded Cortex-M3 processor. Since it
uses flash in its own way, we disable additional flash processing for
this case.

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

* Gowin. Fix merge.

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

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-09-12 08:53:39 +01:00
YRabbit
ff7b8535bc
Gowin. Add DHCEN primitive. (#1349)
* Gowin. Add DHCEN primitive.

This primitive allows you to dynamically turn off and turn on the
networks of high-speed clocks.

This is done tracking the routes to the sinks and if the route passes
through a special HCLK MUX (this may be the input MUX or the output MUX,
as well as the interbank MUX), then the control signal of this MUX is
used.

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

* Gowin. Change the DHCEN binding

Use the entire PIP instead of a wire - avoids normalisation and may also
be useful in the future when calculating clock stuff.

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

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-09-11 10:18:26 +01:00
Rowan Goemans
8d0f52fbf9
timing: Move towards DelayPairs for timing reporting (#1359) 2024-09-11 07:23:46 +01:00
YRabbit
4d1de4532a
Gowin. BUGFIX. Create all Clock Pips. (#1358)
Some Clocks PIPS were not created due to a check for the presence of a
delay class, now all wires are attributed to the class so that there is
no longer any need for this check.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-09-05 21:39:26 +01:00
YRabbit
4cf7afedf7
Gowin. Implement the UserFlash primitive (#1357)
* Gowin. Implement the UserFlash primitive

Some Gowin chips have embedded flash memory accessible from the fabric.
Here we add primitives that allow access to this memory.

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

* Gowin. Fix cell creation

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

---------

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-09-04 11:55:35 +01:00
Christian Fibich
2dc712130c
allow LFD2NX devices to be specified with --device (#1353) 2024-08-21 12:36:23 +02:00
YRabbit
32e2d9223c Gowin. BUGFIX. Timing
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-08-21 11:27:59 +01:00
YRabbit
01737a400c Gowin. Add clock wires delays.
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-08-21 10:58:55 +01:00
Lofty
ccdc2f6f13 himbaechel/gowin: add timing information 2024-08-21 10:58:55 +01:00
Adrien Prost-Boucle
fa55e93848 Himbaechel xilinx : Fix regex to parse Zynq device names 2024-08-19 21:06:45 +01:00
Rowan Goemans
0d5d32951c
SDC parsing support (#1348)
* kernel: Add SDC file parser

* kernel: Add sdc as valid option

* kernel/sdc: Add error on EOF when fetching strings

* kernel/sdc: WIP command parsing for set_false_path

* kernel/sdc: Fully parse set_false_path

* kernel/sdc: Handle review comments
2024-08-12 17:45:27 +02:00
Rowan Goemans
f199c3e576
Update shell.nix (#1347) 2024-08-12 16:29:26 +02:00
Saviour Owolabi
e9e7dce23d
Himbaechel Gowin: HCLK Support (#1340)
* Himbaechel Gowin: Add support for CLKDIV and CLKDIV2

* Himbaechel Gowin: Add support for CLKDIV and CLKDIV2

* Gowin Himbaechel: HCLK Bug fixes and corrections
2024-08-03 15:57:22 +02:00
YRabbit
11d335c7ce Gowin. Fix GW2A-18(c) DCS and DQCE
We filter out PIPs from these chips that bypass DCS.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-08-02 14:12:16 +02:00
YRabbit
10a5a44b81 Gowin. Implement clock management primitives.
DQCE and DCS primitives are added.

DQCE allows the internal logic to enable or disable the clock network in
the quadrant. When clock network is disabled, all logic drivern by this
clock is no longer toggled, thus reducing the total power consumtion of
the device.

DCS allows you to select one of four sources for two clock wires (6 and 7).
Wires 6 and 7 have not been used up to this point.

Since "hardware" primitives operate strictly in their own quadrants,
user-specified primitives are converted into one or more "hardware"
primitives as needed.

Also:
  - minor edits to make the most of helper functions like connectPorts()
  - when creating bases, the corresponding constants are assigned to the
    VCC and GND wires, but for now huge nodes are used because, for an
    unknown reason, the constants mechanism makes large examples
    inoperable. So for now we remain on the nodes.

Compatible with older Apicula databases.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-08-02 14:12:16 +02:00
YRabbit
f17caa2379 Gowin. BUGFIX. Fix placement checks
It was not taken into account that there are only 6 ALUs per cell. As a
result, on complex designs where ALUs and LUT-based memory are involved
and there are many LUTs (like in the RISCV emulator), there were
sometimes false positives about placement conflicts.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-07-29 11:31:59 +01:00
YRabbit
eb099a9244 Gowin. Bugfix.
The statement in the Gowin documentation that in the reading mode
"READ_MODE=0" the output register is not used and the OCE signal is
ignored is not confirmed by practice - if the OCE was left unconnected
or connected to the constant network, then a change in output data was
observed even with CE=0, as well as the absence of such at CE=1.

Synchronizing CE and OCE helps and the memory works properly in complex
systems such as RISC-V emulation and i8080 emulation (with 32K RAM and
16K BSRAM based ROM), but there is no theoretical basis for this fix, so
it is a hack.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-07-09 14:18:35 +02:00
YRabbit
1871afe9b9 Gowin. Taking into account the features of ROM
For pROM(X9) primitives in images generated by Gowin IDE, there is an
interesting recommunication of inputs depending on the data bit depth.
For example, in some cases, a high logical level may be applied to the
Write Enable input, which, let’s say, is not entirely usual for Read
Only memory.

Here we will do similar manipulations.

In addition, several minor bug fixes are included:

 - Fixed bit numbering for non-X9 series primitives.
 - Fixed decoder generation for BLKSEL - do not assume unused inputs are
   connected to GND.
 - Use default values for BSRAM parameters - don't assume their
   mandatory presence.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-07-09 14:18:35 +02:00
Miodrag Milanovic
cecd6b3f4d Document context related calls in HimbaechelAPI 2024-07-08 16:45:24 +02:00
Miodrag Milanovic
6b5b21e165 Enable user to override setupArchContext in Himbaechel arch 2024-07-08 16:45:24 +02:00
YRabbit
7dd4a8c1d5 Gowin. Implement power saving primitive
As the board on the GW1N-1 chip becomes a rarity, its replacement is the
Tangnano1k board with the GW1NZ-1 chip. This chip has a unique mechanism
for turning off power to important things such as OSC, PLL, etc.

Here we introduce a primitive that allows energy saving to be controlled
dynamically.

We also bring the names of some functions to uniformity.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-07-08 16:44:49 +02:00
TG
ba293437e0 ice40: Fix Python bindings for pip iterators 2024-07-03 15:09:27 +02:00
YRabbit
0639681b73 Gowin. Fix BSRAM block selection.
In the images generated by Gowin IDE, the signals for dynamic BSRAM
block selection (BLKSEL[2:0]) are not always connected directly to the
ports - some chips add LUT2, LUT3 or LUT4 to turn these signals into
Clock Enable.  Apparently there are chips with an error in the operation
of these ports.

Here we make such a decoder instead of using ports directly.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-07-03 15:09:13 +02:00
YRabbit
2e8280a949 Gowin. Fix pipeline mode in BSRAM.
It seems that the internal registers on the BSRAM output pins in
READ_MODE=1'b1 (pipeline) mode do not function properly because in the
images generated by Gowin IDE an external register is added to each pin,
and the BSRAM itself switches to READ_MODE=1'b0 (bypass) mode .

This is observed on Tangnano9k and Tangnano20k boards.

Here we repeat this fix.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-06-25 11:14:02 +02:00
YRabbit
8f87918230 Gowin. Add fix for Single Port BSRAM
Add description of BSRAM harness

In some cases, Gowin IDE adds a number of LUTs and DFFs to the BSRAM. Here we are trying to add similar elements.

More details with pictures: https://github.com/YosysHQ/apicula/blob/master/doc/bsram-fix.md

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2024-06-25 11:14:02 +02:00
gatecat
a29a17f8f2 clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2024-06-18 13:54:12 +02:00
gatecat
c89037db49 static: Speedup with parallel wirelength gradient computation
Signed-off-by: gatecat <gatecat@ds0.me>
2024-06-18 13:53:42 +02:00