Custom Memory Initialization

Hi, I need your help for some problem using the Xilinx EDK in simulation and profiling.

The system I have designed is composed by a Microblaze and an OPB customized peripheral, built by the peripheral wizard in EDK 8.1. I need to do the simulation (behavioral at the moment) of the system with Modelsim SE. This peripheral (written in Verilog), is built as an overclocked dual port ram as shown in Xapp228 to obtain a quad-port memory. It is implemented by some parallel blocks ram (using the primitive ramb16_s1_s1). I would like to initialize that memory with global variables defined in my program and placed in that memory by means of an attribute and a customer linker script, which defines the section DATAWELL in my memory. For example, on main.c:

int vector[10] __attribute__((section("DATAWELL"))) = {...my data...};

This may be done for a block ram IP predefined by EDK, instead of the memory in my peripheral, because the script which initialize the memory recognises it as well as the microblaze data and istructions memory. Unfortunately it does not recognise my memory on initialization. In fact, the wrapper "system_init.vhd", which has been generated by EDK for behavioral simulation, contains istructions and data memory intialization (and block ram IP predefined by EDK, if defined), not my peripheral memory data. What may I do in order to initialize that memory in simulation?

On profiling my program by means of XMD and the ISS (commands : connect mb sim , etc.), I have noticed that the main has not been executed, even though it does have been executed in every behavioral simulation with Modelsim SE I have done. The commands I digited are:

connect mb sim dow profile + other statistics developping commands stop

This on Debug configuration as recomended on the SDK help chapter about profiling. The profiling results are about the following microblaze initialization routines:

_crtinit _start1 _frame_dummy _program_init

None of the function defined in the main have been executed and no error has been revealed. The main program contains only dummy functions (as "int add(int a, int b);" ) in order to try profiling. In the future I will need to profile a complex program interacting with my opb peripheral by means of "xio.h" macros.

Can anyone give me a solution?

Thank you in Advance Giovanni

Reply to
Alderaan
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.