summaryrefslogtreecommitdiff
path: root/tb/avalon.impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tb/avalon.impl.hpp')
-rw-r--r--tb/avalon.impl.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tb/avalon.impl.hpp b/tb/avalon.impl.hpp
index 6f4bfb9..e04c7b0 100644
--- a/tb/avalon.impl.hpp
+++ b/tb/avalon.impl.hpp
@@ -22,16 +22,28 @@ namespace taller::avalon
}
template<class Platform>
+ void interconnect<Platform>::attach_intc(interrupt_controller &intc)
+ {
+ assert(root_intc == nullptr);
+
+ attach(intc.as_slave());
+ root_intc = &intc;
+ }
+
+ template<class Platform>
bool interconnect<Platform>::tick(bool clk)
{
if(!plat.reset_reset_n) [[unlikely]]
{
active = nullptr;
+ plat.avl_irq = 0;
+
avl_read = false;
avl_write = false;
avl_address = 0;
avl_writedata = 0;
avl_byteenable = 0;
+
return true;
}
@@ -59,6 +71,11 @@ namespace taller::avalon
binding.dev.tick();
}
+ if(root_intc)
+ {
+ plat.avl_irq = root_intc->irq();
+ }
+
if(!active)
{
avl_address = plat.avl_address;