Sign in
foss-fpga-tools
/
third_party
/
yosys
/
refs/heads/mwk/iopadmap-fixes
/
.
/
examples
/
cmos
/
counter.v
blob: f21658724f641e05fb5b0a3c0e7845da9044a3e6 [
file
] [
log
] [
blame
] [
edit
]
module
counter
(
clk
,
rst
,
en
,
count
);
input clk
,
rst
,
en
;
output reg
[
2
:
0
]
count
;
always
@(
posedge clk
)
if
(
rst
)
count
<=
3
'd0;
else if (en)
count <= count + 3'
d1
;
endmodule