-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I want to use rmem to verify the execution of a riscv cpu verilog simulation.
I can grab all the required info from the simulation, eg instruction 1 wrote to memory 0x1000/8=1, instruction 2 read from store buffer 0x1000/8=1, instruction 3 read from memory 0x1000/8=1, etc. I then want to check that those simulation results are a valid RVWMO execution.
My idea is to add a step_string instruction to rmem. Given a string argument, it will search the enabled transitions for that string. If it finds one transition that contains that string, then it will take that transition. Eg, one could do
step_string "satisfy memory read by forwarding from writes: (0:3:0):R 0x0000000000001000/8 from (0:2:0):W 0x0000000000001000/8=1"
I can create the above command, and ones like it, directly from a simulation trace and feed it to rmem to check the execution.
Does that sound reasonable? Would you recommend something else?
I've implemented a primitive step_string in rmem myself and it's working on my manually written toy examples.