-
Notifications
You must be signed in to change notification settings - Fork 177
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
Python simulator hangs or throws when trying to drive reset from testbench #566
Comments
This part is a duplicate of #415. |
In |
|
Yes. Please see #415 for a workaround. |
Also, when I wrote the code I looked it up in the source code and both the docstring and the source code seemed to suggest that passing the domain would be an option (Simulator.py):
|
Hm, you're right. I will look into it. |
Sorry, I was wrong about this--you can indeed pass a domain object, and it works just fine.
The issue with this approach is that you end up with two different clock domains called "sync" in the simulation; one automatically added by nMigen when you pass your DUT to the simulator (since the DUT does not itself define a "sync" domain), and another explicitly created by you. To avoid this, add a wrapper:
This causes the same error as your first approach, since it's functionally identical to it. |
I've added a warning to cover the issue in your second approach. It now shows:
I consider the issue with the first approach a duplicate of #415. |
Thank you so much for looking into this! 🙏 |
I just learned that nmigen handles reset automatically, so in a simple module, I pulled out my own reset logic and tried
to use the reset logic from the clock domain. That does not seem to be a problem for verilog generation,
but for the python simulator I tried two approaches, and both failed:
reset-sim-hangs.tar.gz
The text was updated successfully, but these errors were encountered: