Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20641 Discussions

How to prepare a rpd file

EEren
Novice
1,352 Views

I have a bootloader in CFM0 sector. I feed a rpd file through serial, after uploading the file to the FPGA flash it reports success. But when I switch to CFM1 it fails and goes back to CFM0.

 

I suspect my rpd file not good

rpd_options.png

 

I check Big endian - so I shouldn't swap bytes in the code.

But do I need to check this option - Use secondary image ISP data as default setting when available ?

0 Kudos
9 Replies
JohnT_Intel
Employee
1,186 Views

Hi,

 

May I know if you are using dual boot in your Quartus design? Do you program dual image the 1st time you program the flash before you update the CFM1?

 

0 Kudos
EEren
Novice
1,186 Views

I have two projects. Boot project and Main project. Both configured as dual boot. So in the Boot project I choose the first SOF Page of the Boot project and the second SOF page of the Main project.

I burn generated POF and it works - I can switch between CFM0 (Boot) and CFM1 (Main) with BOOT_SEL pin.

Now I prepare the rpd file - in the Main project I choose both SOF Pages of the Main project and get - ''output_file_main_cfm0_auto.rpd'' and ''output_file_main_cfm1_auto.rpd''.

Now I feed the ''output_file_main_cfm0_auto.rpd'' to the Boot located in CFM0 - it burns but the Main project no good - it switches to CFM0 when I choose CFM1 with BOOT_SEL pin.

 

As I see in the Flash Update module

SECTOR3_START_ADDR                 => 16384,

SECTOR3_END_ADDR                   => 114687,

SECTOR4_START_ADDR                 => 114688,

SECTOR4_END_ADDR                   => 188415,

 

So I start at 16384 address and end at 188415 address.

 

I burned an rpd file and did dump back - only first 100 addresses

dump.png

Looks like the same content. So I think my rpd file not good.

0 Kudos
GLees
New Contributor II
1,186 Views

I see two potential problems;

 

1) Endian swapping. After configuring four bytes to write a 32 bit word into CFM1, you need to do a 32-bit "endian swap". Just checking the "Big Endian" box when you make the rpd doesn't cut it.

2) You should be feeding "output_file_main_cfm1_auto.rpd" to the Boot loader located in CFM0. After all, you want it to end up in CFM1, right?

 

I lost a lot of hair trying to make all of this work, but finally got there.

0 Kudos
EEren
Novice
1,186 Views

Thanks a lot! Indeed I should feed - output_file_boot_cfm1_auto.rpd - this is the actual main project image.

0 Kudos
JohnT_Intel
Employee
1,186 Views

Hi,

 

You will need to always check on the "On Chip Flash" IP to make sure that the sector you are programming is the correct CFM location.

0 Kudos
EEren
Novice
1,186 Views

Another question. A cfm1.rpd file has 672 kilo byte size. But the actual program much smaller. How can I know the actual program size? I don't want to stuff the CFM1 page with dummy FF's.

0 Kudos
JohnT_Intel
Employee
1,186 Views

Hi,

 

There is no way to determine the full compress file as it will depending on your Quartus design and how much it can be compress.

0 Kudos
EEren
Novice
1,186 Views

But why Quartus can not tell the actual size after the rpd file creation - it's all known parameters to the environment.

0 Kudos
JohnT_Intel
Employee
1,186 Views
0 Kudos
Reply