You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
235 B
17 lines
235 B
4 years ago
|
SUBDESIGN sec_cnt
|
||
|
(
|
||
|
clk : INPUT;
|
||
|
second : OUTPUT;
|
||
|
)
|
||
|
VARIABLE
|
||
|
count[25..0] : DFF;
|
||
|
BEGIN
|
||
|
count[].clk = clk;
|
||
|
IF ((count[].q == 5)) THEN
|
||
|
count[].d = 0;
|
||
|
second = VCC;
|
||
|
ELSE
|
||
|
count[].d = count[].q + 1;
|
||
|
second = GND;
|
||
|
END IF;
|
||
|
END;
|