Commit Graph

4374 Commits

Author SHA1 Message Date
Sylvain Munaut
0cf5006e3b ice40: Rework pull-up attribute copy to SB_IO blocks
We try to copy the attribute only when there is a chance for
the output driver to not be active.

Note that this can _also_ happen when a port is specified as
output but has a TBUF, which the previous code wasn't handling.

We could copy the attribute "all-the-time" but this would
mean if a user specified a `-pullup yes` in the PCF for a
permanently driven output pin, we'd be burning power for
nothing.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-01-29 22:35:19 +01:00
myrtle
f80b871dd5
Merge pull request #1084 from YosysHQ/gatecat/ecp5-ioff-fix
ecp5: Improve IOFF CE handling robustness
2023-01-27 11:20:45 +01:00
myrtle
d661d117af
Merge pull request #1085 from yrabbit/gw1nr-9c-pll
gowin: Add PLL support for the GW1NR-9C chip
2023-01-27 11:20:35 +01:00
YRabbit
2d45d57b32 gowin: Add PLL support for the GW1NR-9C chip
This chip is used in the Tangnano9k board.

  * all parameters of the rPLL primitive are supported;
  * all PLL outputs are treated as clock sources and optimized routing
    is applied to them;
  * primitive rPLL on different chips has a completely different
    structure: for example in GW1N-1 it takes two cells, and in GW1NR-9C
    as many as four, despite this unification was carried out and
    different chips are processed by the same functions, but this led to
    the fact that you can not use the PLL chip GW1N-1 with the old
    apicula bases - will issue a warning and refuse to encode primitive.
    In other cases compatibility is supported.
  * Cosmetic change: the usage report shows the rPLL names without any
    service bels.
  * I use ctx->idf() on occasion, it's not a total redesign.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-26 20:26:05 +10:00
gatecat
9b5e5f124c clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-25 10:29:32 +01:00
gatecat
c8cb063656 ecp5: Improve IOFF CE handling robustness
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-25 09:26:12 +01:00
myrtle
b9ed39bc1c
Merge pull request #1081 from danc86/eigen-cmake-imported-target
use eigen as an IMPORTED target in CMake
2023-01-24 16:33:54 +01:00
Dan Callaghan
4c7e805f18 use eigen as an IMPORTED target in CMake
Eigen considers the EIGEN3_INCLUDE_DIRS and EIGEN3_DEFINITIONS variables
to be deprecated and they will no longer be exported in the next release
after 3.4.0:
f2984cd077

Use the IMPORTED target instead, which seems to be the preferred way of
consuming third-party CMake libraries.
2023-01-24 13:11:50 +11:00
myrtle
985c688bf6
Merge pull request #1080 from YosysHQ/gatecat/missing-includes
Add missing <set> includes
2023-01-23 08:51:31 +01:00
gatecat
7845b66512 Add missing <set> includes
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-20 09:04:41 +01:00
myrtle
06eaffc57c
Merge pull request #1077 from yrabbit/gw1nsr-4c_0
gowin: add a PLL primitive for the GW1NS-4 series
2023-01-19 06:44:46 +01:00
YRabbit
cc45f5ec48 gowin: improve error message
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-19 07:12:39 +10:00
YRabbit
ba4d7b1e9a gowin: to use the FB network detection function
The chip used in tangnano4k does not have such pins, but we call the
function anyway in the expectation of other chips.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-19 06:31:55 +10:00
myrtle
dc2dac1f9e
Merge pull request #1078 from YosysHQ/gatecat/route-delay-quad
context: Add getNetinfoRouteDelayQuad
2023-01-18 17:19:20 +01:00
gatecat
6079326633 context: Add getNetinfoRouteDelayQuad
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-18 16:28:33 +01:00
YRabbit
b22eebac30 gowin: add a PLL primitive for the GW1NS-4 series
* both instances of the new PLLVR type are supported;
  * primitive placement is optimized for the use of dedicated PLL clock
    pins;
  * all 4 outputs of each primitive can use the clock nets (only 5 lines
    in total at the same time so far).

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-18 19:18:02 +10:00
myrtle
a46afc6ff8
Merge pull request #1076 from adamgreig/ecp5-dsp-remap
ECP5: Add DSP signal remapping
2023-01-04 20:01:05 +01:00
Adam Greig
8d8c244e00
Add remapping of DSP clk/ce/rst signals in a block.
Each DSP block contains two slices, and each slice contains multiple
MULT18X18D and ALU54B units. Each unit configures each register to use
any of CLK0/1/2/3, CE0/1/2/3, and RST0/1/2/3 ports, and the ports are
connected per unit (so for example, two MULTs in the same block could
connect their CLK0s to different external signals). However, the
hardware only has one actual port per block, so it's required that
all CLK0 signals within a block are the same.

Because the packer is in general allowed to combine two unrelated units
into one block, it may end up combining units that use different signals
for the same port, which would eventually have caused a router failure.

This commit adds validity checks which ensure only unique signals are
used per block, and adds remapping so that conflicting signals are
automatically reassigned when possible and required.
2023-01-04 18:34:30 +00:00
Adam Greig
174848b4b3
Include ALU54B in cell types with wire location overrides 2023-01-04 13:48:39 +00:00
gatecat
f89b959b5f clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-02 09:33:11 +01:00
myrtle
5cea801a2f
Merge pull request #1075 from YosysHQ/gatecat/ecp5-lpf-errors
ecp5: Improve error handling for missing end-"
2023-01-02 09:25:14 +01:00
gatecat
d210a5aded ecp5: Improve error handling for missing end-"
Signed-off-by: gatecat <gatecat@ds0.me>
2023-01-02 08:39:00 +01:00
myrtle
3338227ef7
Merge pull request #1073 from yrabbit/doc
doc: fix the list format
2023-01-01 10:21:40 +01:00
YRabbit
7c4f44c783 doc: fix the list format
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-01 10:26:28 +10:00
myrtle
eaf2bc8bdd
Merge pull request #1071 from yrabbit/to-float
gowin: bugfix and improved clock router
2022-12-30 11:58:39 +01:00
YRabbit
b8ab3116b2 gowin: improve clock wire routing
The dedicated router for clock wires now understands not only the IO
pins but also the rPLL outputs as clock sources.

This simple router sets an optimal route, so it is now the default
router. It can be disabled with the --disable-globals command line flag
if desired, but this is not recommended due to possible clock skew.

Still for GW1N-4C there is no good router for clock wires as there
external quartz resonator is connected via PLL.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-12-30 11:55:39 +10:00
YRabbit
8424dc79d2 gowin: correct the delay calculation
And do a full enumeration when searching for a delay because it is not
yet clear whether the orderliness of the vector is guaranteed.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-12-29 11:17:45 +10:00
myrtle
0004cd54db
Merge pull request #1069 from yrabbit/mistype
doc: fix a mistype
2022-12-27 15:32:09 +01:00
YRabbit
2e5c799566 doc: fix a mistype
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-12-23 17:14:26 +10:00
myrtle
76fea8268c
Merge pull request #1068 from YosysHQ/cleanup_and_sync
Cleanup and sync
2022-12-22 21:19:21 +01:00
Miodrag Milanovic
64f7306b24 initialize netShareWeight 2022-12-22 20:16:13 +01:00
Miodrag Milanovic
4af8964069 propagate netShareWeight 2022-12-22 16:11:10 +01:00
Miodrag Milanovic
bd628ce591 Remove deprecated functions 2022-12-22 15:26:39 +01:00
myrtle
a80d63b268
Merge pull request #1066 from arjenroodselaar/place_timeout
Timeout when legal placement can't be found for cell
2022-12-21 07:10:09 +00:00
myrtle
b101f0092c
Merge pull request #1067 from yrabbit/wasm
gowin: fix build for wasm
2022-12-21 07:09:27 +00:00
YRabbit
d6cbe4b7f8 gowin: fix build for wasm
A large number of global variables are not suitable for WASM, so
completely disable the graphics part where the main array of them is
used.  For other architectures GUI is still possible.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-12-21 16:13:08 +10:00
Arjen Roodselaar
be1f700b0b Set divisor instead of absolute value 2022-12-20 13:10:37 -08:00
Arjen Roodselaar
923458a2c9 Allow setting cell placement timeout 2022-12-20 11:15:06 -08:00
Arjen Roodselaar
d5299f144f Add --no-placer-timeout flag to override timeout during refinement 2022-12-19 22:58:52 -08:00
Arjen Roodselaar
2712cbf6e4 Increase timeout 2022-12-19 14:00:19 -08:00
myrtle
3ea3a931ca
Merge pull request #1065 from YosysHQ/gatecat/heap-chains-fix
heap: encourage more spreading of heterogenous chains
2022-12-19 08:44:26 +00:00
Arjen Roodselaar
6e0311efca Timeout when legal placement can't be found for cell 2022-12-17 16:07:57 -08:00
myrtle
78926b31db
Merge pull request #1064 from YosysHQ/gatecat/ecp5-main-fix
ecp5: Only write bitstream if --textcfg passed
2022-12-17 12:22:36 +00:00
gatecat
ccb573298c heap: encourage more spreading of heterogenous chains
Signed-off-by: gatecat <gatecat@ds0.me>
2022-12-17 10:50:20 +00:00
gatecat
bc18d18a95 ecp5: Only write bitstream if --textcfg passed
Signed-off-by: gatecat <gatecat@ds0.me>
2022-12-17 10:37:15 +00:00
myrtle
16ffd02a9d
Merge pull request #1061 from yrabbit/fix-clock-gui
gowin: not crush on unknown clock tap's sources
2022-12-14 08:00:02 +01:00
YRabbit
bc3d9f3108 gowin: not crush on unknown clock tap's sources
As preparation for possible changes to the clock wiring system.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-12-14 15:35:55 +10:00
myrtle
b5d30c7387
Merge pull request #1060 from yrabbit/pll-inputs
gowin: BUGFIX: Correctly handle resets
2022-12-09 09:27:58 +01:00
YRabbit
aa8359c73e gowin: BUGFIX: Correctly handle resets
When a single primitive occupies several cells, care must be taken when
manipulating the parameters of that primitive: when creating cells, each
cell must receive a copy of all the parameters and not modify them
unnecessarily.  That is, if possible, it is better to make all parameter
changes before dividing the primitive into cells.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-12-09 12:55:22 +10:00
myrtle
0eb53d59d8
Merge pull request #1059 from YosysHQ/gatecat/validity-errors
Add new option for verbose validity errors, use for ice40
2022-12-07 16:19:55 +01:00