build/efinix/ifacewriter: bypass clks out frequency check for Trion when a feedback clock is used

This commit is contained in:
Gwenhael Goavec-Merou 2023-12-20 20:33:15 +01:00
parent 54c58ef8b9
commit 7062e3379f
1 changed files with 7 additions and 5 deletions

View File

@ -370,11 +370,13 @@ design.create("{2}", "{3}", "./../gateware", overwrite=True)
cmd += 'prop_map = design.get_property("{}", clock_source_prop, block_type="PLL")\n'.format(name) cmd += 'prop_map = design.get_property("{}", clock_source_prop, block_type="PLL")\n'.format(name)
cmd += 'pprint.pprint(prop_map)\n' cmd += 'pprint.pprint(prop_map)\n'
for i, clock in enumerate(block["clk_out"]): # Efinix python API is buggy for Trion devices when a feedback is defined...
cmd += '\nfreq = float(prop_map["CLKOUT{}_FREQ"])\n'.format(i) if block["version"] == "V3" or (block["version"] == "V1_V2" and block["feedback"] == -1):
cmd += 'if freq != {}:\n'.format(clock[1]/1e6) for i, clock in enumerate(block["clk_out"]):
cmd += ' print("ERROR: CLKOUT{} configured for {}MHz is {{}}MHz".format(freq))\n'.format(i, clock[1]/1e6) cmd += '\nfreq = float(prop_map["CLKOUT{}_FREQ"])\n'.format(i)
cmd += ' exit("PLL ERROR")\n' cmd += 'if freq != {}:\n'.format(clock[1]/1e6)
cmd += ' print("ERROR: CLKOUT{} configured for {}MHz is {{}}MHz".format(freq))\n'.format(i, clock[1]/1e6)
cmd += ' exit("PLL ERROR")\n'
cmd += "\n#---------- END PLL {} ---------\n\n".format(name) cmd += "\n#---------- END PLL {} ---------\n\n".format(name)
return cmd return cmd