Closed Chandler-Kluser closed 2 years ago
Since this example is built on every git commit, my first guess is that it's a version problem. Please try updating yosys and nextpnr to the latest git revision. If that does not help, download the python package from the latest CI run in the actions tab, and rebuild nextpr with it. If that fixes the problem, we need to do a new pypi release. I'll do one anyway because we just landed some cool features.
The yosys I was using was from Ubuntu apt repository, which I considered a bit out-of-date, so I compiled a new one from source from the last commit:
$ yosys -V
Yosys 0.18+13 (git sha1 e6a5d8414, clang 14.0.0-1ubuntu1 -fPIC -Os)
and maintained nextpnr-gowin build (I built it this week from source too):
$ nextpnr-gowin --version
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
nextpnr-gowin -- Next Generation Place and Route (Version nextpnr-0.3-37-g8d063d38)
I was able to generate input .json file for nextpnr-gowin from the blinky.v example with no problems as before by doing (this time):
yosys -D LEDS_NR=6 -D OSC_TYPE_OSCZ -p "read_verilog blinky.v; synth_gowin -json blinky.json"
then I could not build the output .json file for packing through nextpnr-gowin:
nextpnr-gowin --json blinky.json \
--write pnrblinky.json \
--device GW1NSR-LV4CQN48PC7/I6 \
--cst tangnano4k.cst
I wasn't able to get the pnrblinky.json due to this error message from nextpnr-gowin:
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
Info: Series:GW1NS-4 Device:GW1NSR-4C Package:QFN48P Speed:C7/I6
Info: Cell key not found
Info: Cell rst not found
Info: Cell tlvds_p not found
Info: Packing constants..
Info: Packing GSR..
Info: Packing IOs..
Info: Packing diff IOs..
Info: Packing IO logic..
Info: Packing wide LUTs..
Info: Packing LUT5s..
Info: Packing LUT6s..
Info: Packing LUT7s..
Info: Packing LUT8s..
Info: Packing ALUs..
Info: Packing LUT-FFs..
Info: Packing non-LUT FFs..
Info: Checksum: 0xe938f891
Info: Annotating ports with timing budgets for target frequency 12.00 MHz
Info: Checksum: 0xe938f891
Info: Device utilisation:
Info: VCC: 1/ 1 100%
Info: SLICE: 54/ 4608 1%
Info: IOB: 7/ 98 7%
Info: ODDR: 0/ 98 0%
Info: GW_MUX2_LUT5: 0/ 2304 0%
Info: GW_MUX2_LUT6: 0/ 1152 0%
Info: GW_MUX2_LUT7: 0/ 576 0%
Info: GW_MUX2_LUT8: 0/ 560 0%
Info: GND: 1/ 1 100%
Info: GSR: 1/ 1 100%
Info: OSCZ: 0/ 1 0%
Info: Placed 7 cells based on constraints.
ERROR: Unable to place cell '$PACKER_BUFS2', no BELs remaining to implement cell type 'BUFS'
0 warnings, 1 error
@pepijndevos do you have anything in mind which I can do to overturn this problem?
Thanks in advance!!
Judging by the absence of BUFS you used old apicula chip bases when compiling nextpnr. These things are responsible for the long wires and were merged with the main branch not too long ago.
nextpnr should work in your case,if you do not use the new mechanisms, but you specified CLOCK_LOC "led[0]" BUFS; and this already requires new bases.
A quick (and dirty) solution is to remove these directives from the .CST
I took the .cst from the apicula example repo folder, is there any .cst better for the board?
I have compiled nextpnr-gowin with the latest apycula from pip (as written in apicula README.md file), do you suggest any other apicula specific version?
I took the .cst from the apicula example repo folder, is there any .cst better for the board?
A normal .CST from the repo folder will do ;)
https://github.com/YosysHQ/apicula/blob/master/examples/tangnano4k.cst
(Not the one in the catalog for long wires)
I have compiled nextpnr-gowin with the latest apycula from pip (as written in apicula README.md file), do you suggest any other apicula specific version?
I am a bad adviser here because I don't know Python infra and I have no information about the state of packages in PIP;)
!!! Not recommended, manual!!! In general you can still use your version installed from pip because nextpnr only needs the BBA and the bases. You can download the bases from the artifacts of the last build and put them in place of the old bases, and then compile nextpnr from source.
-chipdb
https://github.com/YosysHQ/apicula/actions/runs/2514623030#artifacts
But it is better to wait for pepijndevos
I was able to generate the .fs file using the normal .cst suggested by @yrabbit , compiling apicula from source was not necessary!
Is there any manual or documentation to make these .cst files for my projects?
Thanks in advance @pepijndevos and @yrabbit !!
Is there any manual or documentation to make these .cst files for my projects?
We can say that we recognize some subset of the Gowin directives. See appendix A.
https://www.gowinsemi.com/en/support/database/?support_search=physical+constraint
Hello Everyone,
Firstly, I would like to congratulate the devs for the hard work done to reverse engineer gowin chips architectures to make a free EDA tool.
Secondly, I took the blinky.v project to generate pnr file with yosys and nextpnr-gowin with the following files:
blinky.v:
tangnano4k.cst:
and, as I said before, then I used yosys and nextpnr-gowin to generate output.json file to future pack it in an .fs file with the following bash commands:
Then I have got the following error:
As you can see, I am in trouble with the net definitions, the .cst file from tangnano4k I took from the example folder from this repository, the same as blinky.v file.
Can someone tell me what is wrong to make me generate the correct output.json file in order to pack it in an .fs file to flash my tangnano4k?
nextpnr-gowin version:
yosys version:
Thanks in advance!!