riscv-isa-sim
riscv-isa-sim copied to clipboard
Instruction limit
Can I set a limit on the instruction executed count?
Tests may run into infinite loops or exceptions forever.
Spike won't stop until it runs out of memory. I want to set a limit so that it will stop after it executes a limit of instructions.
AFAIK, you can increment a global count at static reg_t execute_insn(processor_t *p, reg_t pc, insn_fetch_t fetch) in execute.cc file and check the executed number of instructions with your limit.