Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -30,6 +30,30 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||
entries = re.findall(r"\t *(\d+) ([^:]+) : (\d)( \[by.+\])?[\n\r]", f)
|
||||
assert len(entries) >= 1, "Could not find signal info in prsim.out!"
|
||||
|
||||
# Check if user gave a colour specification
|
||||
# default is Michele's atm
|
||||
colour_undefined = (100,100,100)
|
||||
colour_high = (98, 187, 93)
|
||||
colour_low = (233, 115, 115)
|
||||
for arg in argv:
|
||||
r = re.findall(r'-c=[\"\']?(.+)[\"\']?', arg)
|
||||
if len(r) >= 1:
|
||||
if r[0] == "ole":
|
||||
colour_undefined = (233, 115, 115)
|
||||
colour_high = (98, 187, 93)
|
||||
colour_low = (90, 111, 199)
|
||||
elif r[0] == "og":
|
||||
colour_undefined = (255,0,0)
|
||||
colour_high = (252, 186, 3)
|
||||
colour_low = (20, 184, 186)
|
||||
elif r[0] == "michele":
|
||||
colour_undefined = (100,100,100)
|
||||
colour_high = (98, 187, 93)
|
||||
colour_low = (233, 115, 115)
|
||||
else:
|
||||
raise Exception("Unknown colour given. I cba to code up general colours atm.")
|
||||
|
||||
|
||||
# Check if user gave an include filter
|
||||
include_given = False
|
||||
include_re = None
|
||||
@ -104,15 +128,9 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||
|
||||
# Plot
|
||||
|
||||
colour_undefined = (255,0,0)
|
||||
colour_high = (252, 186, 3)
|
||||
colour_low = (20, 184, 186)
|
||||
if argv[2] == "-color_Michele":
|
||||
colour_undefined = (32,32,32)
|
||||
colour_high = (98, 187, 93)
|
||||
colour_low = (233, 115, 115)
|
||||
|
||||
fig = plt.figure(figsize = (num_sigs/3+4,num_times/3+4), dpi = 100)
|
||||
# Generate figure
|
||||
# weird sizing is to try to keep "pixel" sizes approx const
|
||||
fig = plt.figure(figsize = (num_sigs/3+0.5,num_times/3+0.2), dpi = 100)
|
||||
|
||||
image = np.zeros((num_sigs, num_times, 3), dtype = int)
|
||||
image[signals_matrix == 0] = colour_undefined
|
||||
@ -163,6 +181,9 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""")
|
||||
plt.arrow(t0, s1, 0, s0-s1 + 0.2*np.sign(s0-s1), head_width = 0, width = 0.2, ec = "none", lw = 0, fc = "black", length_includes_head = True)
|
||||
plt.scatter((t0),(s0), c = "black", s = 30)
|
||||
|
||||
# Write times on x axis
|
||||
for time in unique_times:
|
||||
ax.text(time_to_index(time), num_sigs, time, ha = "center", va = "top", size = 10, rotation = 90)
|
||||
|
||||
output_type = ".pdf"
|
||||
for arg in argv:
|
||||
|
12
test/unit_tests/arbiter_2/run/test.prs
Normal file
12
test/unit_tests/arbiter_2/run/test.prs
Normal file
@ -0,0 +1,12 @@
|
||||
= "GND" "GND"
|
||||
= "Vdd" "Vdd"
|
||||
= "Reset" "Reset"
|
||||
"a.a"&"a._v"->"a._u"-
|
||||
~"a.a"|~"a._v"->"a._u"+
|
||||
"a.b"&"a._u"->"a._v"-
|
||||
~"a.b"|~"a._u"->"a._v"+
|
||||
"a._u"->"a.u"-
|
||||
~("a._u")->"a.u"+
|
||||
"a._v"->"a.v"-
|
||||
~("a._v")->"a.v"+
|
||||
mk_excllo("a._u","a._v")
|
@ -1,65 +0,0 @@
|
||||
= "GND" "GND"
|
||||
= "Vdd" "Vdd"
|
||||
= "Reset" "Reset"
|
||||
"t.a.reset_buf.a"->"t.a.reset_buf._y"-
|
||||
~("t.a.reset_buf.a")->"t.a.reset_buf._y"+
|
||||
"t.a.reset_buf._y"->"t.a.reset_buf.y"-
|
||||
~("t.a.reset_buf._y")->"t.a.reset_buf.y"+
|
||||
"t.a.inv_outa.a"->"t.a.inv_outa.y"-
|
||||
~("t.a.inv_outa.a")->"t.a.inv_outa.y"+
|
||||
~"t.a.inack_ctl.c1"&~"t.a.inack_ctl.c2"|~"t.a.inack_ctl.pr_B"->"t.a.inack_ctl._y"+
|
||||
"t.a.inack_ctl.c1"&"t.a.inack_ctl.c2"&"t.a.inack_ctl.n1"&"t.a.inack_ctl.sr_B"->"t.a.inack_ctl._y"-
|
||||
"t.a.inack_ctl._y"->"t.a.inack_ctl.y"-
|
||||
~("t.a.inack_ctl._y")->"t.a.inack_ctl.y"+
|
||||
~"t.a.buf_func.c1"&~"t.a.buf_func.c2"|~"t.a.buf_func.pr_B"->"t.a.buf_func._y"+
|
||||
"t.a.buf_func.c1"&"t.a.buf_func.c2"&"t.a.buf_func.n1"&"t.a.buf_func.sr_B"->"t.a.buf_func._y"-
|
||||
"t.a.buf_func._y"->"t.a.buf_func.y"-
|
||||
~("t.a.buf_func._y")->"t.a.buf_func.y"+
|
||||
= "t.a.reset_B" "t.a.reset_buf.a"
|
||||
= "t.a.supply.vdd" "t.a.reset_buf.vdd"
|
||||
= "t.a.supply.vdd" "t.a.buf_func.vdd"
|
||||
= "t.a.supply.vdd" "t.a.inv_outa.vdd"
|
||||
= "t.a.supply.vdd" "t.a.en_ctl.vdd"
|
||||
= "t.a.supply.vdd" "t.a.inack_ctl.vdd"
|
||||
= "t.a.supply.vss" "t.a.reset_buf.vss"
|
||||
= "t.a.supply.vss" "t.a.buf_func.vss"
|
||||
= "t.a.supply.vss" "t.a.inv_outa.vss"
|
||||
= "t.a.supply.vss" "t.a.en_ctl.vss"
|
||||
= "t.a.supply.vss" "t.a.inack_ctl.vss"
|
||||
= "t.a._reset_BX" "t.a.reset_buf.y"
|
||||
= "t.a._reset_BX" "t.a.buf_func.sr_B"
|
||||
= "t.a._reset_BX" "t.a.buf_func.pr_B"
|
||||
= "t.a._reset_BX" "t.a.inack_ctl.sr_B"
|
||||
= "t.a._reset_BX" "t.a.inack_ctl.pr_B"
|
||||
= "t.a._en" "t.a.buf_func.c1"
|
||||
= "t.a._en" "t.a.en_ctl.y"
|
||||
= "t.a._en" "t.a.inack_ctl.c1"
|
||||
~"t.a.en_ctl.p1"&~"t.a.en_ctl.c1"->"t.a.en_ctl.y"+
|
||||
"t.a.en_ctl.c1"->"t.a.en_ctl.y"-
|
||||
= "t.a._out_a_B" "t.a.buf_func.c2"
|
||||
= "t.a._out_a_B" "t.a.inv_outa.y"
|
||||
= "t.a.in.d.d[0]" "t.a.in.r"
|
||||
= "t.a.in.a" "t.a.en_ctl.c1"
|
||||
= "t.a.in.a" "t.a.inack_ctl.y"
|
||||
= "t.a.in.d.d[0]" "t.a.buf_func.n1"
|
||||
= "t.a.in.d.d[0]" "t.a.inack_ctl.c2"
|
||||
= "t.a.in.d.d[0]" "t.a.in.r"
|
||||
= "t.a.out.d.d[0]" "t.a.out.r"
|
||||
= "t.a.out.a" "t.a.inv_outa.a"
|
||||
= "t.a.out.d.d[0]" "t.a.buf_func.y"
|
||||
= "t.a.out.d.d[0]" "t.a.en_ctl.p1"
|
||||
= "t.a.out.d.d[0]" "t.a.inack_ctl.n1"
|
||||
= "t.a.out.d.d[0]" "t.a.out.r"
|
||||
= "Reset" "t.a.reset_B"
|
||||
= "Vdd" "t.a.supply.vdd"
|
||||
= "GND" "t.a.supply.vss"
|
||||
= "t.out.d.d[0]" "t.out.r"
|
||||
= "t.out.r" "t.a.out.r"
|
||||
= "t.out.a" "t.a.out.a"
|
||||
= "t.out.d.d[0]" "t.a.out.d.d[0]"
|
||||
= "t.out.d.d[0]" "t.out.r"
|
||||
= "t.in.d.d[0]" "t.in.r"
|
||||
= "t.in.r" "t.a.in.r"
|
||||
= "t.in.a" "t.a.in.a"
|
||||
= "t.in.d.d[0]" "t.a.in.d.d[0]"
|
||||
= "t.in.d.d[0]" "t.in.r"
|
Reference in New Issue
Block a user