Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Problem with RPD (Raw Programming Data File)

Hi,

I seem to be unable to create a usable RPD file for two Cyclone II (EP2C8) booting from the same, single EPCS4.

I can use Quartus Programmer to download a pair SOF via JTAG to the two FPGAs (both are in the same JTAG chain), they're configured correctly then. Also, I can create a JIC file and download it via JTAG through the first Cyclone into the EPCS4. They're booting fine from the EPCS4 programmed this way.

Now I tried to program the EPCS4 using another tool. I verified the tool's capabilities by reading the contents of an EPCS4 where the configuration was working, then erasing the EPCS4 (or even programming it with incorrect data) and then reprogramming it with the tool. Everything went fine. So I assume the tool is working correctly.

However, I'd like to create the input data for my tool from SOF directly, using quartus_cpf. Not just by programming a real EPCS via JIC (JTAG) and reading back its contents. I thought I could just create a POF file, convert it into an RPD file and program the EPCS4 with it. However, the RPD file created with the very same programming file conversion setup (-> POF -> RPD) as for the JIC (sans flash loader) contains completely different content and doesn't help me to configure my two Cyclones.

Any ideas? BTW, I'm using Quartus 7.1 for various reasons. Both SOFs have compression enabled in the conversion setup for both JIC and RPD.

Kolja

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    A rpd file for EPCS programming is generated from pof file normally. I can confirm that the conversion results in identical data, it simply cuts the POF header and copies the binary data.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The bits in the rpd file need to be reversed before programming them into the serial flash device. So for each byte, you need to do a bit-reversal. This is just the way the the FPGA pulls the data from the flash.

    Jake
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You can either write a little program to do the bit-reversal yourself or you can use the following utilities included with the NIOS2 EDS to perform the reversal for you:

    
    "$SOPC_KIT_NIOS2/bin/sof2flash" --epcs --compress --input="my_project.sof" --output="my_project.flash" 
    #  Convert to binary
    nios2-elf-objcopy -I srec -O binary my_project.flash my_project.bin

    Jake
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks! I taught my tool to reverse the bits while programming the EPCS and can now use the RPD file directly. Kolja