Conversation
There was a problem hiding this comment.
@rgiunti the PR looks good to me. Do we need to also push the .do file ?
There was a problem hiding this comment.
Hi @Navaneeth-KunhiPurayil, thank you for your review. I've rebased the PR and removed the .do file
There was a problem hiding this comment.
Hi @Navaneeth-KunhiPurayil, @anga93. Now it seems that the CI is failing for some reason but I can't access the GitLab ETH pipeline with my credentials to see where is the error. Can you help me to understand which is the problem or to provide me access to the pipeline if it's possible?
There was a problem hiding this comment.
@rgiunti I am currently looking into it as well, but basically there is an issue in the 32b config of Spatz where these indexed memory operations fail.
There was a problem hiding this comment.
Fixed the issue in this branch - fix with CI passing.
7fa78e8 to
885c1cc
Compare
Problem
In spatz_vlsu.sv, the data_index_width_diff signal express the relationship between data and index width when performing an indexed load or store instruction:
and it has a key role for the computation of the address offset:
since word_index is defined as:
This approach works only when the width of the data represented by mem_spatz_req.vtype.vsew is greater than or equal to mem_spatz_req.op_mem.ew which express the width of the indexes. Both are of type:
This means that the whole address generation fails for a test like the following one reported in vloxei.c in which this condition is not respected:
This happens because data_index_width_diff is defined as unsigned so, following the TEST_CASE3 example, we get:
which of course corrupts all the following computations for the address generation.
Proposed solution
In order to solve this issue, the proposed solution consists in redefining data_index_width_diff signal as a signed number:
in this way the word_index signal computation must be reinterpreted depending on the sign of data_index_width_diff:
In this way, when data_index_width_diff < 0, since it is impossible to make a shift of a negative quantity, all the shift operations of the original word_index computation have been reversed as well as the sign of data_index_width_diff to maintain mathematical coherence with the original operation.
Results
Test cases in vloxei.c and vsuxei.c have been used in order to observe the failures due to the bug before the modifications and verify the correctness of the results after them.