Skip to content

Commit

Permalink
diff: on wamup, the total number of wamup needed is directly calculat…
Browse files Browse the repository at this point in the history
…ed and emptied once reached, and the prompt is output
  • Loading branch information
xiaokamikami committed Nov 20, 2024
1 parent 738ad3a commit 290db17
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/test/csrc/vcs/vcs_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ static bool enable_difftest = true;
static uint64_t max_instrs = 0;
static char *workload_list = NULL;
static uint32_t overwrite_nbytes = 0xe00;
static uint64_t cmn_instrs = 0;
static uint64_t warmup_instrs = 0;
static svScope wamupScope;
struct core_end_info_t {
Expand Down Expand Up @@ -89,8 +88,7 @@ extern "C" void set_overwrite_autoset() {

// The workload warms up and clears the instruction counter
extern "C" void set_warmup_insts(uint64_t warmup_inst, uint64_t cmn_inst) {
warmup_instrs = warmup_inst;
cmn_instrs = cmn_inst;
warmup_instrs = warmup_inst + cmn_inst;
wamupScope = svGetScope();
if (wamupScope == NULL) {
printf("Error: Could not retrieve wamup scope, set first\n");
Expand Down Expand Up @@ -260,10 +258,8 @@ extern "C" uint8_t simv_step() {
svSetScope(wamupScope);
claer_perfcnt();
warmup_instrs = 0;
} else if (cmn_instrs != 0 && trap->instrCnt > warmup_instrs) {
svSetScope(wamupScope);
claer_perfcnt();
cmn_instrs = 0;
Info("Warmup finished. The performance counters will be dumped and then reset.\n");
eprintf("core-%d warmup cycle %ld instrs %ld\n", trap->cycleCnt, trap->instrCnt);
}

if (max_instrs != 0) { // 0 for no limit
Expand Down

0 comments on commit 290db17

Please sign in to comment.