nextpnr/ice40/smoketest/attosoc/attosoc_tb.v
David Shah 51155ec6a7 ci: Add attosoc smoketest for ice40
Signed-off-by: David Shah <davey1576@gmail.com>
2018-12-08 17:09:27 +00:00

33 lines
519 B
Verilog

module testbench();
integer out;
reg clk;
always #5 clk = (clk === 1'b0);
initial begin
out = $fopen("output.txt","w");
$dumpfile("testbench.vcd");
$dumpvars(0, testbench);
repeat (100) begin
repeat (256) @(posedge clk);
$display("+256 cycles");
end
$fclose(out);
#100;
$finish;
end
wire [7:0] led;
always @(led) begin
#1 $display("%b", led);
$fwrite(out, "%b\n", led);
end
attosoc uut (
.clk (clk ),
.led (led )
);
endmodule