Forum Discussion

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

How to edit the comment text in the pof file

I have found the format of the .pof programming file. I have a script to re calculate the CRC, however, even when making very simple single bit change to the date and re calculating the CRC, the Quartus programmer reports the file as being corrupt.

does anyone know how to change any of the data in the pof file packets.

OR

does anyone have a way of getting a version number into a pof file , that would be very useful to.

thanks in advance

neil B.

6 Replies

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

    Editing the .pof file is not recommended, and you won't get any help from Altera. Why are you putting a version number into the .pof? One reason is for external tools to look at, for example, when programming a device you may have something that looks for a version number inside the .pof. There are probably better ways of doing this(like just naming the .pof with a version number or putting it into a descriptive directory).

    The second reason is to physically read the version number inside the FPGA, i.e. it would be stored in a memory/registers that your design can access. In an SOPC system there is a version component(I don't know the exact name) that allows you to create a new version every time it is created. I have also posted on this forum a way to create a file timestamp. Basically anytime you hit compile, a Tcl script is called that checks the time and writes that into a verilog file, that is then sourced by Quartus. You could also put a version number into it. I would recommend something like this instead of modifying the .pof.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I spoke to my Altera rep and he let me know there would never be any offical help form altera for editing the pof files. the reason i want to is I have inherited some legacy designs which I'm told only support programming via pof files over JTAG. I have been able to get an automated version number into the design so it can report the version thats running, however, I wanted to get a version number in to programming file to verify the version before the code was loaded on at site.

    The commnets section (tag 3) of the pof file seemed tailer made for this...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Usually, you stick version numbers in the registers accessible from software to check this.

    Could you not use the CRC as the version number?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, Tricky,

    The name of the programming file is fixed, it is referenced in the BOM for the board, the firmware gets called up as all other componets are. I also wanted to establish a link between the source code and the programming file, hence the need to embed the version number in the comments packet of the pof file.