Skip to content
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

MTVAL : Remove MTVAL CSR from CVA6 UVM environment #1788

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions verif/env/uvme/reg/cva6_csr_reg_file.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2590,8 +2590,7 @@ class reg_mtval extends csr_reg;
option.name = "csr_mtval__read_cg";
option.per_instance = 1;
mtval: coverpoint data[31:0] {
bins ZERO[] = {0};
bins other_values[3] = {[1:$]};
bins reset_value = {0};
}
endgroup

Expand Down
3 changes: 2 additions & 1 deletion verif/env/uvme/uvme_cva6_cfg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ function void uvme_cva6_cfg_c::set_unsupported_csr_mask();

super.set_unsupported_csr_mask();

// Remove unsupported CSRs for STEP1 configuration
// Remove unsupported CSRs for Embedded configuration
unsupported_csr_mask[uvma_core_cntrl_pkg::MCOUNTINHIBIT] = 1;
unsupported_csr_mask[uvma_core_cntrl_pkg::MTVAL] = 1;

endfunction : set_unsupported_csr_mask

Expand Down
48 changes: 0 additions & 48 deletions verif/tests/custom/csr_embedded/csrcs_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -1404,54 +1404,6 @@ csrcs:
#MHPMCOUNTER13 read value
csrr x14, 0xb0d

##########################
#MTVAL testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'h0}
##########################
#MTVAL Write clear/set value 0x1f
li x3, 0xffffffe0
csrrc x14, 0x343, x3
li x3, 0x1f
csrrs x14, 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0x0
li x3, 0xffffffff
csrrc x14, 0x343, x3
li x3, 0x0
csrrs x14, 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0x15
li x3, 0xffffffea
csrrc x14, 0x343, x3
li x3, 0x15
csrrs x14, 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0xa
li x3, 0xfffffff5
csrrc x14, 0x343, x3
li x3, 0xa
csrrs x14, 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0x0
li x3, 0xffffffff
csrrc x14, 0x343, x3
li x3, 0x0
csrrs x14, 0x343, x3

#MTVAL read value
csrr x14, 0x343

##########################
#MHPMCOUNTER8 testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'h1}
##########################
Expand Down
38 changes: 0 additions & 38 deletions verif/tests/custom/csr_embedded/csrcsi_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -2338,44 +2338,6 @@ csrcsi:
#MHPMCOUNTER17 read value
csrr x14, 0xb11

##########################
#MTVAL testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'h1a}
##########################
#MTVAL Write clear/set value 0x1f
csrrci x14, 0x343, 0x0
csrrsi x14, 0x343, 0x1f

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0x0
csrrci x14, 0x343, 0x1f
csrrsi x14, 0x343, 0x0

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0x15
csrrci x14, 0x343, 0xa
csrrsi x14, 0x343, 0x15

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0xa
csrrci x14, 0x343, 0x15
csrrsi x14, 0x343, 0xa

#MTVAL read value
csrr x14, 0x343

#MTVAL Write clear/set value 0x1a
csrrci x14, 0x343, 0x5
csrrsi x14, 0x343, 0x1a

#MTVAL read value
csrr x14, 0x343

##########################
#MHPMCOUNTERH6 testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'h8}
##########################
Expand Down
39 changes: 0 additions & 39 deletions verif/tests/custom/csr_embedded/csrrw_fields_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -5625,45 +5625,6 @@ csrrw_fields:
#MHPMCOUNTERH5 read value
csrr x14, 0xb85

##########################
#MTVAL fields testing W/R
##########################
#MTVAL.MTVAL testing W/R values '{'hffffffff, 'h0, 'h55555555, 'haaaaaaaa, 'h4cdadc42}
#MTVAL Write value 0xffffffff
li x3, 0xffffffff
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0x0
li x3, 0x0
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0x55555555
li x3, 0x55555555
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0xaaaaaaaa
li x3, 0xaaaaaaaa
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0x4cdadc42
li x3, 0x4cdadc42
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

##########################
#MHPMEVENT14 fields testing W/R
##########################
Expand Down
38 changes: 0 additions & 38 deletions verif/tests/custom/csr_embedded/csrrw_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -3488,44 +3488,6 @@ csrrw:
#MHPMEVENT24 read value
csrr x14, 0x338

##########################
#MTVAL testing W/R values '{'hffffffff, 'h0, 'h55555555, 'haaaaaaaa, 'hbec4a2c2}
##########################
#MTVAL Write value 0xffffffff
li x3, 0xffffffff
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0x0
li x3, 0x0
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0x55555555
li x3, 0x55555555
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0xaaaaaaaa
li x3, 0xaaaaaaaa
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

#MTVAL Write value 0xbec4a2c2
li x3, 0xbec4a2c2
csrw 0x343, x3

#MTVAL read value
csrr x14, 0x343

##########################
#MHPMCOUNTERH29 testing W/R values '{'hffffffff, 'h0, 'h55555555, 'haaaaaaaa, 'h91d85d53}
##########################
Expand Down
33 changes: 0 additions & 33 deletions verif/tests/custom/csr_embedded/csrrwi_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -3359,39 +3359,6 @@ csrrwi:
#MHPMEVENT9 read value
csrr x14, 0x329

##########################
#MTVAL testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'h4}
##########################
#MTVAL Write immediate value 0x1f
csrrwi x14, 0x343, 0x1f

#MTVAL read value
csrr x14, 0x343

#MTVAL Write immediate value 0x0
csrrwi x14, 0x343, 0x0

#MTVAL read value
csrr x14, 0x343

#MTVAL Write immediate value 0x15
csrrwi x14, 0x343, 0x15

#MTVAL read value
csrr x14, 0x343

#MTVAL Write immediate value 0xa
csrrwi x14, 0x343, 0xa

#MTVAL read value
csrr x14, 0x343

#MTVAL Write immediate value 0x4
csrrwi x14, 0x343, 0x4

#MTVAL read value
csrr x14, 0x343

##########################
#MCYCLEH testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'ha}
##########################
Expand Down
Loading