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

How to make faster Linux to FPGA's On-Chip RAM access

I've connect FPGA's On-Chip RAM's Avalon Slave to h2f_axi_master and Clock to h2f_user0_clock, 100 MHz. 

In Linux I've mmap On-Chip RAM 

fd_IQ_RAM = open("/dev/mem", O_RDWR|O_SYNC); mem_IQ_RAM = (unsigned int *)mmap(NULL, MAP_IQ_RAM_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd_IQ_RAM, MAP_IQ_RAM_BASE); 

 

RAM is filled in FPGA and in Linux I send data from RAM to Ethernet: 

 

while (...) { ret_val = sendto(sock, (void * )(mem_IQ_RAM), sizeof(data_in_RAM), 0, (struct sockaddr *) &echoclient, sizeof(echoclient)); }  

 

 

Transfer speed is 12...19 MB/s or less, if I send data from SDRAM unsigned int mem_IQ_RAM; then speed is more than 40 MB/s. 

 

What is wrong? How can I make it faster?
0 Kudos
0 Replies
Reply