Difftest (差分测试) co-sim framework
- Init this submodule in your design, add it to dependency list.
- Add difftest to your design.
- Generate verilog files for simulation.
- Assign
SIM_TOP
,DESIGN_DIR
fordifftest/Makefile
cd difftest
andmake emu
, then start simulating & debugging!
To use difftest in XiangShan project:
cd XiangShan
make init
# cd difftest
make emu
Difftest functions:
- DifftestArchEvent (essential)
- DifftestInstrCommit (essential)
- DifftestTrapEvent (essential)
- DifftestCSRState (essential)
- DifftestArchIntRegState (essential)
- DifftestArchFpRegState
- DifftestSbufferEvent
- DifftestStoreEvent
- DifftestLoadEvent
- DifftestAtomicEvent
- DifftestPtwEvent
Simulation top:
- LogCtrlIO
- PerfInfoIO
- UARTIO
Simulation memory:
- RAMHelper (essential)
To use difftest
, include all these modules / simtopIO in your design.