riscv-rust / k210-pac

Peripheral access API crate (PAC) for K210 SoC, generated by svd2rust
29 stars 23 forks source link

PLIC #17

Closed laanwj closed 5 years ago

laanwj commented 5 years ago

Based on lib/drivers/include/plic.h in SDK and loosely on e310x svd.

laanwj commented 5 years ago

Fairly sure you're right. I didn't grasp the *2 and /2 factors as first, but now it makes sense to me. It's the same for targets, there's 0x1000 per target, but their actual per-target structure is sized 0x2000.

I've updated this with the assumption that there's four interrupt targets. I'll not name them but there's a good assumption they match the SiFive U54 w/ M-Mode and S-Mode per hart.

Disasm commented 5 years ago

Thanks!