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
make setimmediatevalue immediately set #3825
base: master
Are you sure you want to change the base?
Conversation
So this breaks
The test seems right to me and I think this PR makes
|
Add a test that creates a new task waiting on |
Thanks @marlonjames . Also, it's not just an icarus problem. Xcelium also gives me |
I believe the latest commit addresses the reentrancy problem (at least it fixes my test for icarus and xcelium). I can split that off into another PR if desired or keep it here. Still need to dig into why |
Scratch that ^ it's |
It probably makes sense to move the re-entrancy handling to a different PR. |
Sounds good. I'd like to keep them combined for now because I need the The 768 tests are correctly applying the value to I'll see if I can figure out what the difference is, but wanted to post here to see if this sounded familiar to anyone. |
It may have to do with which simulation region of the timestep the |
We would definitely want to handle the immediate callback issue at the GPI implementation level (or even push the fix to the simulator if possible) and not in the Python wrapper. So I'm all for deferring that fix for another PR. |
I lied. I can make the |
Alright. So there's a bunch of things going on here. Issue 768I would posit that steveicarus/iverilog#1111 was the real problem with #768 all along. Let's see what the Icarus folks say and if / how quickly they can get a fix out. But I don't think we ever should have needed VPI reentranceProtection against different threads calling back is a good call. We should protect access to the deferred list with a mutex. Re: moving it to the GPI, I think I could put this in test_writes_have_taken_effect_after_readwriteI think when |
Answer: zero time. It was already fixed. If I re-run the |
I ran |
We're talking about setimmediate, after all. |
Putting values in VHPI and FLI are always inertial, so |
This doesn't work. Even |
After further investigation I'm leaning more towards not using Currently This will also defer applications of |
I'm actually fine with this approach. It just needs to pass :) |
I'll revise this once #3875 lands. Really wish GitHub allowed stacked PRs . . . |
@toddstrader you could rebase onto my branch and just write "depends on #3875". We don't don't do merge commits here so, you might need to rebase if that other commit changes a bunch. |
See: #1024
Currently
vpiInertialDelay
preventssetimmediatevalue()
from immediately setting a value. This attempts to fix that, but honestly raises more questions in my mind. Namely that the VHPI and FLI interfaces don't seem to have a notion analogous tovpiIntertialDelay
. So I'm once again wondering if we really want that for the VPI? It seems odd that putting a value would be incongruous like that between the different GPI impls.In any case, I'm positive that
setimmediatevalue()
should set immediately andtest_assign_immediate
attempts to lock that in.