Forum Discussion

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

DMA Transmit

Help!

alt_dma_txchan_send(). The prototype is:

typedef void (alt_txchan_done)(void* handle);

int alt_dma_txchan_send (alt_dma_txchan dma,

const void* from,

alt_u32 length,

alt_txchan_done* done,

void* handle);

I want to output a picture to a VGA screen from a Nios II program through an Altera development board.I have a VGA component

in SOPC builder that uses an Avalon slave port supporting the Avalon streaming transfer mode. In this system, the Avalon DMA

controller (included with SOPC Builder) performs bulk data transfers from memory to the VGA peripheral. There is a problem

about the alt_dma_txchan_send().I use alt_dma_txchan_send() to post a transmit request.When the number of bytes of data that

i want to transmit is smaller than argument 'length' in alt_dma_txchan_send(),what will happen?Access Violation?Pointer is out of range?

for example:

unsigned short main_frame_buffer[640* 480];

alt_dma_txchan_send ( tx_chan,

(const void*)(main_frame_buffer),

(( 640*480) + 640) * 2 * 2,

(alt_txchan_done *)(dma_done),

(void*)(&isr_context));
No RepliesBe the first to reply