riscv-isa-sim icon indicating copy to clipboard operation
riscv-isa-sim copied to clipboard

Instruction limit

Open panda1628 opened this issue 3 years ago • 1 comments

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.

panda1628 avatar Apr 27 '21 15:04 panda1628

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.

sawansib avatar Jun 09 '21 14:06 sawansib