Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hw/top_chip/ip_autogen/rv_plic/data/rv_plic.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
],
}
}
{ skipto: "0x2100" }
{ skipto: "0x2080" }
{ multireg: {
name: "IE1",
desc: "Interrupt Enable for Target 1",
Expand Down
2 changes: 1 addition & 1 deletion hw/top_chip/ip_autogen/rv_plic/rtl/rv_plic_reg_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ package rv_plic_reg_pkg;
parameter logic [BlockAw-1:0] RV_PLIC_PRIO_31_OFFSET = 27'h 7c;
parameter logic [BlockAw-1:0] RV_PLIC_IP_OFFSET = 27'h 1000;
parameter logic [BlockAw-1:0] RV_PLIC_IE0_OFFSET = 27'h 2000;
parameter logic [BlockAw-1:0] RV_PLIC_IE1_OFFSET = 27'h 2100;
parameter logic [BlockAw-1:0] RV_PLIC_IE1_OFFSET = 27'h 2080;
parameter logic [BlockAw-1:0] RV_PLIC_THRESHOLD0_OFFSET = 27'h 200000;
parameter logic [BlockAw-1:0] RV_PLIC_CC0_OFFSET = 27'h 200004;
parameter logic [BlockAw-1:0] RV_PLIC_THRESHOLD1_OFFSET = 27'h 201000;
Expand Down
2 changes: 1 addition & 1 deletion hw/vendor/lowrisc_ip.vendor.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{from: "hw/ip_templates/gpio", to: "ip_templates/gpio", patch_dir: "gpio"}, // General purpose I/O
{from: "hw/ip_templates/pwrmgr", to: "ip_templates/pwrmgr", patch_dir: "pwrmgr"},
{from: "hw/ip_templates/rstmgr", to: "ip_templates/rstmgr", patch_dir: "rstmgr"},
{from: "hw/ip_templates/rv_plic", to: "ip_templates/rv_plic"},
{from: "hw/ip_templates/rv_plic", to: "ip_templates/rv_plic", patch_dir: "rv_plic"},

// Primitives.
{from: "hw/ip/prim", to: "ip/prim", patch_dir: "prim"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
}
},
% for i in range(target):
{ skipto: "${"0x{:x}".format(0x00002000 + i * 0x100)}" }
{ skipto: "${"0x{:x}".format(0x00002000 + i * 0x80)}" }
{ multireg: {
name: "IE${i}",
desc: "Interrupt Enable for Target ${i}",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/data/rv_plic.hjson.tpl b/data/rv_plic.hjson.tpl
index 68936643..b5d79762 100644
--- a/data/rv_plic.hjson.tpl
+++ b/data/rv_plic.hjson.tpl
@@ -179,7 +179,7 @@
}
},
% for i in range(target):
- { skipto: "${"0x{:x}".format(0x00002000 + i * 0x100)}" }
+ { skipto: "${"0x{:x}".format(0x00002000 + i * 0x80)}" }
{ multireg: {
name: "IE${i}",
desc: "Interrupt Enable for Target ${i}",
2 changes: 1 addition & 1 deletion rdl/ip/plic.rdl
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,6 @@ addrmap rv_plic #(
reset = 0x0;
desc = "Interrupt Enable of Source";
} E_31[31:31];
} IE1[1] @ 0x2100;
} IE1[1] @ 0x2080;

};
8 changes: 4 additions & 4 deletions sw/device/lib/hal/autogen/plic.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ typedef volatile struct [[gnu::aligned(4)]] plic_memory_layout {
/* plic.ie0 (0x2000) */
uint32_t ie0;

const uint8_t __reserved2[0x2100 - 0x2004];
const uint8_t __reserved2[0x2080 - 0x2004];

/* plic.ie1 (0x2100) */
/* plic.ie1 (0x2080) */
uint32_t ie1;

const uint8_t __reserved3[0x200000 - 0x2104];
const uint8_t __reserved3[0x200000 - 0x2084];

/* plic.threshold0 (0x200000) */
plic_threshold0 threshold0;
Expand Down Expand Up @@ -103,7 +103,7 @@ _Static_assert(__builtin_offsetof(struct plic_memory_layout, ip) == 0x1000ul,
"incorrect register ip offset");
_Static_assert(__builtin_offsetof(struct plic_memory_layout, ie0) == 0x2000ul,
"incorrect register ie0 offset");
_Static_assert(__builtin_offsetof(struct plic_memory_layout, ie1) == 0x2100ul,
_Static_assert(__builtin_offsetof(struct plic_memory_layout, ie1) == 0x2080ul,
"incorrect register ie1 offset");
_Static_assert(__builtin_offsetof(struct plic_memory_layout, threshold0) == 0x200000ul,
"incorrect register threshold0 offset");
Expand Down