mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 02:05:21 +00:00
Address Issue #541 where CVTINT or CMP in testfloat were not checked. The solution was to check inside the nested for loop. This was done to avoid issue related to the values changing between each cvtint or subsequent operation
This commit is contained in:
parent
d767237817
commit
79d7bb60ea
@ -964,12 +964,17 @@ module testbenchfp;
|
|||||||
|
|
||||||
// Testfloat outputs 800... for both the largest integer values for both positive and negitive numbers but
|
// Testfloat outputs 800... for both the largest integer values for both positive and negitive numbers but
|
||||||
// the riscv spec specifies 2^31-1 for positive values out of range and NaNs ie 7fff...
|
// the riscv spec specifies 2^31-1 for positive values out of range and NaNs ie 7fff...
|
||||||
else if ((UnitVal === `CVTINTUNIT) &
|
else if ( ((UnitVal === `CVTINTUNIT) | (UnitVal !== `CMPUNIT)) &
|
||||||
~((ResFlg === AnsFlg | AnsFlg === 5'bx))) begin
|
~((ResFlg === AnsFlg | AnsFlg === 5'bx)) ) begin
|
||||||
errors += 1;
|
// ResMatch checks the result as well. It is checked within the
|
||||||
$display("There is an error in %s", Tests[TestNum]);
|
// test to avoid issues related when the values change tests (e.g., f16_eq_rne -> f16_eq_rz)
|
||||||
$display("inputs: %h %h %h\nSrcA: %h\n Res: %h %h\n Ans: %h %h", X, Y, Z, SrcA, Res, ResFlg, Ans, AnsFlg);
|
if (~(ResMatch)) begin
|
||||||
$stop;
|
errors += 1;
|
||||||
|
$display("\nError in %s", Tests[TestNum]);
|
||||||
|
$display("TestNum %d OpCtrl %d", TestNum, OpCtrl[TestNum]);
|
||||||
|
$display("inputs: %h %h %h\nSrcA: %h\n Res: %h %h\n Ans: %h %h", X, Y, Z, SrcA, Res, ResFlg, Ans, AnsFlg);
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (TestVectors[VectorNum][0] === 1'bx & Tests[TestNum] !== "") begin // if reached the eof
|
if (TestVectors[VectorNum][0] === 1'bx & Tests[TestNum] !== "") begin // if reached the eof
|
||||||
|
Loading…
Reference in New Issue
Block a user