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.
12455 Discussions

F2H Avalon Bridge f2h_sdram0_data_waitrequest got stuck

Honored Contributor II

Hi all, 


I met a problem hope someone can help. 


I am using f2h_sdram0 to access the SDRAM. After building HPS system, I got the hps.xml file in handoff folder, part of the code is: 


<config name='F2SDRAM_COMMAND_PORT_USED' value='0x1' /> 

<config name='F2SDRAM_READ_PORT_USED' value='0x3' /> 

<config name='F2SDRAM_WRITE_PORT_USED' value='0x3' /> 

<config name='F2SDRAM_RESET_PORT_USED' value='0x133' /> 


So looks like I have initialized the F2SDRAM reset signals. But sometimes the f2h_sdram0_data_waitrequest signal will always be high voltage? 


So which option in HPS settings can change or influence that? Or it's because of some u-boot related issues? 


Thank you
0 Kudos
4 Replies
Honored Contributor II


I think I'm exactly in the same situation. I use a DMA CONTROLLER to transfer data from the HPS DDR to the FPGA side by using the F2SDRAM0 port. 

Set up works fine until I try to start the DMA. BUSY flag rise immediately in the DMA CONTROLLER indicating that transfer start but no data are move (length size counter never decrease). DMA is stuck...  


Which device are you using? 

I'm working on a Achille board with ARRIA10 SOC component with quartus 16.1 


I read many thread about configuring UBOOT to enable the F2SDRAM bridge but it was for older device... 


Sorry, i think it's not the kind of answer you were expecting but maybe with sharing experience, ligth will show up... 


Honored Contributor II

Hi guys,  


I'm facing the same problem with a slightly different design.  

I have a Cyclone V SX with fpga2sdram enabled. Firmware is loaded by linux in userland with the device tree overlay method. 


My DMA accesses are fine but once in a while, the wait_request signal get stuck at '1' and I have to reset the board to get it back to a functional state.  


I have seen that there are several threads here with no answer from Altera. Also I found this article :


I'll be glad to know if the problem is on the die and/or if there are some tips/workaround to make it work. 


Honored Contributor II


The solution for me was to re-compile UBOOT with the new hps.xml file generated by quartus. 

In this file, according to my design, the F2SDRAM port is enable, so the device at power up start with the good configuration. 


UBOOT factory configuration that I was using on the Achille development kit, only enable the HPS to FPGA LW bridge.  


Honored Contributor II

Well, I found something functional so far. 


First, I have deactivated the fpga2sdram bridge in the device tree loaded with linux. 

fpgabridge1: fpgabridge@0xffc25080 { compatible = "altr,socfpga-fpga2sdram-bridge"; reg = <0xffc25080 0x4>; bridge-enable = <0>; };  

Then once in userland : 


1- I force the fpga2sdram driver to unbind 

echo -n "ffc25080.fpgabridge" > /sys/devices/platform/soc/ffc25080.fpgabridge/subsystem/drivers/altera_fpga2sdram_bridge/unbind  

2- I load the FPGA with the device tree overlay method.  

In the overlay, there is a fragment to enable the fpga2sdram bridge  

fragment@1 { target = <&fpgabridge1>; __overlay__ { bridge-enable = <1>; }; }; 


3- I rebind the fpga2sdram driver 

echo -n "ffc25080.fpgabridge" > /sys/devices/platform/soc/ffc25080.fpgabridge/subsystem/drivers/altera_fpga2sdram_bridge/bind  

With this, I haven't see any issues anymore. I just hope it will last.