Skip to content

Commit

Permalink
feat: add exception handling for the synthesis CLI commands
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmMarcelJung committed Nov 7, 2023
1 parent 0b66167 commit af923c7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions FABulous.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,11 @@ def do_synthesis_npnr(self, args):
"-p", f"synth_fabulous -top top_wrapper -json {self.projectDir}/{path}/{name}.json",
f"{self.projectDir}/{args[0]}",
f"{self.projectDir}/{path}/top_wrapper.v", ]
sp.run(runCmd, check=True)
logger.info("Synthesis completed")
try:
sp.run(runCmd, check=True)
logger.info("Synthesis completed")
except sp.CalledProcessError:
logger.error("Synthesis failed")

def complete_synthesis_npnr(self, text, *ignored):
return self._complete_path(text)
Expand All @@ -716,8 +719,11 @@ def do_synthesis_blif(self, args):
"-p", f"synth_fabulous -top top_wrapper -blif {self.projectDir}/{path}/{name}.blif -vpr",
f"{self.projectDir}/{args[0]}",
f"{self.projectDir}/{path}/top_wrapper.v", ]
sp.run(runCmd, check=True)
logger.info("Synthesis completed")
try:
sp.run(runCmd, check=True)
logger.info("Synthesis completed")
except sp.CalledProcessError:
logger.error("Synthesis failed")

def complete_synthesis_blif(self, text, *ignored):
return self._complete_path(text)
Expand Down

0 comments on commit af923c7

Please sign in to comment.