Hi,I am slowly coding my own RISC-V SystemVerilog RTL implementation, micro-controller with I32/64/128(just for completeness) and extensions MAC, CLIC interrupt controller, floating point is not on my list yet ...I am using Verilator to simulate my RTL and I would like to compare the internal state of the RTL CPU against the internal state of the simulator.The idea is to compile the simulator as a library into the Verilator executable and to use the simulator API to extract the internal state of the simulator (PC, GPR, CSR).
The simulator can be slow and simple (small and few features) but should have a good coverage of the base and extensions.I do not mind filing bug reports, if some instructions do not behave as expected.I was looking at Spike and its Interactive Debug Mode, which could be used by piping requests and responses between Spike and Verilator through a file system FIFO.I was also looking at the next test sets:They look just what I need.Otherwise I would be interested how you check execution correctness. For now I will probably study the pulp platform.Regards,Iztok Jeras
--
| typedef struct { | |
| Bit#(64) skippedPackets; | |
| Bit#(64) pc; | |
| Bit#(32) instruction; | |
| Bit#(64) data; | |
| Bit#(64) addr; | |
| Bit#(7) dst; | |
| Bool exception; | |
| Bool interrupt; | |
| Bit#(4) cause; | |
| } VerificationPacket deriving (Bits); |
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/hw-dev/1AF337A3-5064-4037-81A4-273F053110F6%40mac.com.