Restored instead of in testbench because prevents coverage analysis. Improved FPU coverage

This commit is contained in:
David Harris 2024-02-07 06:27:53 -08:00
parent 5bde0db64b
commit e7364290e3
3 changed files with 22 additions and 11 deletions

View File

@ -237,11 +237,10 @@ module fctrl import cvw::*; #(parameter cvw_t P) (
5'b00010: ControlsD = `FCTRLW'b0_1_01_00_011_0_0_1_0; // fcvt.l.q q->l
5'b00011: ControlsD = `FCTRLW'b0_1_01_00_010_0_0_1_0; // fcvt.lu.q q->lu
endcase
// coverage on
// coverage off
// Not covered in testing because rv64gc is not RV64Q or RV32D
7'b1011001: if (P.ZFA_SUPPORTED & P.XLEN == 32 & P.D_SUPPORTED & Funct3D == 3'b000)
ControlsD = `FCTRLW'b1_0_01_00_101_0_0_0_0; // fmvp.d.x (Zfa) *** untested, controls could be wrong
// Not covered in testing because rv64gc does not support quad precision
// coverage off
7'b1011011: if (P.ZFA_SUPPORTED & P.XLEN == 64 & P.Q_SUPPORTED & Funct3D == 3'b000)
ControlsD = `FCTRLW'b1_0_01_00_101_0_0_0_0; // fmvp.q.x (Zfa)
// coverage on

View File

@ -310,7 +310,7 @@ module testbench;
if (TEST == "coremark")
if (dut.core.priv.priv.EcallFaultM) begin
$display("Benchmark: coremark is done.");
$finish;
$stop;
end
if(Validate) begin
if (TEST == "embench") begin
@ -347,7 +347,7 @@ module testbench;
if (test == tests.size()) begin
if (totalerrors == 0) $display("SUCCESS! All tests ran without failures.");
else $display("FAIL: %d test programs had errors", totalerrors);
$finish;
$stop; // if this is changed to $finish, wally-batch.do does not go to the next step to run coverage
end
end
end
@ -631,7 +631,7 @@ module testbench;
errors = errors+1;
$display(" Error on test %s result %d: adr = %h sim (D$) %h sim (DTIM_SUPPORTED) = %h, signature = %h",
TestName, i, (testadr+i)*(P.XLEN/8), testbench.DCacheFlushFSM.ShadowRAM[testadr+i], sig, signature[i]);
$finish;
$stop; // if this is changed to $finish, wally-batch.do does not get to the next step to run coverage
end
end
if (errors) $display("%s failed with %d errors. :(", TestName, errors);

View File

@ -40,12 +40,24 @@ main:
# zfa instructions (because Zfa tests aren't running yet)
fli.d fs0, 16
fcvtmod.w.d t0, fs0, rtz
fminm.d fs1, fs0, fs0
fmaxm.d fs1, fs0, fs0
fround.d fs1, fs0
# fminm.d fs1, fs0, fs0
# fmaxm.d fs1, fs0, fs0
# fltq.d t0, fs1, ft0
# fleq.d t0, fs1, ft0
fcvt.d.q fs1, fs0
fcvt.h.q fs1, fs0
fcvt.s.q fs1, fs0
# round for now because these tests are excluded from Zfa until rounding is implemented
fround.s fs1, fs0
froundnx.s fs1, fs0
fround.d fs1, fs0
froundnx.d fs1, fs0
fltq.d t0, fs1, ft0
fleq.d t0, fs1, ft0
fround.h fs1, fs0
froundnx.h fs1, fs0
fround.s fs1, fs0
froundnx.s fs1, fs0
fmvp.d.x
#Result Sign Test Coverage
la t0, TestData2