Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
824 Views

read data from on chip memory

hi: 

In NiosII software ,I use the TSE_MAC function(tse_mac_raw_send) which altera provided can send data OK, 

 

tse_mac_raw_send(send,sizeof(send)); 

char send[] = {...}; 

 

but when I set "on chip memory" manually (the data are the same as the array data in send[] ) and use a pointor to locate the data address like this: 

char * send = ( char *)(ON_CHIP_MEMORY_BASE); 

 

always send failed,I utilize the signaltapII,and find that some data translate OK,and the others false. 

So,I want to ask,on chip memory can be set data manually? 

and is the pointer can be used like above? 

 

 

best regard!~
0 Kudos
5 Replies
Altera_Forum
Honored Contributor I
104 Views

Check in SOPC builder that the two SGDMAs connected to the TSE core are also connected to your on_chip memory (the m_read and m_write ports). If they aren't connected, the DMAs won't be able to read/write the data.

Altera_Forum
Honored Contributor I
104 Views

yes ,the SGDMA_tx read port is connected to on chip memory,and the SGDMA_rx write port is connected to SDRAM.

Altera_Forum
Honored Contributor I
104 Views

What signals are you checking with signaltap? You should monitor the m_read master on the tx DMA and check that it is trying to read the correct address and that nothing is freezing it through the wait_request signal.

Altera_Forum
Honored Contributor I
104 Views

I want to tranlater data which set in "On chip memory",the data are "0x01,0x02,0x03,0x04..."I use the signaltapII review these data, the picture attachments are given . 

 

in picture,there are many "0x00" before transmitting the data"0x01"/"0x02",maybe the "waitrequest" signal of tx_sgdma freezes or something else.
Altera_Forum
Honored Contributor I
104 Views

I have resolve the question,that is reading data out from "On chip memory"by TX_SGDMA ,now the signaltapII wave is OK. 

my way is:in SOPC I set "on chip memory" data width is 32 bits,but I set data in .hex file is 8 bits,so the higher bits will add 0x00s.I change the data width to 32bits.so everything run well~! 

 

 

 

best regard!~
Reply