Skip to content

Commit

Permalink
diff: rm cmn instr set
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokamikami committed Nov 25, 2024
1 parent 741dca1 commit a884cf9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,4 @@ jobs:
source ./env.sh
make clean
make simv VCS=verilator -j2
./build/simv +workload=./ready-to-run/microbench.bin +b=0 +e=-1 +max-instrs=5000 +warmup-inst=1000 +cmn-instrs=1000 +diff=./ready-to-run/riscv64-nemu-interpreter-so
./build/simv +workload=./ready-to-run/microbench.bin +b=0 +e=-1 +max-instrs=5000 +warmup-inst=1000 +diff=./ready-to-run/riscv64-nemu-interpreter-so
6 changes: 3 additions & 3 deletions src/test/csrc/vcs/vcs_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ 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_inst;
extern "C" void set_warmup_insts(uint64_t warmup_inst) {
warmup_instrs = warmup_inst;
wamupScope = svGetScope();
if (wamupScope == NULL) {
printf("Error: Could not retrieve wamup scope, set first\n");
assert(wamupScope);
}
printf("set warmp insts %ld, cmn insts %ld\n", warmup_inst, cmn_inst);
printf("set warmp insts %ld\n", warmup_inst);
}

extern "C" void set_gcpt_bin(char *s) {
Expand Down
11 changes: 2 additions & 9 deletions src/test/vsrc/vcs/DifftestEndpoint.v
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import "DPI-C" function void set_max_instrs(longint mc);
import "DPI-C" function longint get_stuck_limit();
import "DPI-C" function void set_overwrite_nbytes(longint len);
import "DPI-C" function void set_overwrite_autoset();
import "DPI-C" context function void set_warmup_insts(longint workload_inst, longint cmn_inst);
import "DPI-C" context function void set_warmup_insts(longint workload_inst);
`ifdef WITH_DRAMSIM3
import "DPI-C" function void simv_tick();
`endif // WITH_DRAMSIM3
Expand Down Expand Up @@ -83,7 +83,6 @@ longint overwrite_nbytes;
reg [63:0] max_instrs;
reg [63:0] max_cycles;
reg [63:0] warmup_instrs;
reg [63:0] warmup_cmn_instrs;
reg [63:0] stuck_limit;

initial begin
Expand All @@ -105,7 +104,6 @@ initial begin
`ifndef TB_NO_DPIC
stuck_limit = get_stuck_limit();
warmup_instrs = 0;
warmup_cmn_instrs = 0;
// workload: bin file
if ($test$plusargs("workload")) begin
$value$plusargs("workload=%s", bin_file);
Expand All @@ -114,12 +112,7 @@ initial begin
// warmup for instrs
if ($test$plusargs("warmup-inst")) begin
$value$plusargs("warmup-inst=%d", warmup_instrs);
end
if ($test$plusargs("cmn-instrs")) begin
$value$plusargs("cmn-instrs=%d", warmup_cmn_instrs);
end
if (warmup_instrs != 0 || warmup_cmn_instrs != 0) begin
set_warmup_insts(warmup_instrs, warmup_cmn_instrs);
set_warmup_insts(warmup_instrs);
end
// boot flash image: bin file
if ($test$plusargs("flash")) begin
Expand Down

0 comments on commit a884cf9

Please sign in to comment.