Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Qsys tells it's an altera_avalon_onchip_memory2, I don't know if it's the same as altsyncram... --- Quote End --- Looking at the Qsys GUI is not the same as reading the code. Generate your Qsys system, and then look at the synthesis code. There will be either a component instance called altera_avalon_onchip_memory2 or there will be a file with that name. It will use an altsyncram :) --- Quote Start --- The address is controlled by a VHDL line:
addr <= std_logic_vector(to_unsigned(tstep, addr'length)); Tell me if I shouldn't do that. --- Quote End --- If the RAM is in Qsys, then you don't get to control it, unless of course you have added a dual-ported RAM to your Qsys system and exported one side of the RAM to the top-level. Either way, this is not enough code to tell what you are doing. Basically it looks like you're converting an integer tstep to a std_logic_vector, but you have not shown how you update tstep. --- Quote Start --- Thanks for that. Is the Memory Initialization File better? --- Quote End --- Better than what? You asked how you can initialize it from file. You can use RAM/ROM initialization files when you want the RAM to contain "something" at power-on, eg., a processor bootloader program. Whether you need an initialization file or not depends on what you are trying to do. Cheers, Dave