Skip to content

Commit

Permalink
vendor._gowin: Add 'add_preferences' override
Browse files Browse the repository at this point in the history
Implement 'add_preferences' override for CST files, allowing customizing
physical placement of primitive.
  • Loading branch information
jeanthom authored and whitequark committed Oct 9, 2024
1 parent 369dc19 commit 41762f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions amaranth/vendor/_gowin.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ class GowinPlatform(TemplatedPlatform):
The environment is populated by running the script specified in the environment variable
``AMARANTH_ENV_APICULA``, if present.
Available overrides:
* ``add_preferences``: inserts commands at the end of the CST file.
Build products:
* ``{{name}}.fs``: binary bitstream.
Expand All @@ -186,6 +189,9 @@ class GowinPlatform(TemplatedPlatform):
The environment is populated by running the script specified in the environment variable
``AMARANTH_ENV_GOWIN``, if present.
Available overrides:
* ``add_preferences``: inserts commands at the end of the CST file.
Build products:
* ``{{name}}.fs``: binary bitstream.
"""
Expand Down Expand Up @@ -346,6 +352,7 @@ def _osc_div(self):
IO_PORT "{{port_name}}" {{attr_name}}={{attr_value}};
{% endfor %}
{% endfor %}
{{get_override("add_preferences")|default("# (add_preferences placeholder)")}}
""",
}

Expand Down

0 comments on commit 41762f1

Please sign in to comment.