mirror of
https://github.com/openhwgroup/cva5.git
synced 2025-04-23 05:27:23 -04:00
Fix sim for verilator
This commit is contained in:
parent
a9c351ba22
commit
33a2546033
3 changed files with 6 additions and 4 deletions
|
@ -152,13 +152,15 @@ void CVA5Tracer::start_tracer(const char *trace_file) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
uint64_t CVA5Tracer::cycle_count = 0;
|
||||
uint64_t CVA5Tracer::get_cycle_count() {
|
||||
return cycle_count;
|
||||
}
|
||||
|
||||
|
||||
CVA5Tracer::CVA5Tracer(std::ifstream& programFile) {
|
||||
cycle_count = 0;
|
||||
|
||||
#ifdef TRACE_ON
|
||||
Verilated::traceEverOn(true);
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
void set_log_file(std::ofstream* logFile);
|
||||
void set_pc_file(std::ofstream* pcFile);
|
||||
void start_tracer(const char *trace_file);
|
||||
uint64_t get_cycle_count();
|
||||
static uint64_t get_cycle_count();
|
||||
|
||||
//DDR Simulation
|
||||
Vcva5_sim *tb;
|
||||
|
@ -71,7 +71,7 @@ private:
|
|||
int reset_length = 64;
|
||||
int stall_limit = 2000;
|
||||
int stall_count = 0;
|
||||
uint64_t cycle_count = 0;
|
||||
static uint64_t cycle_count;
|
||||
|
||||
bool program_complete = false;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ CVA5Tracer *cva5Tracer;
|
|||
char* csv_log_name;
|
||||
//For time index on assertions
|
||||
double sc_time_stamp () {
|
||||
return cva5Tracer->get_cycle_count();
|
||||
return CVA5Tracer::get_cycle_count();
|
||||
}
|
||||
|
||||
const char* cva5_csv_log_file_name () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue