-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestRISCVParser.lean
More file actions
30 lines (22 loc) · 826 Bytes
/
TestRISCVParser.lean
File metadata and controls
30 lines (22 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Shoumei.RISCV.ISA
import Shoumei.RISCV.OpcodeParser
import Shoumei.RISCV.InstructionList
import Shoumei.RISCV.Decoder
import Shoumei.RISCV.DecoderTest
import Shoumei.RISCV.Semantics
import Shoumei.RISCV.SemanticsTestSimple
import Shoumei.RISCV.DecoderProofs
import Shoumei.RISCV.DecoderProofsTest
open Shoumei.RISCV
def main : IO Unit := do
-- Load instruction definitions
let defs ← loadInstrDictFromFile instrDictPath
IO.println s!"Loaded {defs.length} RV32I instructions from riscv-opcodes\n"
-- Run decoder test suite
testAllInstructions defs
IO.println "\n==================================================\n"
-- Run semantics tests
testKeySemantics defs
IO.println "\n==================================================\n"
-- Run structural proof tests
runStructuralProofTests defs