fix pmpcfg csr definitions
@@ -282,15 +282,8 @@ class riscv_privil_reg extends riscv_reg#(privileged_reg_t);
// Physical Memory Protection Configuration Register
PMPCFG1: begin
privil_level = M_LEVEL;
- if(XLEN==64) begin
- add_field("PMP8CFG", 8, WARL);
- add_field("PMP9CFG", 8, WARL);
- add_field("PMP10CFG", 8, WARL);
- add_field("PMP11CFG", 8, WARL);
- add_field("PMP12CFG", 8, WARL);
- add_field("PMP13CFG", 8, WARL);
- add_field("PMP14CFG", 8, WARL);
- add_field("PMP15CFG", 8, WARL);
+ if(XLEN!=32) begin
+ `uvm_fatal(`gfn, "CSR PMPCFG1 only exists in RV32.")
end else begin
add_field("PMP4CFG", 8, WARL);
add_field("PMP5CFG", 8, WARL);
@@ -300,14 +293,16 @@ class riscv_privil_reg extends riscv_reg#(privileged_reg_t);
end
// Physical Memory Protection Configuration Register
PMPCFG2: begin
- if(XLEN!=32) begin
- `uvm_fatal(get_full_name(), "CSR PMPCFG2 only exists in RV32.")
- end
privil_level = M_LEVEL;
add_field("PMP8CFG", 8, WARL);
add_field("PMP9CFG", 8, WARL);
add_field("PMP10CFG", 8, WARL);
add_field("PMP11CFG", 8, WARL);
+ if(XLEN==64) begin
+ add_field("PMP12CFG", 8, WARL);
+ add_field("PMP13CFG", 8, WARL);
+ add_field("PMP14CFG", 8, WARL);
+ add_field("PMP15CFG", 8, WARL);
end
// Physical Memory Protection Configuration Register
PMPCFG3: begin
