Skip to content

Commit

Permalink
Change vcs error logic
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed May 16, 2019
1 parent e4811fc commit e3b1241
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fault/system_verilog_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ def run(self, actions):
print(f"Running command: {cmd}")
assert not subprocess.call(cmd, cwd=self.directory, shell=True)
if self.simulator == "vcs":
assert not subprocess.call("./simv | tee /dev/stdout | grep Error || exit 0 && exit 1", cwd=self.directory, shell=True) # noqa
result = subprocess.run("./simv", cwd=self.directory, shell=True,
capture_output=True)
assert not result.returncode, "Running vcs binary failed"
assert "Error" not in str(result.stdout), \
"String \"Error\" found in stdout of vcs run"
elif self.simulator == "iverilog":
assert not subprocess.call(f"vvp -N {self.circuit_name}_tb",
cwd=self.directory, shell=True)

0 comments on commit e3b1241

Please sign in to comment.