Comments (10)
First of all, whoops, these branches should be swapped so that we fail early instead of crashing later.
Second of all, seems like PLLOUTGLOBAL is not a real Bel port, same as PLLOUTCORE. I think we should support designs that use this port via the following logic:
- IF the out port PLLOUTGLOBAL is used
- THEN
- remap the port to PLLOUT_A
- IF if the PLLOUT_A port drives any cell that is not a SB_GB
- THEN insert an SB_GB between the PLLOUT_A and downhill cell ports
Similar to what we do with LOCK and ICESTORM_LCs...
@daveshah1 , what do you think?
from nextpnr.
PLLOUTGLOBAL has a dedicated connection to a global network via the padin, as if an SB_GB_IO was placed at the relevant location. This isn't the same as following the PLL output with a SB_GB (in arachne and the vendor tools, PLLOUTGLOBAL followed by SB_GB will waste a precious global buffer, and this is correct behaviour imo).
The proper solution is to add support for padin, which requires small changes to the bitstream gen as these are "extra bits" not part of a tile, implement PLLOUTGLOBAL properly and SB_GB_IO at the same time.
from nextpnr.
@daveshah1 Makes sense! Thank you for the info.
I'll implement this properly and also add a warning if the design uses a PLLOUTGLOBAL followed by an SB_GB.
from nextpnr.
Have added a temporary fix for this, since some additional things needed to be added for generated bitstream. Can you please check if #76 works for you ?
from nextpnr.
@mmicko This solves the crash, but then I get the following warning:
Warning: PLL 'SB_PLL40_CORE' is using port PLLOUTGLOBAL but implementation does not actually use the global clock output of the PLL
Does the implementation refer to nextpnr
or my design? Because I route PLLOUTGLOBAL
directly to my intended system clock.
from nextpnr.
from nextpnr.
@mmicko Well, the crash is gone, but my generated bitstream doesn't actually work. I guess for now that means this particular issue is resolved, but PLL support is still in progress.
from nextpnr.
Agree. It seams your other PLL issue is connected to global buffer bitstream handling as well.
from nextpnr.
I've been looking into this and this is what I have so far :
master...smunaut:ice40_pll_global
The only relevant commits are:
- ice40: Add GlobalNetowkrInfo in the chip database
- ice40: Add support for PLL global outputs via PADIN
- [WIP] Complete hack to make it work ...
The first two are looking good to me. Basically first add some more info to the chipdb and then actually use that information.
The general idea, as discussed on IRC, is that when the PLL global output is used, we create a 'fake' SB_GB cell and we force it to the location that will drive the same global network than the PLL output will drive. We also mark that SB_GB as being 'fake' and during bitstream generation, we use that info to set the extra bits that will actually padin. Doing it that way also ensures that this global network / global buffer won't be used by anything else. (Just had to move global promotion after special packing).
And this is what the two first commit do.
The remaining hack is needed because when the PLL doesn't have any output connected, the current bitstream generation code will disable it and the associated IO ...
I'm trying to work out how to deal with that properly but the current code seems to rely on the order the SB_IO and ICESTORM_PLL are processed in the loop over the cells in write_asc which is definitely not good since AFAICT, nothing guarantee this order ...
from nextpnr.
I've updated my tree with my latest changes, cleaning it all up. I think it's ready to be reviewed / tested.
For the IO config what I ended up doing is :
- Do a prescan of all the cells to find the PLL and collects the SB_IO that are used by that PLL.
Either as clock input because it's a PAD type PLL. Or for the output. Note that it doesn't matter if there is anything actually connected to the output port or not, it's purely the PLL type that determines if an SB_IO is unavailable because of the PLL. (i.e. 1 or 2 outputs). Even if the output is global, the SB_IO is still unavailable. - During the normal scan of the cells, for SB_IO, if a cell is used as PAD input, we make sure to enable its input buffer. If the cell is used as part of the output path of the pll we make sure the user isn't trying to use the input as well. In both cases, we do_not configure PINTYPE[1:0] there, we omit them.
- During the normal scan of the cell, for the PLL, we take all the SB_IO locations used for the output path and we make sure to set the PINTYPE[1:0] appropriately.
So the IE/REN bits are always configured as part of the SB_IO config. That's because it's only needed if that site is used as an actual input (either pad or otherwise) and in that case, there will be a SB_IO cell in the list of cells for that site.
The PINTYPE bits are configured during the PLL config because for some of the SB_IO used in the output path, it's possible we don't have any SB_IO that correspond to that site in the design.
from nextpnr.
Related Issues (20)
- Gowin: failed route io with ddr HOT 4
- Cut a release with Gowin Himbaechel uarch HOT 3
- getting stuck at unpacking tools-oss-cad-suite-windows_amd64-0.0.8.tar.gz ,and uptime is too abnormal HOT 2
- Installation on Ubuntu 22.04 HOT 4
- Make fail HOT 3
- undefined symbol: _ZNK5boost10filesystem4path7stem_v3Ev HOT 3
- Add NetBSD support HOT 2
- nextpnr-ecp5 build failed during chipdb generation HOT 9
- On iCE40, use SB_IO PIN_TYPE to avoid unnecessary placement constraint on buffers HOT 4
- Symbol not found: __ZNK5boost10filesystem4path7stem_v3Ev HOT 5
- DSP Primitives not working on GOWIN or Himbaechel HOT 13
- Histogram should probably show slack 0 to improve clarity
- I can't find the arch file chipdb-5k.bin, where is it ? HOT 2
- Routing fails on Crosslink Nexus: "Failed to route arc 0.0 of net 'clk'" HOT 4
- ecp5: trouble using IO_TYPE=LVDS HOT 8
- Does anyone know how to get this working in Void Linux? HOT 2
- Himbaechel Example fail
- Matching Bel type shows as not matching HOT 2
- Problem with ALU54D, "Unable to find legal placement" HOT 5
- PIN "U3" unavailabel in ECP5's CABGA381 package HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextpnr.