Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Partial Reconfiguration Example Design with Flash

Partial Reconfiguration Example Design with Flash



This is a PR example design developed on Stratix V FPGA Dev Kit using ACDS 13.1.

  • Internal host with bitstreams in Flash
  • Static region:
  • Nios II program PR bitstream into external flash
  • Total of 4 PR regions with each one contains of 2 personas:
  • Persona 1: slow blinking led
  • Persona 2: fast blinking led
  • Media:Pr_design_example_with_flash.zip

Here is a simpler design that only has 1 PR region with 2 personas 


Out of Box Experience

  • The attached design is ready with compiled sof file and rbf file for each persona, if you want to hands on directly, skip to program the sof and flash. If you recompile the design, you might want to regenerate the updated rbf for the persona:

quartus_cpf -p output_files/s5gxea7_fpga_bup.x8y13.msf output_files/s5gxea7_fpga_bup.sof output_files/s5gxea7_fpga_bup.x8y13.pmsf

quartus_cpf -p output_files/pr.x8y13.msf output_files/pr.sof output_files/pr.x8y13.pmsf

quartus_cpf -c output_files/s5gxea7_fpga_bup.x8y13.pmsf output_files/s5gxea7_fpga_bup.x8y13.rbf

quartus_cpf -c output_files/pr.x8y13.pmsf output_files/pr.x8y13.rbf

bin2flash --input=output_files/s5gxea7_fpga_bup.x8y13.rbf --output=output_files/s5gxea7_fpga_bup.x8y13.flash --location=0x021C0000

bin2flash --input=output_files/pr.x8y13.rbf --output=output_files/pr.x8y13.flash --location=0x023C0000


quartus_cpf -p output_files/s5gxea7_fpga_bup.x18y27.msf output_files/s5gxea7_fpga_bup.sof output_files/s5gxea7_fpga_bup.x18y27.pmsf

quartus_cpf -p output_files/pr.x18y27.msf output_files/pr.sof output_files/pr.x18y27.pmsf

quartus_cpf -c output_files/s5gxea7_fpga_bup.x18y27.pmsf output_files/s5gxea7_fpga_bup.x18y27.rbf

quartus_cpf -c output_files/pr.x18y27.pmsf output_files/pr.x18y27.rbf

bin2flash --input=output_files/s5gxea7_fpga_bup.x18y27.rbf --output=output_files/s5gxea7_fpga_bup.x18y27.flash --location=0x025C0000

bin2flash --input=output_files/pr.x18y27.rbf --output=output_files/pr.x18y27.flash --location=0x027C0000


quartus_cpf -p output_files/s5gxea7_fpga_bup.x20y26.msf output_files/s5gxea7_fpga_bup.sof output_files/s5gxea7_fpga_bup.x20y26.pmsf

quartus_cpf -p output_files/pr.x20y26.msf output_files/pr.sof output_files/pr.x20y26.pmsf

quartus_cpf -c output_files/s5gxea7_fpga_bup.x20y26.pmsf output_files/s5gxea7_fpga_bup.x20y26.rbf

quartus_cpf -c output_files/pr.x20y26.pmsf output_files/pr.x20y26.rbf

bin2flash --input=output_files/s5gxea7_fpga_bup.x20y26.rbf --output=output_files/s5gxea7_fpga_bup.x20y26.flash --location=0x029C0000

bin2flash --input=output_files/pr.x20y26.rbf --output=output_files/pr.x20y26.flash --location=0x02AC0000


quartus_cpf -p output_files/s5gxea7_fpga_bup.x19y62.msf output_files/s5gxea7_fpga_bup.sof output_files/s5gxea7_fpga_bup.x19y62.pmsf

quartus_cpf -p output_files/pr.x19y62.msf output_files/pr.sof output_files/pr.x19y62.pmsf

quartus_cpf -c output_files/s5gxea7_fpga_bup.x19y62.pmsf output_files/s5gxea7_fpga_bup.x19y62.rbf

quartus_cpf -c output_files/pr.x19y62.pmsf output_files/pr.x19y62.rbf

bin2flash --input=output_files/s5gxea7_fpga_bup.x19y62.rbf --output=output_files/s5gxea7_fpga_bup.x19y62.flash --location=0x02CC0000

bin2flash --input=output_files/pr.x19y62.rbf --output=output_files/pr.x19y62.flash --location=0x02EC0000


  • Program the sof into the board

nios2-configure-sof output_files/s5gxea7_fpga_bup.sof


  • Program the flash before you run the partial reconfiguration

nios2-flash-programmer --base=0x0 --program output_files/s5gxea7_fpga_bup.x8y13.flash

nios2-flash-programmer --base=0x0 --program output_files/pr.x8y13.flash

nios2-flash-programmer --base=0x0 --program output_files/s5gxea7_fpga_bup.x18y27.flash

nios2-flash-programmer --base=0x0 --program output_files/pr.x18y27.flash

nios2-flash-programmer --base=0x0 --program output_files/s5gxea7_fpga_bup.x20y26.flash

nios2-flash-programmer --base=0x0 --program output_files/pr.x20y26.flash

nios2-flash-programmer --base=0x0 --program output_files/s5gxea7_fpga_bup.x19y62.flash

nios2-flash-programmer --base=0x0 --program output_files/pr.x19y62.flash


  • Select the persona using the switch, then press button (PB2) to initial the PR

0x0: LED2 to fast blinking

0x1: LED2 to slow blinking

0x2: LED4 to fast blinking

0x3: LED4 to slow blinking

0x4: LED5 to fast blinking

0x5: LED5 to slow blinking

0x6: LED6 to fast blinking

0x7: LED6 to slow blinking


  • Other LEDs:

LED0: blinking to show static region is running

LED1: indicate PR error 

Version history
Revision #:
1 of 1
Last update:
‎06-27-2019 12:13 AM
Updated by:
 
Contributors