Sign in
foss-fpga-tools
/
third_party
/
yosys
/
bf16a3a37273e3e9a84a2aa03c868092899b63c3
/
.
/
manual
/
PRESENTATION_Intro
/
counter.v
blob: 36b878e31328a9647e7876881f1afd877a9c169d [
file
] [
log
] [
blame
]
module
counter
(
clk
,
rst
,
en
,
count
);
input clk
,
rst
,
en
;
output reg
[
1
:
0
]
count
;
always
@(
posedge clk
)
if
(
rst
)
count
<=
2
'd0;
else if (en)
count <= count + 2'
d1
;
endmodule