mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 18:25:27 +00:00
Fixed bugs with CSR checking. The parsing algorithm was messing up the token order after the CSR token.
This commit is contained in:
parent
a1c26a16d6
commit
492b6f0ea4
@ -210,12 +210,19 @@ module testbench();
|
|||||||
|
|
||||||
MarkerIndex += 4;
|
MarkerIndex += 4;
|
||||||
|
|
||||||
// parse CSRs
|
// parse CSRs, because there are 1 or more CSRs after the CSR token
|
||||||
|
// we check if the CSR token or the number of CSRs is greater than 0.
|
||||||
|
// if so then we want to parse for a CSR.
|
||||||
end else if(ExpectedTokens[MarkerIndex] == "CSR" || NumCSRM > 0) begin
|
end else if(ExpectedTokens[MarkerIndex] == "CSR" || NumCSRM > 0) begin
|
||||||
|
if(ExpectedTokens[MarkerIndex] == "CSR") begin
|
||||||
|
// all additional CSR's won't have this token.
|
||||||
MarkerIndex++;
|
MarkerIndex++;
|
||||||
|
end
|
||||||
matchCount = $sscanf(ExpectedTokens[MarkerIndex], "%s", ExpectedCSRArrayM[NumCSRM]);
|
matchCount = $sscanf(ExpectedTokens[MarkerIndex], "%s", ExpectedCSRArrayM[NumCSRM]);
|
||||||
matchCount = $sscanf(ExpectedTokens[MarkerIndex+1], "%x", ExpectedCSRArrayValueM[NumCSRM]);
|
matchCount = $sscanf(ExpectedTokens[MarkerIndex+1], "%x", ExpectedCSRArrayValueM[NumCSRM]);
|
||||||
|
|
||||||
|
MarkerIndex += 2;
|
||||||
|
|
||||||
// if we get an xcause with the interrupt bit set we must generate an interrupt as interrupts
|
// if we get an xcause with the interrupt bit set we must generate an interrupt as interrupts
|
||||||
// are imprecise. Forcing the trap at this time will allow wally to track what qemu does.
|
// are imprecise. Forcing the trap at this time will allow wally to track what qemu does.
|
||||||
// the msb of xcause will be set.
|
// the msb of xcause will be set.
|
||||||
|
Loading…
Reference in New Issue
Block a user