- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to access the switches on the tersIC DE0-Naoo-SoC board from Linux. I load the appropriate FPGA and access the LW bridge (with a c program). Everything works fine.
But if, due to eg. misconfiguration, the FPGA is not loaded with the appropriate file the Linux programm will hang forever when accesing the bridge. Thus stopping the complete system! Is there a way to check from Linux if the address I want to access will work? JoachimLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I am not mistaken, you can check the status of the bridge via:
cat /sys/class/fpga-bridge/fpga2hps/enable cat /sys/class/fpga-bridge/hps2fpga/enable cat /sys/class/fpga-bridge/lwhps2fpga/enable https://rocketboards.org/foswiki/view/documentation/gsrd131programmingfpga- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi sunshine,
the bridges are enabled: root@jwde0soc:~# cat /sys/class/fpga-bridge/lwhps2fpga/enable 1 root@jwde0soc:~# cat /sys/class/fpga-bridge/hps2fpga/enable 1 root@jwde0soc:~# cat /sys/class/fpga-bridge/fpga2hps/enable 1 Still the program hangs when reading from an lwhps2fpga-Address (mapped with /dev/mem). Joachim- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi sunshine, the bridges are enabled: root@jwde0soc:~# cat /sys/class/fpga-bridge/lwhps2fpga/enable 1 root@jwde0soc:~# cat /sys/class/fpga-bridge/hps2fpga/enable 1 root@jwde0soc:~# cat /sys/class/fpga-bridge/fpga2hps/enable 1 Still the program hangs when reading from an lwhps2fpga-Address (mapped with /dev/mem). Joachim --- Quote End --- Looks like checking the bridge status may not be a viable option... since the hang happen if the FPGA is misconfigured, perhaps another way is to use the HPS FPGA manager to ensure that the configuration is executed successfully?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can check the state of the FPGA configuration with:
cat /sys/class/fpga/fpga0/status
A well configured FPGA should return: "user mode".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nope. The FPGA is configured sucessfully. But with the wrong rbf.
The main problem is if some setup is wrong the FPGA does not have a register at the address I access. I could figure out from my software if I get a valid result. But the whole systems hangs after an access. So I am looking for a way to check prior to accessing the address. My customers want to build a drives control system with this and they don't like that some Linux process can hang up the whole system by just accessing a wrong address.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This sounds like a design bug. Do you have any idea, why the the system hangs up? The only reasons i had so far are:
- unconfigured FPGA
- missing bridge in design
- FPGA Design in reset, or missing clock
- wrong handled waitrequest in design
- timing issue

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page