Forum Discussion
PFL - Flash queries
Hi @YuanLi_S_Intel ,
Wrt one of your replies :
>> We are planning to use our existing I2C slave controller within our Cyclone V FPGA to send the .pof bitstream to the flash (
>> 1) through the PFL? Don't think it's through the PFL. Looks like it will go directly to the flash because our FPGA has direct link to the Flash Address/Data/Control lines. Do you agree here ?
>> Through PFL if the bitstream is sent from MAX V to FLASH. Through I2C / any interface on your design between FLASH and FPGA if there is any if you are sending the bitstream from FPGA to FLASH.
>> from an external host via I2C. But need to make sure we can write to the flash in a way that PFL can recognize.
The bitstream that contains the new remote image application file data eg .pof (whatever comes from the external remote host) will be forwarded to the FPGA (slave I2C controller) via I2C (& aiming to be eventually stored to the flash correct address locations & will NOT be send from MAX V to Flash in this case).
The issue I have and don't understand at the moment is if .pof file gets send to the FPGA via I2C, I2C slave controller only uses 7-bit addressing mode (possibility of 10-bit addressing but will prefer to use it's existing 7bit addressing feature).
The .pof shown addresses eg
BLOCK START ADDRESS END ADDRESS
Page_0 0x00000000 0x0041241B
& you agreed on the following :
Upper address bits (27:16) determine the Sector 0 -> 65 (ie total of 66 sectors)
- 4.269083MB uses Flash Sectors: 0 -> 65 (i.e a total of 66 Sectors)
-> 256 Line Buffers per sectors 0-64 are used (256 Words per Line Buffer)
-> Last 66th Flash Sector (ie no 65) uses 36 Line Buffers (256 Words per Line Buffer) + 1 Line buffer (27 Words)
---
If the host sends the .pof to the FPGA via I2C how will the FPGA understand the above addressing from it? Through I2C can usually receive chunks of serial Address bits followed by serial data bits from the Master to the Slave !
Having issues understanding this communication between Host and FPGA if they just forward a .pof file across in chunks of bytes. How does this link to the above addressing info seen in the .map file of the generated .pof ?
Please assist here because I am stuck and not knowing how to proceed and NOT able to suggest to the host side what type of file to send me .pof or .rbf or any other format so that the addressing / data will be recognizable for the FPGA to then be able to store that to the correct write line buffers of the appropriate sectors of the flash.
Hi @YuanLi_S_Intel ,
You mentioned that the PFL contains a header. What is the exact data structure of the POF?
( The POF file normally we generate from the Convert Programming File we specify:
Configuration Device: CFI_1Gb, Mode: Passive Parallel x16 )
How many bytes the header contains? And is the header always the same <byte> values? If yes, what are these values?
What comes after the header? Chunks of data? How do we relate the data with the addressing?
The POF file sent by the Host via I2C to the FPGA will contain just 1 new application image page each time.
Please reply.
Regards,
Kevin
- Knug5 years ago
Contributor
Hi @YuanLi_S_Intel ,
Thanks for your replies so far. However, received also no replies to my last 2 messages yet.
Could the .rbf be a better file to use? Converted the .pof to .rbf and tried to program the flash with the .rbf but it only accepts .pof files !
Reason of trying to check it with the .rbf is to see if the FPGA configures with the .rbf
1) If the host sends the .rbf data to the FPGA via I2C will this make life easier? Is the format of RBF pure raw binary data (no headers involved, no addresses just pure raw data) ie
Addr0 expect byte1 data
Addr1 expect byte2 data
etc
2) What means do you suggest comparing a .pof file vs .rbf one to check for the main differences ?
Can I convert from 'RBF to hex' & 'BOF to hex' diff the 2 hex files to check for differences? If yes, how do I do this?
Regards,
Kevin
- Knug5 years ago
Contributor
Please someone answer my latest messages.
This is a stopper at the moment not knowing beforehand the .pof file structure and if we use .rbf instead how the data is structured here so when the host sends it to the FPGA via I2C how will I know which specific byte data from the .rbf to process as a starting address to a particular sector of the flash?
Thanks..
- Knug5 years ago
Contributor
Hi @YuanLi_S_Intel ,
Seen this link just now :
So if I use the 'Convert Programming Files' , select
- Configuration device: CFI_1Gb
- Mode: Passive Parallel x16
& then convert .sof to .rbf file to generate the .rbf file
1) Can I then assume that the .rbf contains purely just configuration data (no headers bytes involved) ?
The configuration data in the .rbf programming file is little Endian as stated in this link.
For FPPx16 mode, the first byte in the file is the LSB (Least Significant Byte) of the configuration word and the 2nd byte is the MSB (Most Significant Byte)
If .rbf contains sequence 02 1B EE 01
then for FPPx16 mode:
Word 0 = 1B 02 Word 1 = 01 EE
LSB: BYTE0 = 02 , MSB: BYTE1 = 1B LSB: BYTE2 = EE, MSB: BYTE3 = 01
D[7:0] D[15:8] D[7:0] D[15:8]
00000010 00011011 11101110 00000001
2) I can then try to place Word 0 data to Start address 0, Word data 1 to address 1 etc ?
(If my start address for a Page is defined as 0x00000000)
Is this the case ?
Regards,
Kevin