diff --git a/dataflow_neuro/chips.act b/dataflow_neuro/chips.act index c2e87c3..9fa23f0 100644 --- a/dataflow_neuro/chips.act +++ b/dataflow_neuro/chips.act @@ -166,23 +166,26 @@ defproc chip_texel (bd in, out; // Otherwise boom. bool DEV_DEBUG; pint NSMX4 = N_SYN_MON_X/4; // Self explanatory - sigbuf sb_DEV_DEBUG(.in = register.data[0].d[5].t, + sigbuf sb_DEV_DEBUG(.in = register.data[0].d[5].t, .supply = supply); DEV_DEBUG = sb_DEV_DEBUG.out[0]; - AND2_X1 ands_devmon[NSMX4]; - (i:NSMX4: - ands_devmon[i].a = syn_mon_dec_x.out[1+i*4]; - ands_devmon[i].b = DEV_DEBUG; - ands_devmon[i].y = syn_mon_x[1+i*4]; - ands_devmon[i].vdd = supply.vdd; - ands_devmon[i].vss = supply.vss; - ) - // Wire up the non-ANDed lines. - (i:N_SYN_MON_X: - [~(i%4 = 1) -> - syn_mon_x[i] = syn_mon_dec_x.out[i]; - ] - ) + [NSMX4 >= 1 -> + AND2_X1 ands_devmon[NSMX4]; + (i:NSMX4: + ands_devmon[i].a = syn_mon_dec_x.out[1+i*4]; + ands_devmon[i].b = DEV_DEBUG; + ands_devmon[i].y = syn_mon_x[1+i*4]; + ands_devmon[i].vdd = supply.vdd; + ands_devmon[i].vss = supply.vss; + ) + // Wire up the non-ANDed lines. + (i:N_SYN_MON_X: + [~(i%4 = 1) -> + syn_mon_x[i] = syn_mon_dec_x.out[i]; + ] + ) + ] + } diff --git a/test/prsim_plot.py b/test/prsim_plot.py index a71f19b..14bf3e1 100755 --- a/test/prsim_plot.py +++ b/test/prsim_plot.py @@ -99,6 +99,14 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""") if len(r) >= 1: include_all_times = True + + # Check if user gave "nowarn" flag + plot_warn = True + for arg in argv: + r = re.findall(r'(-nowarn?)', arg) + if len(r) >= 1: + plot_warn = False + # Get list of all times (before filtering) unique_times = np.unique([int(e[0]) for e in entries]) @@ -237,8 +245,9 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""") print(f"Couldn't find an appropriate time for warning {a}") continue index = time_to_index(time) - ax.axvline(index+0.5, c = "red", lw = 2) - ax.text(index+0.5, -1, a[2], rotation = 90, ha = "center", va = "bottom", c = "red") + if plot_warn: + ax.axvline(index+0.5, c = "red", lw = 2) + ax.text(index+0.5, -1, a[2], rotation = 90, ha = "center", va = "bottom", c = "red") # Find echoed statements of the form "[digits] text" echoes = re.findall(r"\t *(\d+) [^\t]*\n(\[\d*\].+)", f)