For some devices grade has to be omitted, so it is optional.
device = abstractproperty()
package = abstractproperty()
speed = abstractproperty()
+ grade = None
required_tools = [
"yosys",
"vivado"
]
-
file_templates = {
**TemplatedPlatform.build_script_templates,
"build_{{name}}.sh": r"""
""",
"{{name}}.tcl": r"""
# {{autogenerated}}
- create_project -force -name {{name}} -part {{platform.device}}{{platform.package}}-{{platform.speed}}
+ create_project -force -name {{name}} -part {{platform.device}}{{platform.package}}-{{platform.speed}}{{"-" + platform.grade if platform.grade else ""}}
{% for file in platform.iter_extra_files(".v", ".sv", ".vhd", ".vhdl") -%}
add_files {{file}}
{% endfor %}