Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- The tstep signal is generated like that:
process(clk, tckup)
begin
if rising_edge(clk) then
if (tckup='1') then
wen <= '1';
if tstep<25000 then
tstep <= tstep+1;
end if;
else
wen <= '0';
end if;
end if;
end process; --- Quote End --- This code has some minor coding issues; (1) you do not need tckup in the sensivity list, (2) generally you should not code using integers. Its better to be explicit to synthesis tools so there is no room for ambiguity. In your case you could define tstep as an integer over a limited range. or use an unsigned of an appropriate bit-length. --- Quote Start --- Better than a .hex file? --- Quote End --- .hex files are an industry standard, .mif files are Altera-specific. I personally prefer to stick with standard formats where possible. However, both .hex and .mif initialize RAM, so either is fine. Cheers, Dave