From 544f3b4af9898d511de2679f7ca8b49d0a3b77eb Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Tue, 13 May 2025 00:55:56 -0700 Subject: [PATCH 1/2] Fix riscv-config isa yaml for compatability with latest RISCOF for PMP --- tests/riscof/spike/spike_rv32e_isa.yaml | 50 +++++++++++++----------- tests/riscof/spike/spike_rv32gc_isa.yaml | 48 ++++++++++++----------- tests/riscof/spike/spike_rv64gc_isa.yaml | 43 ++++++++++---------- 3 files changed, 75 insertions(+), 66 deletions(-) diff --git a/tests/riscof/spike/spike_rv32e_isa.yaml b/tests/riscof/spike/spike_rv32e_isa.yaml index ee0aeec11..6319ac1fa 100644 --- a/tests/riscof/spike/spike_rv32e_isa.yaml +++ b/tests/riscof/spike/spike_rv32e_isa.yaml @@ -1,29 +1,33 @@ hart_ids: [0] hart0: - ISA: RV32EMCZicsr_Zifencei_Zbkc + ISA: RV32EMCZicsr_Zifencei physical_addr_sz: 32 User_Spec_Version: '2.3' supported_xlen: [32] misa: - reset-val: 0x40001014 - rv32: - accessible: true - mxl: - implemented: true - type: - warl: - dependency_fields: [] - legal: - - mxl[1:0] in [0x1] - wr_illegal: - - Unchanged - extensions: - implemented: true - type: - warl: - dependency_fields: [] - legal: - - extensions[25:0] bitmask [0x0001034, 0x0000000] - wr_illegal: - - Unchanged - + reset-val: 0x40001014 + rv32: + accessible: true + mxl: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - mxl[1:0] in [0x1] + wr_illegal: + - Unchanged + extensions: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - extensions[25:0] bitmask [0x0001034, 0x0000000] + wr_illegal: + - Unchanged + PMP: + implemented: False + pmp-grain: 0 + pmp-count: 0 + pmp-writable: 0 diff --git a/tests/riscof/spike/spike_rv32gc_isa.yaml b/tests/riscof/spike/spike_rv32gc_isa.yaml index 435d6cf46..fc8ed99fc 100644 --- a/tests/riscof/spike/spike_rv32gc_isa.yaml +++ b/tests/riscof/spike/spike_rv32gc_isa.yaml @@ -1,29 +1,33 @@ hart_ids: [0] hart0: -# ISA: RV32IMAFDCZicboz_Zicsr_Zicond_Zifencei_Zfa_Zfh_Zca_Zcb_Zba_Zbb_Zbc_Zbkb_Zbkc_Zbkx_Zbs_Zknd_Zkne_Zknh ISA: RV32IMAFDCSUZicsr_Zicond_Zifencei_Zfa_Zfh_Zca_Zcb_Zcd_Zcf_Zba_Zbb_Zbc_Zbkb_Zbkc_Zbkx_Zbs_Zknd_Zkne_Zknh physical_addr_sz: 32 User_Spec_Version: '2.3' supported_xlen: [32] misa: - reset-val: 0x4014112D - rv32: - accessible: true - mxl: - implemented: true - type: - warl: - dependency_fields: [] - legal: - - mxl[1:0] in [0x1] - wr_illegal: - - Unchanged - extensions: - implemented: true - type: - warl: - dependency_fields: [] - legal: - - extensions[25:0] bitmask [0x014112D, 0x0000000] - wr_illegal: - - Unchanged + reset-val: 0x4014112D + rv32: + accessible: true + mxl: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - mxl[1:0] in [0x1] + wr_illegal: + - Unchanged + extensions: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - extensions[25:0] bitmask [0x014112D, 0x0000000] + wr_illegal: + - Unchanged + PMP: + implemented: True + pmp-grain: 0 + pmp-count: 16 + pmp-writable: 12 diff --git a/tests/riscof/spike/spike_rv64gc_isa.yaml b/tests/riscof/spike/spike_rv64gc_isa.yaml index 1ab1afb8a..b7ad5a045 100644 --- a/tests/riscof/spike/spike_rv64gc_isa.yaml +++ b/tests/riscof/spike/spike_rv64gc_isa.yaml @@ -1,34 +1,35 @@ hart_ids: [0] hart0: -# ISA: RV64IMAFDQCSUZicboz_Zicsr_Zicond_Zifencei_Zfa_Zfh_Zca_Zcb_Zba_Zbb_Zbc_Zbkb_Zbkc_Zbkx_Zbs_Zknd_Zkne_Zknh ISA: RV64IMAFDCSUZicsr_Zicond_Zifencei_Zfa_Zfh_Zca_Zcb_Zcd_Zba_Zbb_Zbc_Zbkb_Zbkc_Zbkx_Zbs_Zknd_Zkne_Zknh -# ISA: RV64IMAFDQCSUZicsr_Zicond_Zifencei_Zfa_Zfh_Zca_Zcb_Zba_Zbb_Zbc_Zbkb_Zbkc_Zbkx_Zbs_Zknd_Zkne_Zknh physical_addr_sz: 56 User_Spec_Version: '2.3' supported_xlen: [64] misa: - reset-val: 0x800000000014112D -# reset-val: 0x800000000015112D - rv32: + reset-val: 0x800000000014112D + rv32: accessible: false - rv64: - accessible: true - mxl: - implemented: true - type: - warl: + rv64: + accessible: true + mxl: + implemented: true + type: + warl: dependency_fields: [] legal: - mxl[1:0] in [0x2] wr_illegal: - Unchanged - extensions: - implemented: true - type: - warl: - dependency_fields: [] - legal: - - extensions[25:0] bitmask [0x015112D, 0x0000000] - wr_illegal: - - Unchanged - + extensions: + implemented: true + type: + warl: + dependency_fields: [] + legal: + - extensions[25:0] bitmask [0x015112D, 0x0000000] + wr_illegal: + - Unchanged + PMP: + implemented: True + pmp-grain: 0 + pmp-count: 16 + pmp-writable: 12 From d2350c6ec1af436edc0b1b8a0885ca792e385510 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Tue, 13 May 2025 01:03:30 -0700 Subject: [PATCH 2/2] Install latest version of riscv-config from git --- bin/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/requirements.txt b/bin/requirements.txt index fd60841d1..f0bb082fd 100644 --- a/bin/requirements.txt +++ b/bin/requirements.txt @@ -5,7 +5,7 @@ matplotlib>=3.9.0 pre-commit>=4.0.0 PyYAML>=5.2 riscof @ git+https://github.com/riscv/riscof.git -riscv-config>=3.18.3 +riscv-config @ git+https://github.com/riscv-software-src/riscv-config riscv-isac @ git+https://github.com/riscv-non-isa/riscv-arch-test/#subdirectory=riscv-isac scikit-learn>=1.5.0 scipy>=1.13.0