Altera_Forum
Honored Contributor
20 years agoNios sim with Modelsim for LCD and DMA
**********************************************************************
***** Sorry I posted this twice, I meant to post in software discussion board********* ********************************************************************** Hello, I am trying to run nios sim to test a new LCD module. I have included a DMA as part of this system. I have defined an array an a pointer to that array as below: unsigned short lcd_frame_buffer[HORZ_PIX * VERT_PIX]; int main(void) . . . uncached_buffer = (unsigned short *)(alt_remap_uncached( (void *)(main_frame_buffer), (alt_u32)(HORZ_PIX * VERT_PIX))); My question is how and where do I initialize this data for a Modelsim simulaiton? I know that the array gets allocated memory in the .bss portion of the data code, but this is supposed to be zero initialization, right? I want to make a small perl script that initalizes the sram_comp_laneX.data files used by modelsim, intializing memory from the C code takes too long. But I am unsure where to initialize, the .bss portion or the stack? Any tips greatly appreciated. Thanks, -Ray