Forum Discussion

host's avatar
host
Icon for Occasional Contributor rankOccasional Contributor
2 years ago
Solved

Automating POF generation

Hello,

I'm using a .pfg script file to convert .sof files into .pof

How can I automate the process such that a .pof file will be generated at the end of every compilation ?

  • Scripting is of course the solution.

    Call quartus_pfg with respective .pfg configuration in a tcl script, e.g. post_flow.tcl

    exec quartus_pfg -c yourpfgfile.pfg

    Specify post flow action in your project

    set_global_assignment -name POST_FLOW_SCRIPT_FILE "quartus_sh:flow_post.tcl"

3 Replies

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Scripting is of course the solution.

    Call quartus_pfg with respective .pfg configuration in a tcl script, e.g. post_flow.tcl

    exec quartus_pfg -c yourpfgfile.pfg

    Specify post flow action in your project

    set_global_assignment -name POST_FLOW_SCRIPT_FILE "quartus_sh:flow_post.tcl"

  • host's avatar
    host
    Icon for Occasional Contributor rankOccasional Contributor

    Thanks for the link but this doesn't answer my question.

    I couldn't find something about generating a .POF from a .SOF using the .PFG.

    This is how my .PFG file looks like:

    <pfg version="1">
    <settings custom_db_dir="./" mode="AVSTX16"/>
    <output_files>
    <output_file name="my_project" directory="output_files/" type="POF">
    <file_options/>
    <flash_device_id>Flash_Device_1</flash_device_id>
    <secondary_file type="MAP" name="my_project_pof">
    <file_options/>
    </secondary_file>
    </output_file>
    </output_files>
    <bitstreams>
    <bitstream id="Bitstream_1">
    <path>output_files/my_project.sof</path>
    </bitstream>
    </bitstreams>
    <flash_devices>
    <flash_device type="CFI_1Gb" id="Flash_Device_1">
    <partition reserved="1" fixed_s_addr="0" s_addr="0x000C0000" e_addr="0x000FFFFF" fixed_e_addr="0" id="OPTIONS" size="0"/>
    <partition reserved="0" fixed_s_addr="0" s_addr="0x02C00000" e_addr="0x056FFFFF" fixed_e_addr="0" id="P1" size="0"/>
    </flash_device>
    </flash_devices>
    <assignments>
    <assignment page="0" partition_id="P1">
    <bitstream_id>Bitstream_1</bitstream_id>
    </assignment>
    </assignments>
    </pfg>

    As you can see, it's generates the POF from the SOF.

    How can I embed this script into my QSF so it will run automatically at the end of each compilation ?