You are on page 1of 28

Generation of .pof file from .

sof file for Altera FPGA


http://www.chroniclesofatechnophile.com/2013/06/generation-of-pof-file-from-sof-file.html

What is .sof & .pof file?


-> .sof is SRAM Object File & .pof is Programming Object File. Both files are used to configure
FPGA.
FPGA contains SRAM. It holds the design configuration. To configure that memory .sof file is used.
SRAM is volatile memory, during every power cycle it is necessary to reprogram FPGA. FPGA can
be configured automatically using external non volatile memory. These memories can be Compact
Flash Memory cards or dedicated high density flash memory.
.pof file is used to configure such non volatile memories. FPGA has capability to access these
memories and its internal logic can configure SRAM from external memory. So no need to
configure FPGA manually.

Step 1:
Download and install QuartusII

Step 2:
Run QuartusII and go to "File Menu-> Convert Programming Files"

Step 3:
In Convert Programming File window select
a) Programming File Type as .pof
b) Configuration device (in my case EPCS64)
c) Select path and file name for output file
Step 4:
Now click on SOF Data as shown in below image and click on Add File

Step 5:
Browse .sof file using Select Input File browser and click on Open
Step 6:
Now click on Generate button in Convert Programming File window

Step 7:
If everything is OK then QuartusII will show message of success

Step 8:
Programming .pof file to Serial Configuration Device
a) Connect FPGA board to PC using USB Cable (Make sure you have connected to USB Blaster)
b) Select Serial Configuration Memory using slide switch(Prog Mode) on FPGA board and power on
the FPGA board
c) Go to "Tools Menu->QuartusII Programmer" in QuartusII
d) Select "Mode" as "Active Serial Programming"
e) Click on Add file button and browse generated .pof file
f) Now Click on Start button. Programming may take couple of minutes. Time depends on size of
the file
g) After successful operation power of the board and select "Run Mode" using slide switch instead
of "Prog Mode". After powering on the board and you will find FPGA is working.
Sometimes it happens that QuartusII Programmer fails to detect Byte Blaster (USB JTAG). In this
case check whether drivers are installed on not. You may locate drivers in
"X:/altera/tool_version/quartus/drivers/usb-blaster-ii". X is the installation directory. In my case
tool_version was 13.0.
Then Click on "Hardware Setup" button in QuartusII Programmer. In Available Hardware items you
will find USB Blaster. Double click on USB Blaster and close the window. If you select USB Blaster
properly the you will find name of USB Blaster next to the Hardware Setup Button in QuartusII
Programmer.

Now you can program external configuration memory like EPCS64 using QuartusII Programmer with
generated .pof file

Story (Ram kahani) behind exploration:

BitCoin is emerging as new kind of digital currency. My friend Anurag is mining


BitCoins.
He knows that I work with FPGAs, typically ALTERAs FPGA. One day he
found https://github.com/fpgaminer/Open-Source-FPGA-Bitcoin-Miner.
Some geek had implemented BitCoin mining on FPGA. FPGAs are capable to provide
significant performance compared to Laptops we are having. So he asked me, is it
possible port that design to my ALTERA FPGA board. I checked details and informed
him that already developer has ported on ALTERA DE2-115 Board and I own ALTERA
DE2-115 Cyclone IV FPGA Board. But I found that developer has provided .sof file. Due
to this my friend may need to reprogram FPGA even DE2-115 board is having serial
configuration device. If I can program that device then he need to power up FPGA and
need to run some script on PC so that FPGA can communicate over internet through
PC and can start mining BitCoin.

I have followed above procedure to generate .pof file from .sof file.

Chapter 4 Setting for change .sof file to .pof file


http://www.terasic.com.tw/wiki/Chapter_4_Setting_for_change_.sof_file_to_.pof_file
4.1 Change .sof file to .pof file
In this chapter, we will introduce how to change .sof file to .pof file with Quartus(Use DE5-NET
A7 device), .pof file can be configured into flash. We also will save the setting as .cos setting file
and use it for Shell Script.
1. User can complete below steps in computers which installed Quartus.
2. Open Quartus, choose File-->Convert Programming Files.

3. In Convert Programming Files window:

a. Programing file type: Choose .pof


b. Configuration device: Choose CFI_2Gb
c. Mode: Choose Passive Parallel x32
d. If it is necessary, modify the .pof file name and path
4.Click Options/Boot info..,modify the Option bit address to 0x030000 in Options window.
5.Choose SOF Data, then click Add File
6.Choose right .sof file and click Open.
7.Choose SOF Data, then click Properties.
8.In SOF Data Properties window, set it as below.
9.The Start Address of SOF Data Page_0 was changed.
10.Choose Add Sof Page, add a new Sof Page for another .sof file.
11.A new Page 1 SOF Data appeared as below, choose it then click Add File.
12.Choose right image file and click Open.
13.Choose SOF Data Page 1 then click Properties.
14.See Properties window as below, start address is 0x20C0000.
15.Confirm each Start Address of .sof file, click Generate to generate .pof file.
16.Press Save Conversion Setup to save this setting, save as .cof file.
17.Users can edit .cof file, remove the .sof file path, keep the .sof file name, then can be used for
Shell Script.
4.2
Configu
re .pof
file for
DE5-
NET AB
device.
If FPGA of DE5-NET board is AB device, the steps are similar to A7 device as below.
1.Download flash configuring toolkits
from http://mail.terasic.com.tw/~johnny/release/de5_net/flash_programming_ab.zip
2.Refer to above section 4.1, change .sof file to .pof file, the option bit and sof start address are
the same as A7 if only configure one .sof file into flash.
3.If configure a second .sof into flash, set start address of the second .sof as 0x02A00000.
Because .sof file of AB device is larger, the start address of the second .sof file will be larger.

4.Other remain steps are the same as section 4.1.

Generation of PROM File for Altera FPGA

https://www.pantechsolutions.net/fpga-
tutorials/generation-of-prom-file-for-altera-fpga-
universal-development-board
What is .sof & .pof file?
-> .sof is SRAM Object File & .pof is Programming Object File. Both files are
used to configure FPGA.
FPGA contains SRAM. It holds the design configuration. To configure that
memory .sof file is used. SRAM is volatile memory, during every power cycle
it is necessary to reprogram FPGA. FPGA can be configured automatically
using external non volatile memory. These memories can be Compact Flash
Memory cards or dedicated high density flash memory. .pof file is used to
configure such non volatile memories. FPGA has capability to access these
memories and its internal logic can configure SRAM from external memory.
So no need to configure FPGA manually.

Step 1:
Download and install QuartusII

Step 2:
Run QuartusII and go to "File Menu-> Convert Programming Files"

Step 3:
In Convert Programming File window select
☞Programming File Type as .pof
☞Configuration device (in my case EPCS4)
☞Select path and file name for output file

Step 4:
Now click on SOF Data as shown in below image and click on Add File

Step 5:
Browse .sof file using Select Input File browser and click on Open
Step 6:
Now click on Generate button in Convert Programming File window
Step 7:
If everything is OK then QuartusII will show message of success

Step 8:
Programming .pof file to Serial Configuration Device

☞Connect FPGA board to PC using USB Cable (Make sure you have
connected to USB Blaster)
☞Select Serial Configuration Memory using slide switch(Prog Mode) on
FPGA board and power on the FPGA board
☞Go to "Tools Menu->QuartusII Programmer" in QuartusII
☞Select "Mode" as "Active Serial Programming"
☞Click on Add file button and browse generated .pof file
☞Now Click on Start button. Programming done.

You might also like