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/top | |
| parent | 5d798386c3b1c1dc45a2fbc382c9367ccc27c524 (diff) | |
Implement initial state randomization in sim
Diffstat (limited to 'tb/top')
| -rw-r--r-- | tb/top/conspiracion.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tb/top/conspiracion.cpp b/tb/top/conspiracion.cpp index c671e77..b73bd4b 100644 --- a/tb/top/conspiracion.cpp +++ b/tb/top/conspiracion.cpp @@ -116,6 +116,16 @@ int main(int argc, char **argv) Verilated::commandArgs(argc, argv); + for(char **arg = argv; *arg; ++arg) + { + if(**arg == '+') + { + *arg = NULL; + argc = arg - argv; + break; + } + } + args::ArgumentParser parser("Simulador proyecto final CE3201"); args::ValueFlagList<reg_init> init_regs @@ -220,6 +230,10 @@ int main(int argc, char **argv) tick(); }; + top.reset_reset_n = 0; + cycle(); + top.reset_reset_n = 1; + for(unsigned i = 0; i < *cycles; ++i) { cycle(); |
