Skip to content

Commit 8d37af2

Browse files
committed
Update google_riscv-dv to chipsalliance/riscv-dv@59dcd8c
Update code from upstream repository https://github.com/google/riscv- dv to revision 59dcd8c813484eb6dcca67e7e36089fe772b9cc8 * Update scripts for Metrics CI regression: bug fixes, change ISS to spike in CI regression (Aimee Sutton) * Add illegal and load store instruction (aneels3) * Avoid generating hint instruction when RV32C is turned off (chipsalliance/riscv-dv#787) (taoliug) * Fix illegal opcode issue in the cov_test (chipsalliance/riscv-dv#786) (taoliug) * [questa] Remove -access=rwc from vlog command line arguments (Rupert Swarbrick) * [ci] temporarily disable CI flow (Udi Jonnalagadda) * fix issue with rcs for num_of_harts (aneels3) * fix multi-hart label issue (aneels3) * add multi_hart test (ishita71) * Fix minor issues (aneels3) * Add riscv_signature_pkg (aneels3) * add gen_signature_handshake (ishita71) * Add gen_interrupt_vector_table (aneels3) * Remove the unnecessary lines (Anil Sharma) * fix issue with riscv_rand_instr_test (aneels3) * Add multiprocessing code block (aneels3) Signed-off-by: Rupert Swarbrick <[email protected]>
1 parent 026db55 commit 8d37af2

28 files changed

+1235
-209
lines changed

vendor/google_riscv-dv.lock.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
upstream:
1010
{
1111
url: https://github.com/google/riscv-dv
12-
rev: 0b625258549e733082c12e5dc749f05aefb07d5a
12+
rev: 59dcd8c813484eb6dcca67e7e36089fe772b9cc8
1313
}
1414
}

vendor/google_riscv-dv/.github/workflows/metrics-regress.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ name: metrics-regress
77
on:
88
push:
99
branches: [ master ]
10-
pull_request:
11-
branches: [ master ]
10+
# pull_request_target:
11+
# branches: [ master ]
1212

1313
# If you fork this repository, you must create a new Metrics project for your fork
1414
# and set the environment variable $METRICS_PROJECT_ID accordingly
@@ -22,5 +22,6 @@ jobs:
2222
METRICS_CI_TOKEN: ${{ secrets.METRICS_CI_TOKEN }}
2323
METRICS_REGRESSION_NAME: riscv-dv_regression
2424
METRICS_PROJECT_ID: ${{ secrets.METRICS_PROJECT_ID }}
25+
PR_NUMBER: ${{ github.event.pull_request.number }}
2526
shell: bash
2627

