From 1c1620e48ff6b807aed0c955792b4e8a17614c20 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 9 Nov 2022 09:54:13 -0600 Subject: Implement initial state randomization in sim --- tb/avalon.impl.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tb/avalon.impl.hpp') diff --git a/tb/avalon.impl.hpp b/tb/avalon.impl.hpp index 6864c6d..f701e73 100644 --- a/tb/avalon.impl.hpp +++ b/tb/avalon.impl.hpp @@ -24,6 +24,17 @@ namespace taller::avalon template void interconnect::tick(bool clk) { + if(!plat.reset_reset_n) [[unlikely]] + { + active = nullptr; + avl_read = false; + avl_write = false; + avl_address = 0; + avl_writedata = 0; + avl_byteenable = 0; + return; + } + if(active) { assert(avl_address == plat.avl_address); -- cgit v1.2.3