Skip to content

Commit

Permalink
Merge pull request #244 from XavierAubert/cv32e40p/dev_dd_pgo
Browse files Browse the repository at this point in the history
Added new test cases to improve RTL code coverage.
  • Loading branch information
pascalgouedo authored May 2, 2024
2 parents 923abbb + 998eb34 commit 82ddb22
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define TEST_FAIL 1
#define VIRT_PERIPH_STATUS_FLAG_ADDR 0x20000000

#define EXPECTED_ILLEGAL_INSTRUCTIONS 31741
#define EXPECTED_ILLEGAL_INSTRUCTIONS 31751

main:
li t0, (0x1 << 3)
Expand Down Expand Up @@ -31770,6 +31770,21 @@ main:
.word(0x0151dfd3)
.word(0xadf06543)
.word(0xadf05543)
csrwi frm, 4
.word(0xadf05543)
.word(0x0151dfd3)
csrwi frm, 3
.word(0x0151dfd3)
.word(0xadf05543)
csrwi frm, 2
.word(0x0151dfd3)
.word(0xadf05543)
csrwi frm, 1
.word(0x0151dfd3)
.word(0xadf05543)
csrwi frm, 0
.word(0x0151dfd3)
.word(0xadf05543)

li x18, TEST_PASS
li x16, EXPECTED_ILLEGAL_INSTRUCTIONS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3695,9 +3695,19 @@ _fsgnjx_jr31: fsgnjx.s x31, x31, x31
# for uvme_cv32e40p_fp_instr_covg/cg_f_inst_reg/cr_non_rv32f_rd_rv32f_rs1 - end
######### FOR PULP_FPU CFG - END #########

li x18, TEST_PASS
######### Added for ex_stage hole coverage #########
la x1, test_end
li x2, 1
fcvt.s.w x2, x2

fdiv.s x3, x1, x2
div x4, x5, x0
jalr x0, x3, 0
######### End for ex_stage hole coverage #########

test_end:
li x18, TEST_PASS

li x17, VIRT_PERIPH_STATUS_FLAG_ADDR
sw x18,0(x17)
j _exit
Expand Down

0 comments on commit 82ddb22

Please sign in to comment.