Skip to content

Commit

Permalink
Fix: Correct reg string substitution during instance creation to avoid
Browse files Browse the repository at this point in the history
corruption of word like 'arregion' to 'arlogicion'
  • Loading branch information
dpretet committed Oct 10, 2021
1 parent 11db5bf commit e0693c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions svutCreate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import os
import sys
import re

if __name__ == '__main__':

Expand Down Expand Up @@ -121,14 +122,14 @@
if line[0:5] == "input" or line[0:6] == "output":
_line = line.split("//")[0].strip()
if line[0:10] == "input var ":
_line = _line.replace("input var", "")
_line = re.sub("input var", "", _line)
else:
_line = _line.replace("input", "")
_line = _line.replace("output", "")
_line = _line.replace("signed", "logic")
_line = _line.replace("wire", "logic")
_line = _line.replace("reg", "logic")
_line = _line.replace(",", "")
_line = re.sub("input", "", _line)
_line = re.sub("output", "", _line)
_line = re.sub("signed", "logic", _line)
_line = re.sub("wire", "logic", _line)
_line = re.sub("\sreg\s", "logic", _line)
_line = re.sub(",", "", _line)
_line = _line + ";"
instance["io"].append(_line.strip())

Expand Down
2 changes: 1 addition & 1 deletion svut_h.sv
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
string svut_test_name = ""; \
string svut_suite_name = ""; \
string svut_msg = ""; \
string svut_fail_list = "Failling tests:";
string svut_fail_list = "Failling test(s):";

/// LAST_STATUS is a flag asserted if check the last
/// check function failed
Expand Down

0 comments on commit e0693c1

Please sign in to comment.