diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-09 09:54:13 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-09 09:54:13 -0600 |
| commit | 1c1620e48ff6b807aed0c955792b4e8a17614c20 (patch) | |
| tree | abaed0528fcffc841bfc6e25417625cb7f243acc /tb/avalon.impl.hpp | |
| parent | 5d798386c3b1c1dc45a2fbc382c9367ccc27c524 (diff) | |
Implement initial state randomization in sim
Diffstat (limited to '')
| -rw-r--r-- | tb/avalon.impl.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<class Platform> void interconnect<Platform>::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); |
