diff --git a/htmlgen/htmlgen.py b/htmlgen/htmlgen.py index 167d9cdf..506e0505 100644 --- a/htmlgen/htmlgen.py +++ b/htmlgen/htmlgen.py @@ -204,10 +204,35 @@ for segtype in segbits.keys(): bgcolor = "#ffaa00" label = bit_name[-9:-7] + "M" + if re.search(r"\.CLKINV$", bit_name): + bgcolor = "#ffaa00" + label = "CLKI" + elif bit_pos in routebits[segtype]: - title += list(routebits[segtype][bit_pos]) bgcolor = "#6666cc" label = "R" + for bn in sorted(routebits[segtype][bit_pos]): + if re.match("^[A-Z_]+_INT_[LR].CTRL(_L)?[0-9]", bn): + bgcolor = "#8844ff" + label = "CTRL" + if re.match("^[A-Z_]+_INT_[LR].GFAN(_L)?[0-9]", bn): + bgcolor = "#4488ff" + label = "GFAN" + if re.match("^[A-Z_]+_INT_[LR].[SNWE][SNWE]", bn): + bgcolor = "#aa88ff" + label = "SNWE" + if re.match("^[A-Z_]+_INT_[LR].IMUX", bn): + bgcolor = "#88aaff" + label = "IMUX" + if re.match("^[A-Z_]+_INT_[LR].BYP_ALT", bn): + bgcolor = "#7755ff" + label = "BALT" + if re.match("^[A-Z_]+_INT_[LR].FAN_ALT", bn): + bgcolor = "#4466bb" + label = "FALT" + if re.match("^[A-Z_]+_INT_[LR].[SNWE][RL]", bn): + label = "RL" + title.append(bn) if label is None: label = " " @@ -215,7 +240,7 @@ for segtype in segbits.keys(): else: onclick = " onmousedown=\"location.href = '#b%s'\"" % bit_pos - print("%s" % + print("%s" % (bgcolor, "\n".join(title), onclick, label), file=f) print("", file=f) print("", file=f)