Skip to content

Commit

Permalink
Remove mcountinhibit from csr_test and UVM env (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
AyoubJalali authored Feb 21, 2024
1 parent 71f57a3 commit 9c4a3c3
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 182 deletions.
4 changes: 1 addition & 3 deletions verif/env/uvme/uvme_cva6_cfg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ function void uvme_cva6_cfg_c::set_unsupported_csr_mask();

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

// Add supported CSRs for Embedded configuration
for (int i = 0; i < MAX_NUM_HPMCOUNTERS; i++) begin
Expand All @@ -285,9 +286,6 @@ function void uvme_cva6_cfg_c::set_unsupported_csr_mask();
unsupported_csr_mask[uvma_core_cntrl_pkg::CYCLEH] = 0;
unsupported_csr_mask[uvma_core_cntrl_pkg::INSTRETH] = 0;

// Exist but only-read zero in embedded application
unsupported_csr_mask[uvma_core_cntrl_pkg::MCOUNTINHIBIT] = 0;

// Remove unsupported pmp CSRs
if (nr_pmp_entries == 0) begin
unsupported_csr_mask[uvma_core_cntrl_pkg::PMPCFG0+:16] = 16'hffff;
Expand Down
57 changes: 0 additions & 57 deletions verif/tests/custom/csr_embedded/csrcs_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -5840,61 +5840,4 @@ csrcs:
#MHPMEVENT20 read value
csrr x14, 0x334

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

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x0
li x3, 0xffffffff
csrrc x14, 0x320, x3
li x3, 0x0
csrrs x14, 0x320, x3

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x15
li x3, 0xffffffea
csrrc x14, 0x320, x3
li x3, 0x15
csrrs x14, 0x320, x3

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0xa
li x3, 0xfffffff5
csrrc x14, 0x320, x3
li x3, 0xa
csrrs x14, 0x320, x3

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x4
li x3, 0xfffffffb
csrrc x14, 0x320, x3
li x3, 0x4
csrrs x14, 0x320, x3

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x4
li x19, 0xfffffffb
csrrc x19, 0x320, x19
li x3, 0x4
csrrs x19, 0x320, x19

#MCOUNTINHBIT read value
csrr x14, 0x320

ret
45 changes: 0 additions & 45 deletions verif/tests/custom/csr_embedded/csrcsi_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -4630,49 +4630,4 @@ csrcsi:
#MHPMEVENT9 read value
csrr x14, 0x329

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

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x0
csrrci x14, 0x320, 0x1f
csrrsi x14, 0x320, 0x0

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x15
csrrci x14, 0x320, 0xa
csrrsi x14, 0x320, 0x15

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0xa
csrrci x14, 0x320, 0x15
csrrsi x14, 0x320, 0xa

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x6
csrrci x14, 0x320, 0x19
csrrsi x14, 0x320, 0x6

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write clear/set value 0x6
csrrci x0, 0x320, 0x19
csrrsi x0, 0x320, 0x6

#MCOUNTINHBIT read value
csrr x14, 0x320

ret
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 @@ -4630,42 +4630,4 @@ csrrw:
#MHPMCOUNTERH14 read value
csrr x14, 0xb8e

##########################
#MCOUNTINHBIT testing W/R values '{'hffffffff, 'h0, 'h55555555, 'haaaaaaaa, 'h9683580}
##########################
#MCOUNTINHBIT Write value 0xffffffff
li x3, 0xffffffff
csrw 0X320, x3

#MCOUNTINHBIT read value
csrr x14, 0X320

#MCOUNTINHBIT Write value 0x0
li x3, 0x0
csrw 0X320, x3

#MCOUNTINHBIT read value
csrr x14, 0X320

#MCOUNTINHBIT Write value 0x55555555
li x3, 0x55555555
csrw 0X320, x3

#MCOUNTINHBIT read value
csrr x14, 0X320

#MCOUNTINHBIT Write value 0xaaaaaaaa
li x3, 0xaaaaaaaa
csrw 0X320, x3

#MCOUNTINHBIT read value
csrr x14, 0X320

#MCOUNTINHBIT Write value 0x9683580
li x3, 0x9683580
csrw 0X320, x3

#MCOUNTINHBIT read value
csrr x14, 0X320

ret
39 changes: 0 additions & 39 deletions verif/tests/custom/csr_embedded/csrrwi_test.S
Original file line number Diff line number Diff line change
Expand Up @@ -4025,43 +4025,4 @@ csrrwi:
#MHPMEVENT31 read value
csrr x14, 0x33f

##########################
#MCOUNTINHBIT testing W/R values '{'h1f, 'h0, 'h15, 'ha, 'h1}
##########################
#MCOUNTINHBIT Write immediate value 0x1f
csrrwi x14, 0x320, 0x1f

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write immediate value 0x0
csrrwi x14, 0x320, 0x0

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write immediate value 0x15
csrrwi x14, 0x320, 0x15

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write immediate value 0xa
csrrwi x14, 0x320, 0xa

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write immediate value 0x1
csrrwi x14, 0x320, 0x1

#MCOUNTINHBIT read value
csrr x14, 0x320

#MCOUNTINHBIT Write immediate value 0x1
csrrwi x0, 0x320, 0x1

#MCOUNTINHBIT read value
csrr x14, 0x320

ret

0 comments on commit 9c4a3c3

Please sign in to comment.