Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rv_plic] Adjust naming of PRIO regs by using multireg #25701

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
21 changes: 12 additions & 9 deletions hw/ip_templates/rv_plic/data/rv_plic.hjson.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,19 @@

regwidth: "32",
registers: [
% for i in range(src):
{ name: "PRIO${i}",
desc: "Interrupt Source ${i} Priority",
swaccess: "rw",
hwaccess: "hro",
fields: [
{ bits: "${(prio).bit_length()-1}:0" }
],
{ multireg:
{ name: "PRIO",
desc: "Interrupt Source Priority",
count: "NumSrc",
cname: "${(module_instance_name).upper()}",
swaccess: "rw",
hwaccess: "hro",
compact: false,
fields: [
{ bits: "${(prio).bit_length()-1}:0" }
],
}
}
% endfor
{ skipto: "0x00001000" }
{ multireg: {
name: "IP",
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/rv_plic/doc/programmers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After reset, RV_PLIC doesn't generate any interrupts to any targets even if
interrupt sources are set, as all priorities and thresholds are 0 by default and
all ``IE`` values are 0. Software should configure the above three registers.

[`PRIO0`](../data/rv_plic.hjson#prio0) .. [`PRIO31`](../data/rv_plic.hjson#prio1) registers are unique. So, only one of the targets
[`PRIO0`](../data/rv_plic.hjson#prio_0) .. [`PRIO31`](../data/rv_plic.hjson#prio_1) registers are unique. So, only one of the targets
shall configure them.

```c
Expand Down
2 changes: 1 addition & 1 deletion hw/ip_templates/rv_plic/rtl/rv_plic.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module ${module_instance_name} import ${module_instance_name}_reg_pkg::*; #(
// Priority //
//////////////
% for s in range(src):
assign prio[${s}] = reg2hw.prio${s}.q;
assign prio[${s}] = reg2hw.prio[${s}].q;
% endfor

//////////////////////
Expand Down
Loading
Loading