Forum Discussion

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

I want knowing POF file format structures.

hello, everyone.

I want knowing POF file format structures.

I can open a .pof file and program this to the EPCS16 device if i know

the length of the header so i can remove it first. The header includes

info about Quartus build date/version/device/comment e.t.c

The .pof file also includes a signature, but since the useful data

only exists until about 1/3 into the file, this signature is also

removed when programming..

Does anyone know the .pof file format? I really need to know this:

1. Where is the header-length is specified?

2. What does the different "unknown" bytes in the header (except for

the obvious ascii coded strings) specify?

My application can also read the contens of the flash and save it to a

file. It would be really useful if this could be saved in a .pof valid

format, and written back using the quartus programming tool, so:

3. What does the Quartus programming tool look for to determine if

the .pof is valid? (checksum? probably some of the info requested in

1, 2?)

4. What does the signature/footer describe?

Thanks so much.

15 Replies

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

    Suxilong,

    Would you mind posting the EPCS4 data & rbf file? I have some experience reversing this stuff & and I will help if I can...

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

    FWIW the crc is CRC-CCITT as used by hdlc.

    This means the the calculation can be reduced to:

        crc = 0xffff;
        while (p < lim) {
            crc ^= *p++;
            t = (crc ^ crc << 4) & 0xff;
            crc = crc >> 8 ^ t << 8 ^ t << 3 ^ t >> 4;
        crc ^= 0xffff;
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    this should get you started...

    fmt_pof.pdf contains info on the .pof file format

    pofcrc_src_bin.zip contains a windows application(src is in C) I wrote to correct the .pof CRC.

    good luck.

    --- Quote End ---

    Thanks a lot. You greatest man ever. Go for beer if you visit Saint-Petersburg someday.