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
227 B

SUBDESIGN sec_cnt
(
clk : INPUT;
second : OUTPUT;
)
VARIABLE
count[25..0] : DFF;
BEGIN
count[].clk = clk;
IF ((count[].q == 50000000)) THEN
count[].d = 0;
second = VCC;
ELSE
count[].d = count[].q + 1;
second = GND;
END IF;
END;