summaryrefslogtreecommitdiff
path: root/tb/top
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-12-13 21:43:25 -0600
committerAlejandro Soto <alejandro@34project.org>2022-12-16 16:29:10 -0600
commit0c63c46e31642d0102542a745af6b445a9d22b3b (patch)
tree0e8b6db18829e4a3d6c894af206f2b5257815827 /tb/top
parentd564e3538a3654facc94bb4cd1ee021830dfcf52 (diff)
Implement interrupt controller
Diffstat (limited to 'tb/top')
-rw-r--r--tb/top/conspiracion.cpp9
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)
{