Merge remote-tracking branch 'origin/dev' into chisel-3.5-published

This commit is contained in:
David Biancolin 2022-02-09 22:41:04 +00:00
commit f7980ed076
2 changed files with 7 additions and 6 deletions

View File

@ -9,7 +9,7 @@ simif_peek_poke_t::simif_peek_poke_t() {
void simif_peek_poke_t::target_reset(int pulse_length) { void simif_peek_poke_t::target_reset(int pulse_length) {
poke(reset, 1); poke(reset, 1);
take_steps(pulse_length, true); this->step(pulse_length, true);
poke(reset, 0); poke(reset, 0);
} }
@ -44,7 +44,9 @@ data_t simif_peek_poke_t::peek(size_t id, bool blocking) {
} }
throw; throw;
} }
if (log && blocking && !wait_on_stable_peeks(0.1))
bool peek_may_be_unstable = blocking && !wait_on_stable_peeks(0.1);
if (log && peek_may_be_unstable)
fprintf(stderr, "* WARNING : The following peek is on an unstable value!\n"); fprintf(stderr, "* WARNING : The following peek is on an unstable value!\n");
data_t value = read(((unsigned int*) OUTPUT_ADDRS)[id]); data_t value = read(((unsigned int*) OUTPUT_ADDRS)[id]);
if (log) if (log)
@ -121,7 +123,7 @@ int simif_peek_poke_t::teardown() {
record_end_times(); record_end_times();
fprintf(stderr, "[%s] %s Test", pass ? "PASS" : "FAIL", TARGET_NAME); fprintf(stderr, "[%s] %s Test", pass ? "PASS" : "FAIL", TARGET_NAME);
if (!pass) { fprintf(stdout, " at cycle %llu", fail_t); } if (!pass) { fprintf(stdout, " at cycle %llu", fail_t); }
fprintf(stderr, "SEED: %ld\n", get_seed()); fprintf(stderr, "\nSEED: %ld\n", get_seed());
this->print_simulation_performance_summary(); this->print_simulation_performance_summary();
this->host_finish(); this->host_finish();

View File

@ -47,13 +47,12 @@ class simif_peek_poke_t: public virtual simif_t
private: private:
// simulation information // simulation information
bool log; bool log = true;
bool pass = true; bool pass = true;
uint64_t t = 0; uint64_t t = 0;
uint64_t fail_t = 0; uint64_t fail_t = 0;
// random numbers
PEEKPOKEBRIDGEMODULE_struct * defaultiowidget_mmio_addrs;
PEEKPOKEBRIDGEMODULE_struct * defaultiowidget_mmio_addrs;
bool wait_on(size_t flag_addr, double timeout) { bool wait_on(size_t flag_addr, double timeout) {
midas_time_t start = timestamp(); midas_time_t start = timestamp();