3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-13 16:48:44 +00:00
sby/docs/examples/quickstart/demo.sv
Clifford Wolf 45a11da8ea Update quickstart demo
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-06-29 10:05:52 +02:00

20 lines
292 B
Systemverilog

module demo (
input clk,
output [5:0] counter
);
reg [5:0] counter = 0;
always @(posedge clk) begin
if (counter == 50)
counter <= 0;
else
counter <= counter + 1;
end
`ifdef FORMAL
always @(posedge clk) begin
assert (counter < 32);
end
`endif
endmodule