Forum Discussion
Altera_Forum
Honored Contributor
15 years agovhdl stopwatch with LPM RAM
Hi, I am doing a lab assignment about a VHDL stopwatch. this watch can store 16 32-bits timestamp in the memory. and when readmode = '1', the stopwatch will show the timestamps. below i...
Altera_Forum
Honored Contributor
15 years agoFirst problem I see:
------------------------reset Memory------------------------
for i in 0 to 15 loop
addr <= r_counter;
r_counter := r_counter + 1;
end loop;
Your address actually increments by 16 on each clock, so the addresses in between are not written to. Also, you have included std_logic_unsigned and numeric_std. You should only use one or the other - (numeric_std is a standard package, std_logic_unsigned is not an IEEE standard). Did you have any problems other than these?