-
Notifications
You must be signed in to change notification settings - Fork 544
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
Wires driven through virtual interface traced improperly #5044
Comments
Sure, I'm happy to look further into the issue and hopefully come up with a fix / implement the missing feature. |
I'm still figuring my way around the large codebase, but I was able to get the trace to work without I suppose the easiest solution would be to just make any interface signal be ACTIVITY_ALWAYS (which then should also propagate to the signals driven by that interface). I believe that this is also what happens when the interface is driven directly, but I might be wrong about that. |
ACTIVITY_ALWAYS is expensive so best avoided unless we have no alternative. Perhaps the activityCode isn't getting tracked and set in the interface? |
Yes, I noticed in the sample code that during the trace pass, the activity vertices for the signals |
Tracing method calls makes sense. The complication is there can be multiple possible virtual methods called, so the code will need to consider all of the possibilities. |
If there is an interface and a class that uses this interface to drive wires, the driven wires remain at the same level throughout the simulation in the trace (though they seem to be simulated correctly).
To reproduce, compile the following code with
verilator --trace --exe --build -j `nproc` --binary signal_driver.sv -o signal_driver
(using the git master version):Viewing the VCD file will show both
s
andi.signal
as logic low throughout the simulation, even though the$display
statements reflect the signal changing.I also noticed that if the interface is at any point driven from outside of the class, the wire(s) will be traced correctly (remove the
//
beforei.signal = 1;
to reproduce).Without driving the interface directly:
With driving the interface directly.
Comparing the verilated result with and without the
i.signal = 1;
line yields a large number of differences: verilated_diff.patchOne possible point of interest is that the file
Vsignal_driver___024root__DepSet_hee9ce67b__0__Slow.cpp
is generated, but not included anywhere in the rest of the files in the erroneous verilated files.The text was updated successfully, but these errors were encountered: