A SystemVerilog compiler and simulator. It builds a design into a native program and runs it.
// momentum
+2β since featured on SilentStars (2026-10-09)
featured in
- Edition #16 new featured on Bluesky Β· new commits
// why it's here
- Active: last commit 1 day ago
- Built almost entirely by one person
- Health 84/100 with only 7 stars
// how to help
// readme
Lyra
Lyra is a SystemVerilog compiler and simulator. It builds a design into a native program and runs it. Itβs built on slang and LLVM.
Building Lyra
Lyra is built from source with Bazel, through bazelisk. The build fetches the compiler and the C++ library it needs, so nothing else has to be installed first.
git clone https://github.com/hankhsu1996/lyra
cd lyra
bazel build //:lyra
The command is then bazel-bin/lyra; the examples below call it lyra. It runs on x86-64 Linux,
and CONTRIBUTING.md says which Linux and which C++ compiler release it needs.
Your first simulation
Save this as counter.sv:
module counter_tb;
logic clk = 0;
logic [3:0] count = 0;
always #5 clk = ~clk;
always @(posedge clk) count <= count + 1;
initial begin
repeat (3) begin
@(negedge clk);
$display("%0t: count = %0d", $time, count);
end
$finish;
end
endmodule
Run it: