-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathlakefile.lean
More file actions
213 lines (157 loc) · 5.56 KB
/
lakefile.lean
File metadata and controls
213 lines (157 loc) · 5.56 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
import Lake
open Lake DSL
package «sparkle» where
require «doc-gen4» from git
"https://github.com/leanprover/doc-gen4" @ "main"
require LSpec from git
"https://github.com/argumentcomputer/LSpec" @ "main"
-- C FFI library for Signal memoization barriers (defeats Lean 4.28 LICM)
extern_lib «sparkle_barrier» pkg := do
let srcFile := pkg.dir / "c_src" / "sparkle_barrier.c"
let oFile := pkg.buildDir / "c_src" / "sparkle_barrier.o"
let srcJob ← inputTextFile srcFile
let oJob ← buildLeanO oFile srcJob (weakArgs := #["-O2"])
buildStaticLib (pkg.buildDir / "c_src" / nameToStaticLib "sparkle_barrier") #[oJob]
-- C FFI library for JIT dlopen/dlsym wrappers
extern_lib «sparkle_jit» pkg := do
let srcFile := pkg.dir / "c_src" / "sparkle_jit.c"
let oFile := pkg.buildDir / "c_src" / "sparkle_jit.o"
let srcJob ← inputTextFile srcFile
let oJob ← buildLeanO oFile srcJob (weakArgs := #["-O2"])
buildStaticLib (pkg.buildDir / "c_src" / nameToStaticLib "sparkle_jit") #[oJob]
lean_lib «Sparkle» where
lean_lib «IP.BitNet» where
roots := #[`IP.BitNet]
lean_lib «IP.Drone» where
roots := #[`IP.Drone]
lean_lib «IP.Humanoid» where
roots := #[`IP.Humanoid]
lean_lib «IP.RV32» where
roots := #[`IP.RV32]
lean_lib «IP.YOLOv8» where
roots := #[`IP.YOLOv8]
lean_lib «IP.Arbiter» where
roots := #[`IP.Arbiter]
lean_lib «Examples.CDC» where
roots := #[`Examples.CDC]
lean_lib «IP.Video» where
roots := #[`IP.Video]
lean_lib «IP.Bus» where
roots := #[`IP.Bus]
lean_lib «Tools.SVParser» where
roots := #[`Tools.SVParser]
lean_lib «Tests» where
-- Test circuits library
@[default_target]
lean_exe «sparkle» where
root := `Main
lean_exe «verilog-tests» where
root := `Tests.VerilogTests
supportInterpreter := true
-- Smoke-runs the Signal-DSL counter from docs/Tutorial.md Step 1 so CI
-- verifies the `#eval` path actually executes (not just type-checks).
lean_exe «tutorial-smoke» where
root := `Tests.Tutorial.SmokeTest
supportInterpreter := true
lean_exe «sparkle-bitnet-verilog-dump» where
root := `Tests.BitNet.SparkleBitNetVerilogDump
lean_exe «sparkle-rv32-sim» where
root := `Tests.RV32.SimTest
lean_exe «sparkle-rv32-min» where
root := `Tests.RV32.MinTest
lean_exe «rv32-flow-test» where
root := `Tests.RV32.TestFlowMain
lean_exe «rv32-lean-sim-runner» where
root := `Tests.RV32.LeanSimRunner
lean_exe «rv32-jit-test» where
root := `Tests.RV32.JITTest
lean_exe «rv32-jit-loop-test» where
root := `Tests.RV32.JITLoopTest
lean_exe «rv32-jit-cycle-skip-test» where
root := `Tests.RV32.JITCycleSkipTest
supportInterpreter := true
lean_exe «rv32-jit-oracle-test» where
root := `Tests.RV32.JITOracleTest
supportInterpreter := true
lean_exe «rv32-jit-dynamic-warp-test» where
root := `Tests.RV32.JITDynamicWarpTest
supportInterpreter := true
lean_exe «rv32-jit-speculative-warp-test» where
root := `Tests.RV32.JITSpeculativeWarpTest
supportInterpreter := true
lean_exe «rv32-jit-boot-oracle-test» where
root := `Tests.RV32.JITBootOracleTest
supportInterpreter := true
lean_exe «oracle-accuracy-test» where
root := `Tests.RV32.OracleAccuracyTest
supportInterpreter := true
lean_exe «rv32-jit-linux-boot-test» where
root := `Tests.RV32.JITLinuxBootTest
supportInterpreter := true
lean_exe «h264-jit-test» where
root := `Tests.Video.H264JITTest
supportInterpreter := true
lean_exe «h264-jit-pipeline-test» where
root := `Tests.Video.H264JITPipelineTest
supportInterpreter := true
lean_exe «h264-bitstream-test» where
root := `Tests.Video.H264BitstreamTest
supportInterpreter := true
lean_exe «h264-playable-test» where
root := `Tests.Video.H264PlayableTest
supportInterpreter := true
lean_exe «h264-frame-encoder-test» where
root := `Tests.Video.H264FrameEncoderTest
supportInterpreter := true
lean_exe «h264-mp4-encoder-test» where
root := `Tests.Video.H264MP4EncoderTest
supportInterpreter := true
lean_exe «cdc-multi-clock-test» where
root := `Tests.CDC.MultiClockTest
supportInterpreter := true
lean_exe «sim-runner-test» where
root := `Tests.Sim.SimRunnerTest
supportInterpreter := true
lean_exe «bitnet-soc-test» where
root := `Tests.Integration.BitNetSoCTest
supportInterpreter := true
lean_exe «timemux-sim-test» where
root := `Tests.Synthesis.TimeMuxSim
supportInterpreter := true
lean_exe «golden-compare-test» where
root := `Tests.Synthesis.GoldenCompare
supportInterpreter := true
lean_exe «ffn-golden-test» where
root := `Tests.Synthesis.FFNGolden
supportInterpreter := true
lean_exe «toplevel-sim-test» where
root := `Tests.Synthesis.TopLevelSim
supportInterpreter := true
lean_exe «svparser-test» where
root := `Tests.SVParser.ParserTest
supportInterpreter := true
lean_exe «verilog-sim-example» where
root := `Examples.SVParser.VerilogSim
supportInterpreter := true
lean_exe «generate-verify» where
root := `Tools.SVParser.GenerateVerify
supportInterpreter := true
lean_exe «circuit-sim-test» where
root := `Tests.Circuit.SimTest
supportInterpreter := true
lean_exe «mext-rv32i-test» where
root := `Tests.SVParser.MExtRv32iTest
supportInterpreter := true
lean_exe «mul-oracle-test» where
root := `Tests.RV32.MulOracleTest
supportInterpreter := true
lean_exe «litex-test» where
root := `Tests.SVParser.LiteXTest
supportInterpreter := true
lean_exe «drone-closed-loop-test» where
root := `Tests.Integration.DroneClosedLoopSim
supportInterpreter := true
@[test_driver]
lean_exe «test» where
root := `Tests.AllTests
supportInterpreter := true