vendor/google_riscv-dv/.metrics.json

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
{
2-
"variables": {
3-
"DSIM" : "${DSIM_HOME}/bin/dsim",
4-
"DSIM_LIB_PATH" : "${DSIM_HOME}/uvm-1.2/src/dpi",
5-
"RISCV_GCC" : "${RISCV_TOOLCHAIN}/bin/riscv-none-embed-gcc",
6-
"RISCV_OBJCOPY" : "${RISCV_TOOLCHAIN}/bin/riscv-none-embed-objcopy",
7-
"OVPSIM_PATH" : "/customer-tools/riscv-ovpsim/bin/Linux64"
8-
},
92
"builds": {
103
"list": [{
114
"name": "rv32imc",
12-
"image": "ibex-dsim-toolchain:latest",
5+
"image": "ibex-toolchain:v2",
136
"memory" : "1",
147
"cmd": "python3 run.py --test riscv_arithmetic_basic_test --simulator dsim --output out --verbose --co",
158
"wavesCmd": "python3 run.py --test riscv_arithmetic_basic_test --simulator dsim --output out --verbose --co"
@@ -27,8 +20,8 @@
2720
"name": "riscv_arithmetic_basic_test",
2821
"build": "rv32imc",
2922
"iterations": 2,
30-
"cmd": "cd /mux-flow/results; python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss ovpsim --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -fr <rootDir>/out/dsim",
31-
"wavesCmd": "python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss ovpsim --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -rf out/dsim",
23+
"cmd": "cd /mux-flow/results; python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss spike --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -fr <rootDir>/out/dsim",
24+
"wavesCmd": "python3 <rootDir>/run.py --test riscv_arithmetic_basic_test --seed <seed> --simulator dsim --iss spike --so --out <rootDir>/out --verbose; <rootDir>/scripts/check-status $?; rm -rf out/dsim",
3225
"logFile": "simulation.log",
3326
"metricsFile": "metrics.db",
3427
"isPass": "Test passed",

vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_compressed_instr.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,55 +30,55 @@ def __init__(self):
3030

3131
@vsc.constraint
3232
def rvc_csr_c(self):
33-
# Registers specified by the three-bit rs1, rs2, and rd
34-
with vsc.implies(self.format.inside(vsc.rangelist(riscv_instr_format_t.CIW_FORMAT,
33+
# Registers specified by the three-bit rs1, rs2, and rd
34+
with vsc.if_then(self.format.inside(vsc.rangelist(riscv_instr_format_t.CIW_FORMAT,
3535
riscv_instr_format_t.CL_FORMAT,
3636
riscv_instr_format_t.CS_FORMAT,
3737
riscv_instr_format_t.CB_FORMAT,
3838
riscv_instr_format_t.CA_FORMAT))):
39-
with vsc.implies(self.has_rs1 == 1):
39+
with vsc.if_then(self.has_rs1 == 1):
4040
self.rs1.inside(vsc.rangelist(riscv_reg_t.S0, riscv_reg_t.S1, riscv_reg_t.A0,
4141
riscv_reg_t.A1, riscv_reg_t.A2, riscv_reg_t.A3,
4242
riscv_reg_t.A4, riscv_reg_t.A5))
43-
with vsc.implies(self.has_rs2 == 1):
43+
with vsc.if_then(self.has_rs2 == 1):
4444
self.rs2.inside(vsc.rangelist(riscv_reg_t.S0, riscv_reg_t.S1, riscv_reg_t.A0,
4545
riscv_reg_t.A1, riscv_reg_t.A2, riscv_reg_t.A3,
4646
riscv_reg_t.A4, riscv_reg_t.A5))
47-
with vsc.implies(self.has_rd == 1):
47+
with vsc.if_then(self.has_rd == 1):
4848
self.rd.inside(vsc.rangelist(riscv_reg_t.S0, riscv_reg_t.S1, riscv_reg_t.A0,
4949
riscv_reg_t.A1, riscv_reg_t.A2, riscv_reg_t.A3,
5050
riscv_reg_t.A4, riscv_reg_t.A5))
5151
# _ADDI16SP is only valid when rd == SP
52-
with vsc.implies(self.instr_name == riscv_instr_name_t.C_ADDI16SP):
52+
with vsc.if_then(self.instr_name == riscv_instr_name_t.C_ADDI16SP):
5353
self.rd == riscv_reg_t.SP
54-
with vsc.implies(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_JR,
54+
with vsc.if_then(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_JR,
5555
riscv_instr_name_t.C_JALR))):
5656
self.rs1 != riscv_reg_t.ZERO
5757
self.rs2 == riscv_reg_t.ZERO
5858

5959
@vsc.constraint
6060
def imm_val_c(self):
61-
with vsc.implies(self.imm_type.inside(vsc.rangelist(imm_t.NZIMM, imm_t.NZUIMM))):
61+
with vsc.if_then(self.imm_type.inside(vsc.rangelist(imm_t.NZIMM, imm_t.NZUIMM))):
6262
self.imm[5:0] != 0
63-
with vsc.implies(self.instr_name == riscv_instr_name_t.C_LUI):
63+
with vsc.if_then(self.instr_name == riscv_instr_name_t.C_LUI):
6464
self.imm[31:5] == 0
65-
with vsc.implies(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_SRAI,
65+
with vsc.if_then(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_SRAI,
6666
riscv_instr_name_t.C_SRLI,
6767
riscv_instr_name_t.C_SLLI))):
6868
self.imm[31:5] == 0
69-
with vsc.implies(self.instr_name == riscv_instr_name_t.C_ADDI4SPN):
69+
with vsc.if_then(self.instr_name == riscv_instr_name_t.C_ADDI4SPN):
7070
self.imm[1:0] == 0
7171

7272
# C_JAL is RV32C only instruction
7373
@vsc.constraint
7474
def jal_c(self):
75-
with vsc.implies(self.XLEN != 32):
75+
with vsc.if_then(self.XLEN != 32):
7676
self.instr_name != riscv_instr_name_t.C_JAL
7777

7878
# Avoid generating HINT or illegal instruction by default as it's not supported by the compiler
7979
@vsc.constraint
8080
def no_hint_illegal_instr_c(self):
81-
with vsc.implies(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_ADDI,
81+
with vsc.if_then(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_ADDI,
8282
riscv_instr_name_t.C_ADDIW,
8383
riscv_instr_name_t.C_LI,
8484
riscv_instr_name_t.C_LUI,
@@ -90,12 +90,12 @@ def no_hint_illegal_instr_c(self):
9090
riscv_instr_name_t.C_ADD,
9191
riscv_instr_name_t.C_LWSP))):
9292
self.rd != riscv_reg_t.ZERO
93-
with vsc.implies(self.instr_name == riscv_instr_name_t.C_JR):
93+
with vsc.if_then(self.instr_name == riscv_instr_name_t.C_JR):
9494
self.rs1 != riscv_reg_t.ZERO
95-
with vsc.implies(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_ADD,
95+
with vsc.if_then(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.C_ADD,
9696
riscv_instr_name_t.C_MV))):
9797
self.rs2 != riscv_reg_t.ZERO
98-
with vsc.implies(self.instr_name == riscv_instr_name_t.C_LUI):
98+
with vsc.if_then(self.instr_name == riscv_instr_name_t.C_LUI):
9999
self.rd != riscv_reg_t.SP
100100

101101
def set_imm_len(self):

vendor/google_riscv-dv/pygen/pygen_src/isa/riscv_instr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ def __init__(self):
9898

9999
@vsc.constraint
100100
def imm_c(self):
101-
with vsc.implies(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.SLLIW,
101+
with vsc.if_then(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.SLLIW,
102102
riscv_instr_name_t.SRLIW,
103103
riscv_instr_name_t.SRAIW))):
104104
self.imm[11:5] == 0
105-
with vsc.implies(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.SLLI,
105+
with vsc.if_then(self.instr_name.inside(vsc.rangelist(riscv_instr_name_t.SLLI,
106106
riscv_instr_name_t.SRLI,
107107
riscv_instr_name_t.SRAI))):
108-
with vsc.implies(self.XLEN == 32):
108+
with vsc.if_then(self.XLEN == 32):
109109
self.imm[11:5] == 0
110-
with vsc.implies(self.XLEN != 32):
110+
with vsc.if_then(self.XLEN != 32):
111111
self.imm[11:6] == 0
112112

113113
@classmethod

0 commit comments

Comments
 (0)