dunno what i changed buti it was probably good
This commit is contained in:
parent
87010c256b
commit
e995a78efb
|
@ -102,7 +102,7 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||||
# Get list of all times (before filtering)
|
# Get list of all times (before filtering)
|
||||||
unique_times = np.unique([int(e[0]) for e in entries])
|
unique_times = np.unique([int(e[0]) for e in entries])
|
||||||
|
|
||||||
assert not (exclude_given and include_given), "Can't give include and exclude re simultaneously."
|
# assert not (exclude_given and include_given), "Can't give include and exclude re simultaneously."
|
||||||
if include_given: print(f"Including signals that match regex {include_re}")
|
if include_given: print(f"Including signals that match regex {include_re}")
|
||||||
if exclude_given: print(f"Excluding signals that match regex {exclude_re}")
|
if exclude_given: print(f"Excluding signals that match regex {exclude_re}")
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||||
ax.text(time_to_index(time), num_sigs, time, ha = "center", va = "top", size = 10, rotation = 90)
|
ax.text(time_to_index(time), num_sigs, time, ha = "center", va = "top", size = 10, rotation = 90)
|
||||||
|
|
||||||
# Find and plot wrong Assert statements
|
# Find and plot wrong Assert statements
|
||||||
asserts = re.findall(r"\t *(\d+) .*\nWRONG ASSERT:\t(.+)", f)
|
asserts = re.findall(r"\t *(\d+) .*\n(WRONG ASSERT|WARNING):\t?(.+)", f)
|
||||||
if len(asserts): print("Failed asserts found!")
|
if len(asserts): print("Warnings found!")
|
||||||
for a in asserts:
|
for a in asserts:
|
||||||
print(a)
|
print(a)
|
||||||
time = int(a[0])
|
time = int(a[0])
|
||||||
|
@ -234,11 +234,11 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||||
try:
|
try:
|
||||||
time = unique_times[np.argwhere((unique_times-time) < 0)[-1]]
|
time = unique_times[np.argwhere((unique_times-time) < 0)[-1]]
|
||||||
except:
|
except:
|
||||||
print(f"Couldn't find an appropriate time for assert {a}")
|
print(f"Couldn't find an appropriate time for warning {a}")
|
||||||
continue
|
continue
|
||||||
index = time_to_index(time)
|
index = time_to_index(time)
|
||||||
ax.axvline(index+0.5, c = "red", lw = 2)
|
ax.axvline(index+0.5, c = "red", lw = 2)
|
||||||
ax.text(index+0.5, -1, a[1], rotation = 90, ha = "center", va = "bottom", c = "red")
|
ax.text(index+0.5, -1, a[2], rotation = 90, ha = "center", va = "bottom", c = "red")
|
||||||
|
|
||||||
# Find echoed statements of the form "[digits] text"
|
# Find echoed statements of the form "[digits] text"
|
||||||
echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d*\].+)", f)
|
echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d*\].+)", f)
|
||||||
|
|
Loading…
Reference in New Issue