Skip to content

Commit

Permalink
verilator: Initialize variables when run is used without setup
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Jun 17, 2019
1 parent a6084cc commit af011cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions edalize/verilator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def build_main(self):
self._run_tool('make', args)

def run_pre(self, args):
#Default to cc mode if not specified
if not 'mode' in self.tool_options:
self.tool_options['mode'] = 'cc'
if self.tool_options['mode'] == 'lint-only':
return
if self._managed_parser():
Expand All @@ -161,5 +164,7 @@ def run_pre(self, args):
self._run_scripts(self.hooks['pre_run'])

def run_main(self):
if self.tool_options['mode'] == 'lint-only':
return
logger.info("Running simulation")
self._run_tool('./V' + self.toplevel, self.args)

0 comments on commit af011cd

Please sign in to comment.