Forum Discussion
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- No. NIOS has a 32-bit wide data bus. If you perform a 128-bit read, the NIOS will actually perform 4 reads to get the data. Jake --- Quote End --- So , what if I use a DMA component to read 128-bit-wide data? For example : //////// Code start////////////# define TRANSFER_SIZE 2 int return_code ; alt_dma_rxchan tx, rx ; if( (tx= alt_dma_txchan_open("/dev/dma")) == 0 ) { printf( "create dma failed" ) ; return -1 ; } if( (rx= alt_dma_rxchan_open("/dev/dma")) == 0 ) { printf(" create dma failed" ) ; return -1 ; } //// configure the DMA alt_dma_txchan_ioctl( tx , ALT_DMA_SET_MODE_128 , (void*) (RAM_BASE) ) ; alt_dma_rxchan_ioctl( rx , ALT_DMA_SET_MODE_128 , (void*)(DEST_BASE) ) ; ///// start transfer return_code = alt_dma_txchan_send( tx , RAM_BASE , TRANSFER_SIZE , 0 , 0 ) ; return_code = alt_dma_rxchan_prepare( rx , DEST_BASE , TRANSFER_SIZE , 0 , 0 ) ; //////// Code end Could I make it work?