10 flash programming on-board flash memoryss17/spartanmc/doc/sp605/10_flash... · – configure the...

19
CCFE is the fusion research arm of the United Kingdom Atomic Energy Authority FPGA Workshop January 2011 Programming on-board flash memory Billy Huang / Graham Naylor

Upload: others

Post on 19-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

CCFE is the fusion research arm of the United Kingdom Atomic Energy Authority

FPGA WorkshopJanuary 2011

Programming on-boardflash memory

Billy Huang / Graham Naylor

Page 2: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

2

FPGA Configuration

• There are two standard ways to configure the FPGA.– Configure it directly over JTAG. However this is volatile as the FPGA

does not remember its configuration after a power reboot.– Configure the flash on the board. The SP601 and SP605 and indeed

many other off-the-shelf FPGA boards are designed so that they willload a specially formatted (PROM) bitstream file from the flash intothe FPGA. This is more desirable so that the FPGA does not need tobe configured on power up every time.

• These slides will guide you through creating the speciallyformatted PROM file from the bitstream, and configuring theFPGA with this file.

• In general there is more than one type of flash on an FPGAboard. The instructions here pertain to the parallel BPI flash,which is generally much faster. Although for multi-bootconfigurations serial SPI is used, since the interface is muchsimpler.

Page 3: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

3

• On the SP605: Set the DIP switches as shown.

Page 4: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

4

• On the SP601: Set the DIP switches as shown.

Page 5: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

5

Create PROM File

• Launch iMPACT. This is a file which can managebitstreams for loading onto FPGAs.

Page 6: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

6

• Hit no or cancel to any of these boxes.

Page 7: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

7

• Double click “Create PROM File”

Page 8: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

8

Select the PROM Settings

• SP605 - JS28F256P30 32MB 16 Bit

• SP601 - TE28F128J3D 16 MB 8 Bit

• Change browse folder to .../sp60X_bist_6b_up_12.2

Page 9: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

9

• OK

• A file browse screen will pop up – navigate to:

• sp60X_bist_6b_up_12.2/SDK/SDK_Workspace_35/hw_platform_0/download.bit

Page 10: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

10

• No

• Ok

• Ok

Page 11: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

11

• Select “Generate File” as highlighted below. You will thenget a “Generate Succeeded” notification.

Page 12: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

12

• Now we have create the .MCS file, which is thebitstream formatted for loading onto the flashmemory.

Page 13: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

13

• Double click boundary scan. Then right click andinitialize chain.

Page 14: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

14

• If initialize chain isn’t working try to power the boardoff and on, and kill any xmd.exe processes.

Page 15: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

15

• Hit no

• Keep pressing Cancel until the popups are gone.

Page 16: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

16

• Navigate to the PROM (.MCS) file which wasinstructed above.

• SP605 - JS28F256P30 32MB 16 Bit

• SP601 - TE28F128J3D 16 MB 8 Bit

Page 17: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

17

• Right click the FLASH box and click program. ClickOk on the next screen.

Page 18: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

18

• You should now find that when you reset the board using the PROGbutton (not the power switch) you will see the text as shown.

• IMPORTANT: If using the on/off switch you will have to close yourterminal program, and re-open it, however in all likelihood you will notopen it in time to see the output – use the reset button instead to see it.

Page 19: 10 FLASH Programming on-board flash memoryss17/SpartanMC/doc/sp605/10_FLASH... · – Configure the flash on the board. The SP601 and SP605 and indeed many other off-the-shelf FPGA

19

• You now have a working microblaze embeddedsystem, running a first stage bootloader. Next weneed to get the second stage bootloader U-Bootcompiled and copied into the flash at your desiredlocation (as mentioned above for this workshop wewant it placed at 0x87180000).