-
Notifications
You must be signed in to change notification settings - Fork 277
ExceptionsZicboU/S and ExceptionsF #811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: act4
Are you sure you want to change the base?
Changes from all commits
be30a8f
e827f3c
e5a6c94
40b7deb
4e2b50a
f99be09
0e4a43f
ff03dc4
0166226
195faba
ad558cc
e8ae97f
65ded66
34c0c22
fd46b97
d6048b9
acee092
7ee15af
d9b9823
b390655
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,25 +35,6 @@ covergroup ExceptionsF_exceptions_cg with function sample(ins_t ins); | |
| bins legal_frm = {3'b000, 3'b001, 3'b010, 3'b011, 3'b100}; | ||
| } | ||
| instrs: coverpoint ins.current.insn { | ||
| wildcard bins fsw = {32'b????????????_?????_010_?????_0100111}; | ||
| wildcard bins flw = {32'b????????????_?????_010_?????_0000111}; | ||
| wildcard bins fadd = {32'b00000_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fsub = {32'b00001_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fmul = {32'b00010_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fdiv = {32'b00011_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fcvt_x_f = {32'b11000_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fcvt_f_x = {32'b11010_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fcvt_f_f = {32'b01000_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fmadd = {32'b?????_??_?????_?????_???_?????_1000011}; | ||
| wildcard bins fsqrt = {32'b01011_??_00000_?????_???_?????_1010011}; | ||
| wildcard bins fsgnj = {32'b00100_??_?????_?????_000_?????_1010011}; | ||
| wildcard bins feq = {32'b10100_??_?????_?????_010_?????_1010011}; | ||
| wildcard bins fmv_x_f = {32'b11100_??_00000_?????_000_?????_1010011}; | ||
| wildcard bins fmv_f_x = {32'b11110_??_00000_?????_000_?????_1010011}; | ||
| wildcard bins fclass = {32'b11100_??_00000_?????_001_?????_1010011}; | ||
| wildcard bins fmin = {32'b00101_??_?????_?????_000_?????_1010011}; | ||
| wildcard bins fli = {32'b11110_??_00001_?????_000_?????_1010011}; | ||
| wildcard bins fround = {32'b01000_??_00100_?????_???_?????_1010011}; | ||
| wildcard bins csrrw_fcsr = {32'b000000000011_?????_001_?????_1110011}; | ||
| wildcard bins csrrw_frm = {32'b000000000010_?????_001_?????_1110011}; | ||
| wildcard bins csrrw_fflags = {32'b000000000001_?????_001_?????_1110011}; | ||
|
|
@@ -63,23 +44,56 @@ covergroup ExceptionsF_exceptions_cg with function sample(ins_t ins); | |
| wildcard bins csrrc_fcsr = {32'b000000000011_?????_011_?????_1110011}; | ||
| wildcard bins csrrc_frm = {32'b000000000010_?????_011_?????_1110011}; | ||
| wildcard bins csrrc_fflags = {32'b000000000001_?????_011_?????_1110011}; | ||
| `ifdef F_SUPPORTED | ||
| wildcard bins fsw = {32'b????????????_?????_010_?????_0100111}; | ||
| wildcard bins flw = {32'b????????????_?????_010_?????_0000111}; | ||
| wildcard bins fadd = {32'b00000_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fsub = {32'b00001_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fmul = {32'b00010_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fdiv = {32'b00011_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fcvt_x_f = {32'b11000_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fcvt_f_x = {32'b11010_??_?????_?????_???_?????_1010011}; | ||
| wildcard bins fmadd = {32'b?????_??_?????_?????_???_?????_1000011}; | ||
| wildcard bins fsqrt = {32'b01011_??_00000_?????_???_?????_1010011}; | ||
| wildcard bins fsgnj = {32'b00100_??_?????_?????_000_?????_1010011}; | ||
| wildcard bins feq = {32'b10100_??_?????_?????_010_?????_1010011}; | ||
| wildcard bins fmv_x_f = {32'b11100_??_00000_?????_000_?????_1010011}; | ||
| wildcard bins fmv_f_x = {32'b11110_??_00000_?????_000_?????_1010011}; | ||
| wildcard bins fclass = {32'b11100_??_00000_?????_001_?????_1010011}; | ||
| wildcard bins fmin = {32'b00101_??_?????_?????_000_?????_1010011}; | ||
| `ifdef D_SUPPORTED | ||
| wildcard bins fcvt_f_f = {32'b01000_??_?????_?????_???_?????_1010011}; | ||
| `endif | ||
| `endif | ||
| `ifdef ZFA_SUPPORTED | ||
| wildcard bins fli = {32'b11110_??_00001_?????_000_?????_1010011}; | ||
| wildcard bins fround = {32'b01000_??_00100_?????_???_?????_1010011}; | ||
| `endif | ||
| `ifdef XLEN32 | ||
| wildcard bins fmvh = {32'b1110001_00001_?????_000_?????_1010011}; | ||
| wildcard bins fmvp = {32'b1011001_?????_?????_000_?????_1010011}; | ||
| `ifdef D_SUPPORTED | ||
| wildcard bins fmvh = {32'b1110001_00001_?????_000_?????_1010011}; | ||
| wildcard bins fmvp = {32'b1011001_?????_?????_000_?????_1010011}; | ||
| `endif | ||
| `endif | ||
| } | ||
|
|
||
| instrs_dynrm: coverpoint ins.current.insn { | ||
| wildcard bins fadd = {32'b00000_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fsub = {32'b00001_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fmul = {32'b00010_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fdiv = {32'b00011_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fcvt_x_f = {32'b11000_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fcvt_f_x = {32'b11010_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fcvt_f_f = {32'b01000_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fmadd = {32'b?????_??_?????_?????_111_?????_1000011}; | ||
| wildcard bins fsqrt = {32'b01011_??_00000_?????_111_?????_1010011}; | ||
| wildcard bins fround = {32'b01000_??_00100_?????_111_?????_1010011}; | ||
| `ifdef F_SUPPORTED | ||
| wildcard bins fadd = {32'b00000_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fsub = {32'b00001_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fmul = {32'b00010_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fdiv = {32'b00011_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fcvt_x_f = {32'b11000_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fcvt_f_x = {32'b11010_??_?????_?????_111_?????_1010011}; | ||
| wildcard bins fmadd = {32'b?????_??_?????_?????_111_?????_1000011}; | ||
| wildcard bins fsqrt = {32'b01011_??_00000_?????_111_?????_1010011}; | ||
| `ifdef D_SUPPORTED | ||
| wildcard bins fcvt_f_f = {32'b01000_??_?????_?????_111_?????_1010011}; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an interesting one. It should probably be tested if D or Zfhmin is supported, not just D. |
||
| `endif | ||
| `endif | ||
| `ifdef ZFA_SUPPORTED | ||
| wildcard bins fround = {32'b01000_??_00100_?????_111_?????_1010011}; | ||
| `endif | ||
| } | ||
| // main coverpoints | ||
| cp_mstatus_fs_illegal_instr: cross instrs, mstatus_FS_zero; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,14 +17,20 @@ covergroup ExceptionsZicboS_exceptions_cg with function sample(ins_t ins); | |
|
|
||
| // building blocks for the main coverpoints | ||
| cbo_inval: coverpoint ins.current.insn { | ||
| wildcard bins cbo_inval = {32'b000000000000_?????_010_00000_0001111}; | ||
| `ifdef ZICBOM_SUPPORTED | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn’t this ifdef need to go around the entire coverpoint, not just the bins? I think right now this will create a coverpoint with bins for all possible combinations of a 32 bit instruction when Zicbom is not supported. This applies to several coverpoints in this file. |
||
| wildcard bins cbo_inval = {32'b000000000000_?????_010_00000_0001111}; | ||
| `endif | ||
| } | ||
| cbo_flushclean: coverpoint ins.current.insn { | ||
| wildcard bins cbo_flush = {32'b000000000010_?????_010_00000_0001111}; | ||
| wildcard bins cbo_clean = {32'b000000000001_?????_010_00000_0001111}; | ||
| `ifdef ZICBOM_SUPPORTED | ||
| wildcard bins cbo_flush = {32'b000000000010_?????_010_00000_0001111}; | ||
| wildcard bins cbo_clean = {32'b000000000001_?????_010_00000_0001111}; | ||
| `endif | ||
| } | ||
| cbo_zero: coverpoint ins.current.insn { | ||
| wildcard bins cbo_zero = {32'b000000000100_?????_010_00000_0001111}; | ||
| `ifdef ZICBOZ_SUPPORTED | ||
| wildcard bins cbo_zero = {32'b000000000100_?????_010_00000_0001111}; | ||
| `endif | ||
| } | ||
| menvcfg_cbie: coverpoint ins.current.csr[12'h30A][5:4] { | ||
| ignore_bins reserved = {2'b10}; | ||
|
|
@@ -41,6 +47,9 @@ covergroup ExceptionsZicboS_exceptions_cg with function sample(ins_t ins); | |
| senvcfg_cbze: coverpoint ins.current.csr[12'h10A][7] { | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
| // main coverpoints | ||
| cp_cbie: cross cbo_inval, menvcfg_cbie, senvcfg_cbie, priv_mode_m_s_u; | ||
| cp_cbcfe: cross cbo_flushclean, menvcfg_cbcfe, senvcfg_cbcfe, priv_mode_m_s_u; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would ExceptionsF ever be run without F supported? Drop all of the ifdef F_SUPPORTED in both the coverpoints and the test.