Skip to content

Commit 7e5f16f

Browse files
tymonxolofk
authored andcommitted
feat(vivado): add the --gui option for the Vivado flow backend
1 parent 5a06bd0 commit 7e5f16f

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

edalize/flows/vivado.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class Vivado(Edaflow):
3131
"type": "str",
3232
"desc": "Synthesis tool. Allowed values are vivado (default) and yosys.",
3333
},
34+
"gui": {
35+
"type": "bool",
36+
"desc": "Invoke the Graphical User Interface (GUI)",
37+
},
3438
},
3539
}
3640

@@ -69,11 +73,18 @@ def configure_flow(self, flow_options):
6973
def build(self):
7074
(cmd, args) = self.build_runner.get_build_command()
7175
pnr_opt = self.flow_options.get("pnr", "")
72-
if pnr_opt == "none":
76+
if self.flow_options.get("gui"):
77+
# Invoking the GUI by user has the highest precedence over anything else
78+
args.append("build-gui")
79+
elif pnr_opt == "none":
7380
args.append("synth")
7481
self._run_tool(cmd, args=args, cwd=self.work_root)
7582

7683
def run(self):
84+
if self.flow_options.get("gui"):
85+
# To avoid accidentally programming FPGA after closing GUI
86+
return
87+
7788
if self.flow_options.get("pgm"):
7889

7990
# Get run command from tool instance

0 commit comments

Comments
 (0)