Run efinix instead of just making config

This commit is contained in:
Byron Lathi
2025-02-08 13:45:47 -08:00
parent 00b5d76401
commit 48113c47d8
3 changed files with 10 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ name = "build-fpga" # REQUIRED, is the only field that cannot be marked as dyna
# https://packaging.python.org/guides/single-sourcing-package-version/
# dynamic = ["version"]
version = "0.3.3" # REQUIRED, although can be dynamic
version = "0.4.0" # REQUIRED, although can be dynamic
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:

View File

@@ -24,7 +24,7 @@ def build_fpga_main():
cfg = yaml.safe_load(cfg_file)
if (cfg["tool"] == "efinity"):
efinity.create_project(cfg)
efinity.build_project(cfg)
elif (cfg["tool"] == "vivado"):
vivado.build_nonprj(cfg)

View File

@@ -7,7 +7,7 @@ from rtl_manifest import read_sources
TAG="{http://www.efinixinc.com/enf_proj}"
def create_project(cfg):
def create_project(cfg, filename):
script_dir = os.path.dirname(__file__)
# print(cfg)
@@ -79,7 +79,11 @@ def create_project(cfg):
ET.indent(tree, ' ')
tree.write(f"{cfg["prj_info"]["name"]}.xml", encoding="utf-8", xml_declaration=False)
tree.write(f"{filename}", encoding="utf-8", xml_declaration=False)
def build_project(cfg):
name = f"{cfg['prj_info']['name']}.xml"
create_project(cfg, name)
os.mkdir("output")
os.system(f"efx_run --prj {name} --output_dir outflow --work_dir work")
if __name__ == "__main__":
create_project(None)