mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-27 07:06:04 +00:00
Add docs/examples/abstract
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
f918e2369a
commit
afe6960ffe
6 changed files with 124 additions and 0 deletions
19
docs/examples/abstract/demo.v
Normal file
19
docs/examples/abstract/demo.v
Normal file
|
@ -0,0 +1,19 @@
|
|||
module demo (
|
||||
input clock,
|
||||
input reset,
|
||||
output A, B, C, D
|
||||
);
|
||||
reg [19:0] counter = 0;
|
||||
|
||||
always @(posedge clock) begin
|
||||
if (reset)
|
||||
counter <= 0;
|
||||
else
|
||||
counter <= counter + 1;
|
||||
end
|
||||
|
||||
assign A = counter == 123456;
|
||||
assign B = counter == 234567;
|
||||
assign C = counter == 345678;
|
||||
assign D = counter == 456789;
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue