Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12452 Discussions

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

Honored Contributor II

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