model
Builds the reference model with its RVFI-DII interface. Used by TestRIG. The only reference model is Sail.
| Depends on | Nothing |
| Input | reference.source, such as hw/vendor/dv/sail-cheri-riscv |
| Staging | Copies the source tree to model/src/ |
| Command | make -C model/src ARCH=RV64 rvfi [<args>], run in model/ |
| Needs | make, and sail, z3 and gcc, which the Makefile calls |
| Output | model/src/c_emulator/cheri_riscv_rvfi_RV64 |
| Key tools | sail, by the version sail --version prints, and gcc, by gcc -dumpfullversion |
| Passes when | make exits 0 and the emulator binary exists |
The Sail Makefile builds next to its sources, so it is given a copy. The repo’s tree is not written to, and a binary already built in the vendored tree is not picked up, because only files git would track are copied. ARCH is RV32 or RV64 from arch. The binary name gets the cheri_ prefix when arch has the xcheri extension, and only the CHERI model is supported so far. <args> is tools.sail.model.args, as given: arguments for make, such as a variable the Makefile reads.
sail is keyed by the Sail compiler’s version. The model itself is a source tree, keyed by its content as the step’s input.
To check by hand
The step’s only output is the emulator binary. Its logs and the rest of model/src/ are deleted when it passes, so check it after a run with --debug (see What is left in a step’s directory).
model/stdout.log should show the Sail compiler and gcc running. make: Nothing to be done for 'rvfi' means nothing was built and the binary came from somewhere else. z3 is not a key tool, so a new z3 does not cause a rebuild.