Skip to content

Commit

Permalink
Merge pull request #127 from IAmMarcelJung/feat_error_handling
Browse files Browse the repository at this point in the history
Add exception handling for the synthesis CLI commands
  • Loading branch information
KelvinChung2000 authored Nov 10, 2023
2 parents d4b309c + af923c7 commit e5d11bd
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 e5d11bd

Please sign in to comment.