The Efinity interface designer exposes a global setting for unused pin behaviour (global_unused_config) which maps to this XML in peri.xml:
<efxpt:global_unused_config state="input with weak pullup"/>
This setting is not part of the ISF file and exists only in peri.xml and is managed internally by Efinix's PT engine.
Since edalize's efinity backend generates peri.xml via isf_to_xml.py, this setting is currently inaccessible to users and always defaults to input with weak pullup.
This results in some unexpected behaviour, such as if it's pullup instead of pulldown, LEDs stay ON even without input being high, with no way to change it through edalize.
I investigated Efinix 2024.2 internals and found that there was is no command exposed in API for this setting.
It is only accessible via Efinix GUI internal code (spec_config.py)
Proposed fix:
- Add
unused_pin_state to TOOL_OPTIONS in tools/efinity.py:
"unused_pin_state": {
"type": "str",
"desc": "Global unused pin pull state. "
"Valid: 'input with weak pullup' (default), "
"'input with weak pulldown'",
},
- Post-process
peri.xml in the isf_to_xml.py template after design.save_as() to inject this setting in the xml file. Done!
+ If there's a better solution than this then ok, if not I am happy to implement it as proposed, u can assign me.
The Efinity interface designer exposes a global setting for unused pin behaviour (
global_unused_config) which maps to this XML inperi.xml:This setting is not part of the ISF file and exists only in
peri.xmland is managed internally by Efinix's PT engine.Since edalize's efinity backend generates
peri.xmlviaisf_to_xml.py, this setting is currently inaccessible to users and always defaults toinput with weak pullup.This results in some unexpected behaviour, such as if it's
pullupinstead ofpulldown, LEDs stay ON even without input being high, with no way to change it through edalize.I investigated Efinix 2024.2 internals and found that there was is no command exposed in API for this setting.
It is only accessible via Efinix GUI internal code (
spec_config.py)Proposed fix:
unused_pin_statetoTOOL_OPTIONSintools/efinity.py:peri.xmlin theisf_to_xml.pytemplate afterdesign.save_as()to inject this setting in the xml file. Done!+ If there's a better solution than this then ok, if not I am happy to implement it as proposed, u can assign me.