mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-26 14:46:05 +00:00
Update quickstart demo
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
93e7e1d1e2
commit
45a11da8ea
3 changed files with 10 additions and 6 deletions
19
docs/examples/quickstart/demo.sv
Normal file
19
docs/examples/quickstart/demo.sv
Normal file
|
@ -0,0 +1,19 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue