QuickLogic-Corp / quicklogic-fpga-toolchain

Open Source FPGA toolchain and documentation for QuickLogic devices and eFPGA IP
https://quicklogic-quicklogic-fpga-toolchain.readthedocs-hosted.com/en/latest/index.html
Apache License 2.0
36 stars 8 forks source link

OpenOCD script for IOMUX configuration is concatenated incorrectly #46

Closed mkurc-ant closed 3 years ago

mkurc-ant commented 3 years ago

In toolchain version 1.3.0 when ql_symbiflow is run with the -dump openocd option it generates the top.openocd file that contains a script that programs the FPGA and sets up the IOMUX.

However the IOMUX part gets concatenated incorrectly i.e. ends up outside the program_bitstream function. Example:

    ...
    mww 0x40004020 0x0000020a
    echo "Bitstream loaded successfully!"
}
    mww 0x40004C58 0x00000030
    mww 0x40004C78 0x00000030
    mww 0x40004D80 0x40400000
    mww 0x40004D84 0x00000000

The last 4 mww should be placed before the closing curly bracket.

The issue is in symbiflow_write_openocd wrapper script that does a blind concatenation:

echo "Generating openocd file"
cat ${TOP_F}.bit.openocd ${TOP_F}_iomux.openocd > ../${TOP_F}.openocd
kkumar23 commented 3 years ago

@coolbreeze413 : I hope recent PR to fpga toolchain has this fix?

coolbreeze413 commented 3 years ago

Yes, this should get fixed with the changes in the PR.

coolbreeze413 commented 3 years ago

With the v1.3.1 release, this should now be resolved. Please re-open this issue, if the problem is seen again. https://github.com/QuickLogic-Corp/quicklogic-fpga-toolchain/releases/tag/v1.3.1