Skip to content

Commit

Permalink
Fixed some compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
puneet committed Feb 27, 2024
1 parent a7a56c7 commit 4a68deb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions euvm/riscv/gen/riscv_page_table_entry.d
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ class riscv_page_table_entry(satp_mode_t MODE = satp_mode_t.SV39) : uvm_object
void pack_entry() {
switch (MODE) {
case satp_mode_t.SV32:
bits = ppn1 ~ ppn0 ~ rsw ~ d ~ a ~ g ~ u ~ toubvec!3(xwr) ~ v;
bits = ppn1 ~ ppn0 ~ rsw ~ d ~ a ~ g ~ u ~ xwr ~ v;
break;
case satp_mode_t.SV39:
bits = cast(ubvec!XLEN) (rsvd ~ ppn2 ~ ppn1 ~ ppn0 ~ rsw ~ d ~ a ~ g ~ u ~ toubvec!3(xwr) ~ v);
bits = cast(ubvec!XLEN) (rsvd ~ ppn2 ~ ppn1 ~ ppn0 ~ rsw ~ d ~ a ~ g ~ u ~ xwr ~ v);
break;
case satp_mode_t.SV48:
bits = cast(ubvec!XLEN) (rsvd ~ ppn3 ~ ppn2 ~ ppn1 ~ ppn0 ~ rsw ~ d ~ a ~ g ~ u ~ toubvec!3(xwr) ~ v);
bits = cast(ubvec!XLEN) (rsvd ~ ppn3 ~ ppn2 ~ ppn1 ~ ppn0 ~ rsw ~ d ~ a ~ g ~ u ~ xwr ~ v);
break;
default:
uvm_fatal(get_full_name(), format("Unsupported mode %0x", MODE));
Expand Down
8 changes: 4 additions & 4 deletions euvm/riscv/gen/riscv_privileged_common_seq.d
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ class riscv_privileged_common_seq: uvm_sequence!(uvm_sequence_item,uvm_sequence_
mstatus.set_field("FS", cfg.mstatus_fs);
mstatus.set_field("VS", cfg.mstatus_vs);
if (!(canFind(supported_privileged_mode, privileged_mode_t.SUPERVISOR_MODE)) && (XLEN != 32)) {
mstatus.set_field("SXL", toubvec!2(0b00));
mstatus.set_field("SXL", UBVEC!(2, 0b00));
}
else if (XLEN == 64) {
mstatus.set_field("SXL", toubvec!2(0b10));
mstatus.set_field("SXL", UBVEC!(2, 0b10));
}
if (!(canFind(supported_privileged_mode, privileged_mode_t.USER_MODE)) && (XLEN != 32)) {
mstatus.set_field("UXL", toubvec!2(0b00));
mstatus.set_field("UXL", UBVEC!(2, 0b00));
} else if (XLEN == 64) {
mstatus.set_field("UXL", toubvec!2(0b10));
mstatus.set_field("UXL", UBVEC!(2, 0b10));
}
mstatus.set_field("XS", 0);
mstatus.set_field("SD", 0);
Expand Down

0 comments on commit 4a68deb

Please sign in to comment.