Remove mcountinhibit from csr_test and UVM env (#1863)

This commit is contained in:
Jalali 2024-02-21 18:13:57 +00:00 committed by GitHub
parent 71f57a38c2
commit 9c4a3c37d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1 additions and 182 deletions

View file

@ -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
@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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