This commit is contained in:
Curt Spark 2025-11-15 12:16:43 +00:00
commit a00343ed91
4 changed files with 51 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
obj_dir/
*.vcd

14
overture.sv Normal file
View File

@ -0,0 +1,14 @@
module overture(
in,
out
);
input [7:0] in;
output reg [7:0] out;
always@(*) begin
foreach (input[i]) begin
out[i] = !in[i]
end
end
endmodule

22
overture_tb.sv Normal file
View File

@ -0,0 +1,22 @@
module overture_tb;
reg [7:0] in;
reg [7:0] out;
overture dut(in, out);
initial begin
$dumpfile("overture_dump.vcd");
$dumpvars();
in = 8'b00000001;
out = 8'b00000000;
#10;
#10;
in = 8'b11111111;
#10;
in = 8'b00000001;
#10;
$finish;
end
endmodule

13
run.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Compile simulation and dump with timing for waveform analysis
verilator --binary overture.sv overture_tb.sv --top overture_tb --trace-vcd --timing
# Run compiled simulation
./obj_dir/Voverture_tb
# Close old session
pkill gtkwave
# Launch new session
gtkwave overture_dump.vcd &