Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHi,
try this process(I didn't test the code, expect some syntax issues) signal count : integer range 0 to 9; process(reset,r_clk) -- add reset to your module begin if reset='1' then count <= 0; trigger <= '0'; r_data <= (others => '0'); elsif rising_edge(r_clk) then if(ready = '1')then r_data<=rom(count); if(count = 9)then count <= 0; trigger <= '1'; else count <= count + 1; trigger <= '0'; end if; end if; end if; end process; counter <= count; -- or move this up if you need addr/data together