Re: [myhdl-list] Pre-Init RAM
Brought to you by:
jandecaluwe
From: Martin S. <ha...@se...> - 2014-07-24 20:17:15
|
Hi all, > > Code exists to enable initial values but the difficult > part has been making sure support is consistent across > synthesis vendors (mainly FPGA). Since we have not had > someone willing to test all the vendors and verify the > generic approach we have not been able to turn it on. > This can be painful and cause support issues, so I wouldn't even start thinking about adding it to MyHDL. I've taken an approach for the VHDL side using generics as initialization value which works ok, but has some minor quirks with various tools (some don't like an initialization of an array with undefined size). Example: constant BOOTROM_DATA_A_INIT : dram_bank_t := ( #include "dram_a_init.tmp" ); In the instanced memory block, the memory init data is passed on like l1_ram_a : entity work.soc_memory_dma generic map ( ... DRAM_INIT => BOOTROM_DATA_A_INIT ) As you can guess, there is some abuse of the cpp involved, also, there are switches to satisfy the tools. Another tool generates the actual memory data content. It gets much more complicated when using non standard bit widths (like 18 bit CPU instructions). There is so much case dependency, that it might be very hard to satisfy everyone. I'd rather see if we can collect a few use cases and tricks from the community and document them. Greetings, - Martin |