Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Usage of DMA from PIO to SDRAM shared by NIOS

Hello everybody,

I was wondering if someone could respond to my following question connected with DMA:

I have functional NIOS II system with TSE and SDRAM as a main data and instruction memory. I am working with the uCOS II. Now in the Qsys I have put PIO and classic DMA controller for the ADC data sampling. I would like to use this DMA to copy some data block, let's say 2MB from the PIO (synchronously with the system clock frequency) to some section in the SDRAM (obviously somewhere outside the code and data size).. I have used this configuration previously but my old NIOS was working with the onchip memory as a data and instruction memory and the DMA was accessing another memory.

But now I am using that SDRAM also for code/data. Is it possible to do such a DMA transaction when the SDRAM is also shared by the processor instruction and data?

Thanks in advance,

Jan

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    There is also an alt_uncached_malloc() function in sys/alt_cache.h . I didn't have a look at the code to check if it would align the buffer with cache lines or not though.