0
\$\begingroup\$

I've acquired an Altera FLEX 8282A FPGA and I'd like to have a bit of a play with it.

Yes, I know these are prehistoric parts, but I like playing around with old stuff. :-)

I've installed MAX+Plus II and have managed to compile a very simple design (a clock divider) for testing purposes.

I have no re-programmable configuration devices, nor any other compatible programmers, so I'll make something myself using a PIC microcontroller. The programming protocol seems quite simple and was well documented by Altera themselves. I'll likely use the serial method of configuration, with the PIC acting like an Altera configuration device and running the show.

What doesn't seem to be so well documented is how to extract the “bitstream” (?) from the resulting .pof or (maybe more probably) .sof file.

I've written some simple Python to parse my way through the .pof/.sof files and extract each “packet” including the one which looks to contain the bitstream, but there's a problem with both of them.

Altera Application Note 33 says the bitstream for an 8282A should be 40000 bits, or 5000 bytes. From the .pof I extract 5120 bytes, and from the .sof I extract 4703 bytes.

So, my question is: does anyone understand what you are supposed to do with a .pof or .sof file to program a device? Which part of the longer .pof data do I take, or what do I fill in for the missing part of the .sof?

I think that I should be using a .sof as these seem to be for volatile devices (.pof for non-volatile devices), but the number of bytes are coming up short from what I'm expecting.

Thanks!

\$\endgroup\$
2
  • \$\begingroup\$ It looks like the sof is RAM data and the pof is flash data. The flex8000 being a PLD may need the pof data (guessing here). Have you looked at the format of sof and pof files? \$\endgroup\$
    – Rodo
    Commented Jun 13 at 17:43
  • \$\begingroup\$ The two seem to follow a roughly similar format. Its just that the data that is extracted from the .sof is vastly different to that from the .pof, so there is some kind of transofmration going on. I think Ive figured out that the data I can extract from the .pof (minus 12 initial bytes) is exactly the same as what is available in a .ttf file (#includable in C/assembly), and is also the same as what can be made available in a .rbf file from the .sof. AN33 suggests that the .rbf file can be loaded directly in to the FPGA, so it seems any of these 3 sources can be used. \$\endgroup\$
    – Tom S
    Commented Jun 17 at 7:31

1 Answer 1

0
\$\begingroup\$

An update, I've managed to successfully configure the EPF8282A that I have as an example part.

The .rbf file is literally just something you can clock straight in to the FPGA (LSb first), and then a few more clocks after that to initialise it and set it running.

For the .pof file, I parse this to find packet type 7 ("Electrical Address and Data"), and then skip the first 12 bytes and load the remainder of the contents in to the FPGA (LSb first again), and again followed by a few more clocks to get it running. I'm not sure what the 12 bytes are that I have skipped, they dont seem to have any meaningful values (e.g. length of the bitstream etc) or easily discernable purposes, and they are not documented anywhere that I've found yet, but the method seems to work just fine.

As for .sof, this must have some kind of compression, so I am ignoring this and concentrating on .pof since this is generated by default by MAX+plus II when compiling a design (generating a .rbf requires additional steps).

I've implemented the loader function in to a PIC microcontroller with an external SPI flash as I had originally planned, and so far it is working great - configuring the device on power up completes quicker than the blink of an eye, and loading over serial takes less than a second.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.