Commit Graph

22 Commits

Author SHA1 Message Date
YRabbit
590b9050ff gowin: add a separate router for the clocks
A simple router that takes advantage of the fact that in each cell with
DFFs their CLK inputs can directly connect to the global clock network.

Networks with a large number of such sinks are sought and then each
network is assigned to the available independent global clock networks.

There are limited possibilities for routing mixed networks, that is,
when the sinks are not only CLKs: in this case an attempt is made to use
wires such as SN10/20 and EW10/20, that is, one short transition can be
added between the global clock network and the sink.

* At this time, networks with a source other than the I/O pin are not
  supported. This is typical for Tangnano4k and runber boards.

* Router is disabled by default, you need to specify option
  --enable-globals to activate

* No new chip bases are required. This may change in the distant future.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-06-23 11:42:58 +10:00
YRabbit
c898587b87 gowin: don't crash if no arguments are set
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-03-16 15:47:13 +10:00
YRabbit
53ddbbaa85 Set the locale as early as possible
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-03-16 05:39:55 +10:00
YRabbit
ad00f3fdeb gowin: test locale workaround
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-03-15 21:52:32 +10:00
YRabbit
25d7e3ae8b gowin: support for locales other than en_US and C
Specifically, those locales where the fractional part separator in
floating point numbers is not a dot.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-03-14 21:41:57 +10:00
YRabbit
3894a36ddb gowin: recognize partnumbers of GW1NZ-1
The model should be recognized by the partnumber, --family is needed
only if the same partnumbers belong to different models.
This is done in order to automatically generate parameters for calling
nextpnr from Gowin files without problems: there also only partnumber is
used and only in some cases the model is specified with the -name
parameter and GW1NZ-1 is not such a case.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-02-24 13:35:22 +10:00
gatecat
f3ee0d51a9 clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2022-02-16 13:32:53 +00:00
Icenowy Zheng
230de1e68a gowin: add an option to manually specify family
In the vendor IDE, there's a device family named GW1N-9C (which seems to
mean C revision of GW1N-9), in which the model numbers are all the same
with GW1N-9.

Add an option to nextpnr-gowin to allow manually specified family for
this situation.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
2022-02-06 12:01:51 +01:00
YRabbit
22e4081c73 gowin: Add GUI.
* Items such as LUT, DFF, MUX, ALU, IOB are displayed;
* Local wires, 1-2-4-8 wires are displayed;
* The clock spines, taps and branches are displayed with some caveats.

For now, you can not create a project in the GUI because of possible
conflict with another PR (about GW1NR-9C support), but you can specify
the board in the command line and load .JSON and .CST in the GUI.

Although ALUs are displayed, but the CIN and COUT wires are not. This is
still an unsolved problem.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2022-01-29 14:45:17 +10:00
uis
9b2d6c5a67 Clean gowin modification regex 2021-12-18 22:44:08 +03:00
YRabbit
120ed0c42d gowin: Recognize models correctly
For example, clearly distinguish between
    GW1N-4
    GW1NR-4
    GW1NS-4
    GW1NSR-4
    GW1NSR-4

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2021-12-15 07:56:34 +10:00
YRabbit
74b4f69728 gowin: Use speed from chip base.
Another simplification of the input regular expression, now
the speed is taken from the base.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2021-11-05 17:02:45 +10:00
YRabbit
0e8a2999bd gowin: Add partnumbers and packages to the chipdb
Instead of parsing the partnumber with a regular expression,
a simple table is used. This is done because the structure
of the partnumber changes as new features appear (e.g., ES instead of C6/I5)

This commit does not yet disable the very first regular expression check.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
2021-11-04 18:55:00 +10:00
gatecat
86a91ccf1b clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2021-07-21 10:57:48 +01:00
Pepijn de Vos
c89c14b6bf GW1NR is not a seperate family, but GW1NS is 2021-07-11 14:12:34 +02:00
gatecat
6829e4c197 clangformat
Signed-off-by: gatecat <gatecat@ds0.me>
2021-07-08 15:42:36 +01:00
Gwenhael Goavec-Merou
96263058c3 add support for GW1NS-2 family
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
2021-07-06 11:40:41 +02:00
gatecat
2ffb081442 Fixing old emails and names in copyrights
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-12 13:22:38 +01:00
gatecat
eca1a4cee4 Use hashlib in most remaining code
Signed-off-by: gatecat <gatecat@ds0.me>
2021-06-02 15:05:20 +01:00
gatecat
23413a4d12 Fix compiler warnings introduced by -Wextra
Signed-off-by: gatecat <gatecat@ds0.me>
2021-02-25 15:15:25 +00:00
David Shah
818faa78aa clangformat
Signed-off-by: David Shah <dave@ds0.me>
2020-12-30 16:49:55 +00:00
Pepijn de Vos
3611f54902
Gowin target (#542)
* load wires

* add slice bels

* add IOB

* add aliases

* local aliases

* broken packing stuff

* working packer

* add constraints

* pnr runs1111

* add timing info

* constraints

* more constraint stuff

* add copyright

* remove generic reference

* remove parameters

* remove generic python api

* add newline to end of file

* some small refactoring

* warn on invalid constraints

* don't error on missing cell

* comment out debugging print

* typo

* avoid copy

* faster empty idstring

* remove intermediate variable

* no more deadnames

* fix cst warnings

* increase ripup and epsilon a bit

* take single device parameter

* add info to readme

* gui stubs

* Revert 4d03b681a8

* assign ff_used in assignArchInfo

* decrease beta for better routability

* try to fix CI
2020-12-30 14:59:55 +00:00