-
Notifications
You must be signed in to change notification settings - Fork 175
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
Strange simulator behavior: clock signal pausing while sync blocks are speeding up #554
Comments
I have absolutely no idea how you managed to get this behavior; I'm assuming a simulator bug. |
Please attach the full code necessary to reproduce this issue. |
@whitequark I just pushed my code. It is my first nontrivial FPGA project, so I am pretty much a newbie here. It is also my first nmigen project. |
@whitequark Could you reproduce the behavior with the code I pushed above? |
Sorry, I have only got around to it now. I get this:
|
@whitequark : cli.py is not yet working, I have not come that far yet.
While developing, I run the simulator in the main of:
./adat/sources/receiver/receiver.py
I can run it from its directory with:
/usr/bin/env /usr/bin/python3 receiver.py
Am Mo., 14. Dez. 2020 um 09:39 Uhr schrieb whitequark <
notifications@github.com>:
… Sorry, I have only got around to it now. I get this:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/whitequark/adat-fpga/adat/cli.py", line 62, in <module>
main()
File "/home/whitequark/adat-fpga/adat/cli.py", line 29, in main
args.with_icache, args.icache_nways, args.icache_nlines, args.icache_nwords,
AttributeError: 'Namespace' object has no attribute 'with_icache'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#554 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABEI72V354A637BAULFMFLSUV3FNANCNFSM4UMVEV6Q>
.
|
Congratulations! I haven't been able to look into this issue yet as I've been quite busy working on CXXRTL, but it's something that I think is very serious, so I'll make sure to address it before the next release. |
As the repository mentioned above is a moving target, Steps to reproduce:
|
I also noticed this. In my case, only the next clock edge is executed (no more than one extra transition). The code in the zip is quite straight forward: There are two clocks that go through a mux, and for a couple of cycles the output clock is inactive when switching clocks. At the beginning of this period the "off-by-one" error is clearly visible. I added markers to the following image:
Same as @hansfbaier , run as |
I have debugged both examples. For the original bug report, the issue comes from the following interaction:
The other report (from @andresmanelli) has a completely different failure mode, and is instead caused by the glitchy way in which the
The above happens all within 0 simulation time, making it invisible in VCD. It can be seen using the recently added In both cases the solution is to be more careful when driving your clock signals. |
Thank you for making us aware of |
I have the following simulator configuration:
When I simulate this, I have strange parts, where the clock of domain sync seems to pause,
but at the same time a counter in that domain seems to speed up:
What is going on here? Am I using the simulator in a wrong way, or is this a bug in the simulator?
The text was updated successfully, but these errors were encountered: