Commit Graph

4399 Commits

Author SHA1 Message Date
Lofty
52b02f7377 machxo2: Fix Python bindings for pip iterators 2023-02-13 12:49:00 +00:00
rowanG077
3608c3eb02 common: Implement Werror flag 2023-02-13 10:52:05 +01:00
myrtle
b5125aac31
Merge pull request #1090 from rowanG077/ecp5-propagate-dcsc-clk-ct
ecp5: Propagate clock constraints through DCSC
2023-02-13 10:25:07 +01:00
myrtle
ba3801e010
Merge pull request #1097 from YosysHQ/gatecat/fab-bram-fix
fabulous: Improve names for BRAM bels
2023-02-10 13:41:36 +01:00
gatecat
eb70e95079 fabulous: Improve names for BRAM bels
Signed-off-by: gatecat <gatecat@ds0.me>
2023-02-10 13:23:31 +01:00
myrtle
1226fad4f6
Merge pull request #1096 from YosysHQ/gatecat/ecp5-ioce-fix
ecp5: Handle the case where both CE are the same constant
2023-02-10 07:29:10 +01:00
gatecat
a8a88d4813 ecp5: Handle the case where both CE are the same constant
Signed-off-by: gatecat <gatecat@ds0.me>
2023-02-09 11:12:15 +01:00
myrtle
a93f49eb04
Merge pull request #1094 from uis246/master
gowin: Add bels for new types of oscillators
2023-02-07 09:20:59 +01:00
uis
69fe654f02 gowin: Add bels for new types of oscillator 2023-02-06 21:45:55 +00:00
rowanG077
9e8f8b7b45 streamline constant_net detection 2023-02-06 17:05:28 +01:00
rowanG077
d2bf44ba45 ecp5: DSCS clock propagation if modesel is 0 constant 2023-02-06 16:27:45 +01:00
myrtle
48b0025732
Merge pull request #1087 from yrabbit/gw1nr-9
gowin: Add PLL support for the GW1NR-9 chip
2023-02-02 08:30:56 +00:00
YRabbit
2edc77836d Merge branch 'master' into gw1nr-9 2023-02-02 07:35:38 +10:00
rowanG077
a38ee0786a ecp5: Propagate clock constraints through DSCS 2023-02-01 19:12:10 +01:00
myrtle
f328130c0a
Merge pull request #1089 from smunaut/icegate
ice40: Add support for PLL ICEGATE function
2023-02-01 14:34:29 +00:00
Sylvain Munaut
582410629b ice40: Don't assert on unknown extra_config bits if they are 0
Bits are 0 by default anyway, so if they are unknown (because icestorm
is too od) but we want them at 0 ... it's not much of an issue.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-02-01 15:14:18 +01:00
Sylvain Munaut
49ae495344 ice40: Add support for PLL ICEGATE function
Technically you can enable it independently on CORE and GLOBAL
output, but this is not exposed in the classic primitive, so
we do the same as icecube2 and enable/disable it for both output
path depending on the argument

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-02-01 11:41:35 +01:00
myrtle
235e0d28e9
Merge pull request #1088 from rowanG077/ecp5-singleton-lpf
ecp5: LOCATE in LPF works on singleton vector
2023-01-31 22:29:11 +00:00
rowanG077
803c57d052 ecp5: LOCATE in LPF works on singleton vector 2023-01-31 21:05:32 +01:00
YRabbit
5d5ea57e21 gowin: Add PLL support for the GW1NS-2C chip
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-31 18:46:38 +10:00
YRabbit
aac36ecf3f gowin: Add PLL support for GW1NR-4 chips
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-31 08:58:33 +10:00
myrtle
bfa3e047ce
Merge pull request #1086 from smunaut/out_z
ice40: Improve `output` handling vs pull-ups and undriven
2023-01-30 22:06:58 +00:00
YRabbit
2829a7d70a gowin: Proper use of the C++ mechanisms
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-30 18:59:09 +10:00
YRabbit
6a1212a1e1 gowin: Add PLL support for the GW1NR-9 chip
And also unified the fixing of PLL to bels: the point is that PLL being
at a certain location has the possibility to use a direct implicit wire
to the clock source, but once we decide to use this direct wire, the PLL
can no longer be moved.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2023-01-30 12:49:57 +10:00
Sylvain Munaut
f50d4c1ed1 ice40: Support for undriven / unconnected output ports
If a port specified as output (and thus had a $nextpnr_obuf inserted)
is undriven (const `z` or const `x`), we make sure to not enable
the output driver. Also enable pull-ups if it was requested by the user.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-01-29 22:35:19 +01:00
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