Skip to content

Commit 6c02172

Browse files
committed
[dv] Enable Zcb and Zcmp extension in compiler
1 parent 3636496 commit 6c02172

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

dv/uvm/core_ibex/riscv_dv_extension/riscv_core_setting.tpl.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bit support_unaligned_load_store = 1'b1;
5353

5454
// ISA supported by the processor
5555
// TODO: Determine how Ibex RV32B types map to RISCV-DV ISA names
56-
riscv_instr_group_t supported_isa[$] = {RV32I, RV32M, RV32C
56+
riscv_instr_group_t supported_isa[$] = {RV32I, RV32M, RV32C, RV32ZCB, RV32ZCMP
5757
% if ibex_config['RV32B'] == 'ibex_pkg::RV32BNone':
5858
};
5959
% else:

dv/uvm/core_ibex/riscv_dv_extension/testlist.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,3 +1157,12 @@
11571157
rtl_test: core_ibex_base_test
11581158
rtl_params:
11591159
RV32B: ["ibex_pkg::RV32BFull", "ibex_pkg::RV32BOTEarlGrey", "ibex_pkg::RV32BBalanced"]
1160+
1161+
- test: riscv_zcb_balanced_test
1162+
desc: >
1163+
Random instruction test with zcb instructions in balanced configuration
1164+
iterations: 10
1165+
gen_test: riscv_rand_instr_test
1166+
gen_opts: >
1167+
+enable_zcb_extension=1
1168+
rtl_test: core_ibex_base_test

dv/uvm/core_ibex/scripts/ibex_cmd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ def get_isas_for_config(cfg: Config) -> Tuple[str, str]:
114114

115115
has_bitmanip = cfg.rv32b != 'ibex_pkg::RV32BNone'
116116
toolchain_isa = base_isa + ('b' if has_bitmanip else '')
117+
toolchain_isa = toolchain_isa + ('_zicsr_zifencei_zcb_zcmp')
117118

118-
return (toolchain_isa, '_'.join([base_isa] + bitmanip_isa))
119+
return (toolchain_isa, '_'.join([base_isa] + ['Zicsr','Zifencei','Zcb','Zcmp'] + bitmanip_isa))
119120

120121

121122
_TestEntry = Dict[str, object]

dv/uvm/core_ibex/tests/core_ibex_base_test.sv

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ class core_ibex_base_test extends uvm_test;
7070
isa = {"rv32", RV32E ? "e" : "i"};
7171
if (RV32M != RV32MNone) isa = {isa, "m"};
7272
isa = {isa, "c"};
73+
isa = {isa, "_Zicsr"};
74+
isa = {isa, "_Zifencei"};
75+
isa = {isa, "_Zcb"};
76+
isa = {isa, "_Zcmp"};
7377
case (RV32B)
7478
RV32BNone:
7579
;

0 commit comments

Comments
 (0)