Forum Discussion
Altera_Forum
Honored Contributor
15 years agoYou could include a reset signal input that would load the value from the initial input to the totalbits value.
You can design your process this way:PROCESS (clk,reset)
IF (reset='1') THEN
-- initialization of signals and outputs
ELSIF (clk'EVENT AND clk='1') THEN
-- counting
END IF;
END PROCESS; To change from hexadecimal to decimal you can use the arithmetic library and divisions by 10.