-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
himbaechel: dqce_bel != BelId() / Issues with rPLL #1408
Comments
According to Gowin UG286, the GW2AR-18 has 4 clock regions ("quadrants"). And as far as I understand, they need to be driven by different This setup passes PnR and it also works in hardware. However, in practice it would be very difficult to manually handle the clock regions like this. So I assume I shouldn't instantiate the I might go ahead and try some more complex designs without physical outputs. As long as all logic is placed into one quadrant, I think this could work... |
Thanks for testing! There is no need to care about quadrants and you use DQCE if you are going to save energy by switching off the clock in quadrants, which is only relevant when powered by batteries I think. So there are essentially two bug reports here - a crash issue with the placement of the DQCE and the thee LEDs not flashing. I'll look into them in the near future. |
#PnR Just an off-topic remark - top.pnr.json is specified twice, this will lead to interesting results 😄 |
So, at first glance, both difficulties are solved. I will need some time to test the other examples (and there are many - compilation alone takes two hours or so on my machine, not to mention the hardware checks). VID_20241223_114710.mp4VID_20241223_115102.mp4 |
Hi there,
Issue Summary
I'm trying to use the rPLL in a Tang Nano 20K Device. I connect the 27MHz clock to the PLL and configure it to multiply by 4. As a simple test program, I have a counter which is driven by the resulting 108 MHz clock. I connect one of the board LEDs to the PLL lock signal and the others are toggled whenever the counter reaches a certain value.
This works fine, as long as I only toggle one LED. The PLL lock LED is on and the other LED toggles as expected. It also works for 2 toggling LEDs. With 3 LEDs, the LEDs no longer toggle, or sometimes they do, but not deterministically. PLL lock still seems to be on, but of course I wouldn't see short unlocked phases when looking at the LED.
I then remembered that on some FPGAs, PLLs must drive clock buffers and those should drive the nets. So I tried to add a
DQCE
in between. With theDQCE
, the 1 or 2 LED variant still works. The 3 LED variant then even fails pnr:A random guess would be that the logic for the LED registers is in different "clock regions". And that when explicitly instantiating the
DQCE
, nextpnr spots the issue and crashes. But when not using aDQCE
, it just somehow produces an invalid placement. But that's just a wild guess, unfortunately I don't know anything about the gowin architectures.Reproduction Testcase
The code can be found in this gist: https://gist.github.com/jpf91/9796d712ad611e2836d8b61bf1a83aaf
Use the following commands to reproduce the issue:
When using the code as is, it produces the
dqce_bel != BelId()
crash. When removing one of theled_buf[X] <= !led_buf[X];
lines, the code works. When removing theDQCE
inCLKGen.v
, the crash is gone but the generated bitstream does not work.Am I doing something wrong here, or is there really a bug in the tools?
Tool version: oss-cad-suite-linux-x64-20241222
The text was updated successfully, but these errors were encountered: