Forum Discussion
Altera_Forum
Honored Contributor
12 years agoAre you making a counter with synchronous reset? An possible code is:
process(rst, clk_plstr) begin if(rst='1') then count_reg <= ( others => '0' ); elsif(clk_plstr'event and clk_plstr='1') then count_reg<=count_next; end if; end process; count_next <= ( others =>'0' ) when (plsrep='1') else count_reg+1; Do you need to generate plsrep too?