-
Notifications
You must be signed in to change notification settings - Fork 50
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
[XIF] Redundant mem_result when using CORE-V-XIF #800
Comments
thx @davidmallasen , pinging @silabs-oysteink and @Silabs-ArjanB |
Hello @davidmallasen Thank you very much for filing this issue. It looks like an RTL bug indeed. Unfortuantely the vcd file does not seem to actually contain data for the cv32e40x_core_i scope and below: Is it possible for you to generate a new vcd tracing all signals below that scope? Best regards, |
Hello @Silabs-ArjanB |
Using GTKWave I can now see the waves. Thanks for mentioning that tool. Is it possible to see if_xif.cpu_mem_result xif_mem_result_if as well in the load store unit or is there a limitation on viewing System Verilog interfaces? |
That may be a limitation on the SV interfaces, I can't see it either |
Hi @davidmallasen I see what is going wrong in the RTL. Basically the WB stage is not applying back pressure to the load store unit if the WB stage is waiting for the result of an offloaded XIF instruction. The issue is similar to (or maybe even the same as) #653. Will discuss internally when we can fix this. |
Great, thanks @Silabs-ArjanB ! |
hi @Silabs-ArjanB - it seems you commented without text :D |
Yes, just a screenshot of the relevant signals as a reminder to myself |
@davidmallasen Are you blocked by this? |
Yes, it's not allowing me to continue with my work |
Note that #825 was closed but its proposed fix has not been merged yet |
Correct, the closing of the PR was an unintended side-effect, sorry about that @Silabs-ArjanB |
Redundant mem_result when using CORE-V-XIF
Component
Issues in the RTL
Steps to Reproduce
Git hash: v0.8.0 974ca46
Hello,
I'm using CV32E40X inside X-HEEP together with a coprocessor that interacts with XIF. Through the XIF I'm receiving a redundant mem result from the CV32E40X that I believe should not be there. I'm not sure if it's a problem from my side or from the CV32E40X, but checking the waveforms I see everything correct from the coprocessor side (as I understand it).
I'm running the following snippet of code, where
plw
can be read as a normal lw but to an external register file in the coprocessor, andpeq
are equal operations between registers of this external RF that should write back a 0 or 1 to the GPRF of CV32E40X:I atttach a screenshot of the waveform of the XIF signals:
The first 3
issue_ready
-issue_valid
handshake signals are for the 3plw
, and the next 3 are for the 3peq
. They are all signaled acommit_kill = 0
, so the coprocessor initiates memory retrievals of theplw
instructions with the 3mem_valid
-mem_ready
handshakes. CV32E40X replies correctly through themem_result
interface, but after a while (right after the 3peq
instructions are executed and signaled via theresult
interface. There is an extramem_result_valid
where the yellow cursor is (identical to the last one) that should not be there, as there is no 4th mem request.The output of the above program is:
Where the last 3 ones should be 0 1 1.
I also attach a VCD dump of this execution.
waveform.vcd.zip
If it helps, this only happens with operations that end up writing back to the GPRF. Other snippets of code such as the following, work correctly.
Thanks!
David
The text was updated successfully, but these errors were encountered: