Altera_Forum
Honored Contributor
15 years agocode is simple, error is hard to understand
excuse me, i m a beginner, so the question may be meaningless.
I SIMPLY WROTE MY CODE LIKE: process(a_in , clk) begin if clk'event and clk='1' then c_out<=a_in; else c_out<='0'; end if; end process; then i met the error like this:"Can't infer register for 'c_out' at test.vhd(20) because it does not hold its value outside the clock edge". i think i have wrote "else c_out<=' 0'; " why Quartus II still says it does not hold its value outside the clock edge? WHEN I CHANGE THE CODE TO: c_out <= a_in; if clk'event and clk='1' then c_out<=a_in; end if; IT DOESN'T REPORT ANY ERRORS. BUT WHEN IT IS c_out <= '1'; if clk'event and clk='1' then c_out<=a_in; end if; THE SAME ERROR OCCURS. so, could anyone give some help?