Skip to content

Commit

Permalink
feat[vivado]: fix for #426
Browse files Browse the repository at this point in the history
This commit updates tools/vivado.py to allow the user to skip the
link_design step normally used after reading in a toplevel netlist.

The use case here is when an EDIF netlist, or any other netlist, is read
in as a submodule and is not the toplevel.  In this case the link_design
step will fail as Vivado is expecting a netlist with the toplevel name.

In order to bypass the link_design step, use the no_link_design tag when
specifying the netlist in your Core file:

filesets:
  netlist:
    files:
      - cute_a7_core/cute_a7_core.edf: { file_type: edif, tags: [no_link_design] }
  • Loading branch information
shareefj committed Apr 12, 2024
1 parent 6114cbf commit 879ce72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edalize/tools/vivado.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def setup(self, edam):
has_xci = False
unused_files = []
bd_files = []
netlist_flow = False

dep_files = []
for f in self.files:
Expand All @@ -119,6 +120,8 @@ def setup(self, edam):
elif file_type == "edif":
cmd = "read_edif"
edif_files.append(f["name"])
if not 'no_link_design' in f.get('tags', []):
netlist_flow = True
elif file_type.startswith("vhdlSource"):
cmd = "read_vhdl"
if file_type == "vhdlSource-2008":
Expand Down Expand Up @@ -176,7 +179,7 @@ def setup(self, edam):
"vlogparam": self.vlogparam,
"vlogdefine": self.vlogdefine,
"generic": self.generic,
"netlist_flow": bool(edif_files),
"netlist_flow": netlist_flow,
"has_vhdl2008": has_vhdl2008,
"has_xci": has_xci,
"bd_files": bd_files,
Expand Down

0 comments on commit 879ce72

Please sign in to comment.