Skip to content

Commit

Permalink
cpu/rocket: increase IRQ lines to 8
Browse files Browse the repository at this point in the history
  • Loading branch information
gsomlo committed Jan 14, 2022
1 parent cdacba0 commit c3b94a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion litex/soc/cores/cpu/rocket/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(self, platform, variant="standard"):
self.variant = variant

self.reset = Signal()
self.interrupt = Signal(4)
self.interrupt = Signal(8)

mem_dw, mmio_dw, num_cores = CPU_SIZE_PARAMS[self.variant]

Expand Down
8 changes: 4 additions & 4 deletions litex/soc/software/bios/isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ void plic_init(void)
{
int i;

// priorities for interrupt pins 1..4
for (i = 1; i <= 4; i++)
// priorities for interrupt pins 1..8
for (i = 1; i <= 8; i++)
*((unsigned int *)PLIC_BASE + i) = 1;
// enable interrupt pins 1..4
*((unsigned int *)PLIC_ENABLED) = 0xf << 1;
// enable interrupt pins 1..8
*((unsigned int *)PLIC_ENABLED) = 0xff << 1;
// set priority threshold to 0 (any priority > 0 triggers interrupt)
*((unsigned int *)PLIC_THRSHLD) = 0;
}
Expand Down

0 comments on commit c3b94a3

Please sign in to comment.