FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5922 Discussions

Linux and Programming the FPGA

Altera_Forum
Honored Contributor II
1,417 Views

Hi 

When we boot DE1-SOC with a Linux, it is possible to put a rbf file in the root directory and during the boot process that file will be used to program the FPGA. I was wondering if there is any solution to program the FPGA directly with Quartus when we boot the board with Linux. 

 

 

Best,
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
461 Views

When we look at all the golden reference design , the Fgpa's rbf file is always keep in the FAT partition of SD card. In the event of the HPS power up first from SD card, this could be use to program the FGPA. Is this what you need?

0 Kudos
Altera_Forum
Honored Contributor II
461 Views

Thanks for you reply. This is what I do right now. Now I don't want to do this anymore. I want to be able to program the FPGA directly from Quartus and run the Linux from SDCARD. But when I try to do that, it fails.  

(When I am not booting the board with Linux, I can program the FPGA directly from Quartus without any problem).
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

you may want to stop the boot-process in uboot-stage, then load the FPGA from Quartus-Programmer, enable the bridges with the correct bridge-handoff and the boot Linux...

0 Kudos
Altera_Forum
Honored Contributor II
461 Views

 

--- Quote Start ---  

Thanks for you reply. This is what I do right now. Now I don't want to do this anymore. I want to be able to program the FPGA directly from Quartus and run the Linux from SDCARD. But when I try to do that, it fails.  

(When I am not booting the board with Linux, I can program the FPGA directly from Quartus without any problem). 

--- Quote End ---  

 

 

wondering why you want to program directly from quartus instead of allow the HPs to take care teh FGPA, for debug purpose only?
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

 

--- Quote Start ---  

wondering why you want to program directly from quartus instead of allow the HPs to take care teh FGPA, for debug purpose only? 

--- Quote End ---  

 

 

Yes exactly. Programming from Quartus is easier and faster compared to copying to programming file to the SDCARD. (I am TA of a course and for students, programming from Quartus is much better).
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

 

--- Quote Start ---  

you may want to stop the boot-process in uboot-stage, then load the FPGA from Quartus-Programmer, enable the bridges with the correct bridge-handoff and the boot Linux... 

--- Quote End ---  

 

 

Thanks. I have no idea how to do this. Is there any documentation describing this or how do you know how to do what you said?
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

 

--- Quote Start ---  

Yes exactly. Programming from Quartus is easier and faster compared to copying to programming file to the SDCARD. (I am TA of a course and for students, programming from Quartus is much better). 

--- Quote End ---  

 

 

I presumed you still need to utilize the hps right? there fore you still nede the hps power up.
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

You could read the documentation in [1] to do so, but if your issue is only related to not copy every step an rbf to the sd-card, you could also try to setup a tftp-server on your server or local machine, connect your borad to that machine and use TFTP as load command for the rbf and then pass the rbf to the FPGA, also from uboot-stage... 

 

[1] http://rocketboards.org/foswiki/view/documentation/gsrd131programmingfpga#fpga_configuration_from_u_45boot
0 Kudos
Altera_Forum
Honored Contributor II
461 Views

Good sharing. This link got some guide to implement this.

0 Kudos
Altera_Forum
Honored Contributor II
461 Views

Configure your u-boot to load the rbf file from a tftp server and make your build script copy the rbf to the tftp directory on your server is the easiest way to go. 

 

But if you really want to run Quartus you could add an rc script (name and location in /etc/ depends upon your Linux) to your SoC Linux which does something like: 

 

ssh my.work.station.ip 'cd /my/design/location; nios2-configure-sof myproject.sof'  

You need to add the ssh keys generated on your SoC to your workstation so you can run ssh without entering a password.
0 Kudos
Reply