Merge branch 'efinix_update' into 'master'
Run efinix instead of just making config See merge request bslathi19/build_fpga!3
This commit is contained in:
@@ -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/
|
# https://packaging.python.org/guides/single-sourcing-package-version/
|
||||||
|
|
||||||
# dynamic = ["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
|
# This is a one-line description or tagline of what your project does. This
|
||||||
# corresponds to the "Summary" metadata field:
|
# corresponds to the "Summary" metadata field:
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def build_fpga_main():
|
|||||||
cfg = yaml.safe_load(cfg_file)
|
cfg = yaml.safe_load(cfg_file)
|
||||||
|
|
||||||
if (cfg["tool"] == "efinity"):
|
if (cfg["tool"] == "efinity"):
|
||||||
efinity.create_project(cfg)
|
efinity.build_project(cfg)
|
||||||
elif (cfg["tool"] == "vivado"):
|
elif (cfg["tool"] == "vivado"):
|
||||||
vivado.build_nonprj(cfg)
|
vivado.build_nonprj(cfg)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from rtl_manifest import read_sources
|
|||||||
TAG="{http://www.efinixinc.com/enf_proj}"
|
TAG="{http://www.efinixinc.com/enf_proj}"
|
||||||
|
|
||||||
|
|
||||||
def create_project(cfg):
|
def create_project(cfg, filename):
|
||||||
script_dir = os.path.dirname(__file__)
|
script_dir = os.path.dirname(__file__)
|
||||||
|
|
||||||
# print(cfg)
|
# print(cfg)
|
||||||
@@ -79,7 +79,11 @@ def create_project(cfg):
|
|||||||
|
|
||||||
|
|
||||||
ET.indent(tree, ' ')
|
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)
|
|
||||||
Reference in New Issue
Block a user