forked from Github_Repos/cvw
Merge pull request #180 from infinitymdm/main
Remove some fpu/fctrl test cases from coverage statistics
This commit is contained in:
commit
37d289cf44
@ -146,10 +146,13 @@ module fctrl (
|
|||||||
ControlsD = `FCTRLW'b1_0_01_00_000_0_0_0; // fcvt.s.(d/q/h)
|
ControlsD = `FCTRLW'b1_0_01_00_000_0_0_0; // fcvt.s.(d/q/h)
|
||||||
7'b0100001: if (Rs2D[4:2] == 3'b000 & SupportedFmt2 & Rs2D[1:0] != 2'b01)
|
7'b0100001: if (Rs2D[4:2] == 3'b000 & SupportedFmt2 & Rs2D[1:0] != 2'b01)
|
||||||
ControlsD = `FCTRLW'b1_0_01_00_001_0_0_0; // fcvt.d.(s/h/q)
|
ControlsD = `FCTRLW'b1_0_01_00_001_0_0_0; // fcvt.d.(s/h/q)
|
||||||
|
// coverage off
|
||||||
|
// Not covered in testing because rv64gc does not support half or quad precision
|
||||||
7'b0100010: if (Rs2D[4:2] == 3'b000 & SupportedFmt2 & Rs2D[1:0] != 2'b10)
|
7'b0100010: if (Rs2D[4:2] == 3'b000 & SupportedFmt2 & Rs2D[1:0] != 2'b10)
|
||||||
ControlsD = `FCTRLW'b1_0_01_00_010_0_0_0; // fcvt.h.(s/d/q)
|
ControlsD = `FCTRLW'b1_0_01_00_010_0_0_0; // fcvt.h.(s/d/q)
|
||||||
7'b0100011: if (Rs2D[4:2] == 3'b000 & SupportedFmt2 & Rs2D[1:0] != 2'b11)
|
7'b0100011: if (Rs2D[4:2] == 3'b000 & SupportedFmt2 & Rs2D[1:0] != 2'b11)
|
||||||
ControlsD = `FCTRLW'b1_0_01_00_011_0_0_0; // fcvt.q.(s/h/d)
|
ControlsD = `FCTRLW'b1_0_01_00_011_0_0_0; // fcvt.q.(s/h/d)
|
||||||
|
// coverage on
|
||||||
7'b1101000: case(Rs2D)
|
7'b1101000: case(Rs2D)
|
||||||
5'b00000: ControlsD = `FCTRLW'b1_0_01_00_101_0_0_0; // fcvt.s.w w->s
|
5'b00000: ControlsD = `FCTRLW'b1_0_01_00_101_0_0_0; // fcvt.s.w w->s
|
||||||
5'b00001: ControlsD = `FCTRLW'b1_0_01_00_100_0_0_0; // fcvt.s.wu wu->s
|
5'b00001: ControlsD = `FCTRLW'b1_0_01_00_100_0_0_0; // fcvt.s.wu wu->s
|
||||||
@ -174,6 +177,8 @@ module fctrl (
|
|||||||
5'b00010: ControlsD = `FCTRLW'b0_1_01_00_011_0_0_1; // fcvt.l.d d->l
|
5'b00010: ControlsD = `FCTRLW'b0_1_01_00_011_0_0_1; // fcvt.l.d d->l
|
||||||
5'b00011: ControlsD = `FCTRLW'b0_1_01_00_010_0_0_1; // fcvt.lu.d d->lu
|
5'b00011: ControlsD = `FCTRLW'b0_1_01_00_010_0_0_1; // fcvt.lu.d d->lu
|
||||||
endcase
|
endcase
|
||||||
|
// coverage off
|
||||||
|
// Not covered in testing because rv64gc does not support half or quad precision
|
||||||
7'b1101010: case(Rs2D)
|
7'b1101010: case(Rs2D)
|
||||||
5'b00000: ControlsD = `FCTRLW'b1_0_01_00_101_0_0_0; // fcvt.h.w w->h
|
5'b00000: ControlsD = `FCTRLW'b1_0_01_00_101_0_0_0; // fcvt.h.w w->h
|
||||||
5'b00001: ControlsD = `FCTRLW'b1_0_01_00_100_0_0_0; // fcvt.h.wu wu->h
|
5'b00001: ControlsD = `FCTRLW'b1_0_01_00_100_0_0_0; // fcvt.h.wu wu->h
|
||||||
@ -198,7 +203,7 @@ module fctrl (
|
|||||||
5'b00010: ControlsD = `FCTRLW'b0_1_01_00_011_0_0_1; // fcvt.l.q q->l
|
5'b00010: ControlsD = `FCTRLW'b0_1_01_00_011_0_0_1; // fcvt.l.q q->l
|
||||||
5'b00011: ControlsD = `FCTRLW'b0_1_01_00_010_0_0_1; // fcvt.lu.q q->lu
|
5'b00011: ControlsD = `FCTRLW'b0_1_01_00_010_0_0_1; // fcvt.lu.q q->lu
|
||||||
endcase
|
endcase
|
||||||
|
// coverage on
|
||||||
endcase
|
endcase
|
||||||
endcase
|
endcase
|
||||||
end
|
end
|
||||||
@ -329,4 +334,4 @@ module fctrl (
|
|||||||
{FRegWriteM, FResSelM, FCvtIntM},
|
{FRegWriteM, FResSelM, FCvtIntM},
|
||||||
{FRegWriteW, FResSelW, FCvtIntW});
|
{FRegWriteW, FResSelW, FCvtIntW});
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
main:
|
main:
|
||||||
|
|
||||||
bseti t0, zero, 14 # turn on FPU
|
#bseti t0, zero, 14 # turn on FPU
|
||||||
csrs mstatus, t0
|
csrs mstatus, t0
|
||||||
|
|
||||||
# Test legal instructions not covered elsewhere
|
# Test legal instructions not covered elsewhere
|
||||||
@ -36,6 +36,8 @@ main:
|
|||||||
flh ft0, 8(a0)
|
flh ft0, 8(a0)
|
||||||
fsq ft0, 0(a0)
|
fsq ft0, 0(a0)
|
||||||
fsh ft0, 8(a0)
|
fsh ft0, 8(a0)
|
||||||
|
|
||||||
|
# Tests for fpu/fctrl.sv
|
||||||
fcvt.h.s ft1, ft0
|
fcvt.h.s ft1, ft0
|
||||||
fcvt.q.s ft2, ft0
|
fcvt.q.s ft2, ft0
|
||||||
fcvt.h.w ft3, a0
|
fcvt.h.w ft3, a0
|
||||||
@ -55,7 +57,6 @@ main:
|
|||||||
fcvt.l.q a0, ft3
|
fcvt.l.q a0, ft3
|
||||||
fcvt.lu.q a0, ft3
|
fcvt.lu.q a0, ft3
|
||||||
|
|
||||||
|
|
||||||
# Test illegal instructions are detected
|
# Test illegal instructions are detected
|
||||||
.word 0x00000007 // illegal floating-point load (bad Funct3)
|
.word 0x00000007 // illegal floating-point load (bad Funct3)
|
||||||
.word 0x00000027 // illegal floating-point store (bad Funct3)
|
.word 0x00000027 // illegal floating-point store (bad Funct3)
|
||||||
|
Loading…
Reference in New Issue
Block a user