diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-12-13 21:43:25 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-12-16 16:29:10 -0600 |
| commit | 0c63c46e31642d0102542a745af6b445a9d22b3b (patch) | |
| tree | 0e8b6db18829e4a3d6c894af206f2b5257815827 /tb/top/conspiracion.cpp | |
| parent | d564e3538a3654facc94bb4cd1ee021830dfcf52 (diff) | |
Implement interrupt controller
Diffstat (limited to 'tb/top/conspiracion.cpp')
| -rw-r--r-- | tb/top/conspiracion.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tb/top/conspiracion.cpp b/tb/top/conspiracion.cpp index de43952..67ad2db 100644 --- a/tb/top/conspiracion.cpp +++ b/tb/top/conspiracion.cpp @@ -300,6 +300,12 @@ int main(int argc, char **argv) mem<std::uint32_t> hps_ddr3(0x0000'0000, 512 << 20); jtag_uart ttyJ0(0x3000'0000); interval_timer timer(0x3002'0000); + interrupt_controller intc(0x3007'0000); + + auto &irq_lines = intc.lines(); + irq_lines.jtaguart = &ttyJ0; + irq_lines.timer = &timer; + mem<std::uint32_t> vram(0x3800'0000, 64 << 20); null vram_null(0x3800'0000, 64 << 20, 2); window vram_window(vram, 0x0000'0000); @@ -323,8 +329,9 @@ int main(int argc, char **argv) bool enable_accurate_video = !headless && accurate_video; avl.attach(hps_ddr3); - avl.attach(ttyJ0); avl.attach(timer); + avl.attach(ttyJ0); + avl.attach_intc(intc); for(auto &slave : consts) { |
