Skip to content

[efinity] expose global_unused_config (unused pin pull state) as a tool option #514

@Aliqyan-21

Description

@Aliqyan-21

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:

  1. 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'",
},
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions