Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThe signal does not hold its value outside clock edge
Please help me with an error in my code.
I need that when a button is pressed, the signal changes its value. But the quartus says he can not infer a register for it. I found a resolution, which is here:http://quartushelp.altera.com/14.0/mergedprojects/msgs/msgs/evrfx_vhdl_is_not_synthesizable_since_it_does_not_hold_its_value.htm . But I do not know the reset utility there. Only need the button. Thank you. Code: accept_seconds: PROCESS(enable,data) --processo de aceitar ou não os segundos inseridos.
BEGIN
-- IF(enable='0') THEN
IF(FALLING_EDGE(enable)) THEN
IF(data>="000000" AND data<="111011") THEN
tempoutput <= '1';
tempsave <= '1';
ELSE
tempoutput <= '0';
tempsave <= '0';
END IF;
-- END IF;
ELSE
tempsave <= '0';
END IF;4 Replies
- Altera_Forum
Honored Contributor
Put the enable inside the clock...
- Altera_Forum
Honored Contributor
how? I didn't understand.
- Altera_Forum
Honored Contributor
Currently toy have an asynchronous enable. Make it synchronous by making the clock the outer most thing in the process.
- Altera_Forum
Honored Contributor
I see that there are two lines commented out, these change the functionality of the code enormously as the END IF is for the second for loop. Was this something you did to try and get it working?