From db87f484660dab833ea534e7d37c9c55417d5239 Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 24 Nov 2017 15:50:16 +0000 Subject: Documented I2C/SPI/LEDDA_IP --- icefuzz/tests/ip/make_html_table.py | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 icefuzz/tests/ip/make_html_table.py (limited to 'icefuzz/tests/ip/make_html_table.py') diff --git a/icefuzz/tests/ip/make_html_table.py b/icefuzz/tests/ip/make_html_table.py new file mode 100755 index 0000000..3d8cb70 --- /dev/null +++ b/icefuzz/tests/ip/make_html_table.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +import ast, sys + +data = "" +with open(sys.argv[1], 'r') as f: + data = f.read() + +ip_dat = ast.literal_eval("{\n" + data + "}") + +def is_cbit(ident): + if "_ENABLE" in ident or "DELAYED" in ident: + return True + else: + return False + +def is_bus(ident): + return ident.startswith("SB") + +ips = sorted(ip_dat) +print ("\n", end='') +for ip in ips: + t, loc = ip + x, y, z = loc + print("" % (t, x, y, z), end='') +print ("") + +# TODO: could group busses? +for print_t in ["SB", "G", "CBIT"]: + for n in sorted(ip_dat[ips[0]]): + if is_bus(n) != (print_t == "SB"): + continue + if is_cbit(n) != (print_t == "CBIT"): + continue + print("", end='') + em_o = "" + em_c = "" + if is_cbit(n): + em_o = "" + em_c = "" + print("" % (em_o, n, em_c), end='') + for ip in ips: + entry = ip_dat[ip][n] + x, y, name = entry + print("" % (em_o, x, y, name, em_c), end='') + print("") +print ("
Signal%s
(%d, %d, %d)
%s%s%s%s(%d, %d, %s)%s
") \ No newline at end of file -- cgit v1.2.3 From f1025dbd887f5e8068833393cea8d8c036936396 Mon Sep 17 00:00:00 2001 From: David Shah Date: Tue, 28 Nov 2017 11:00:51 +0000 Subject: Add uncommitted changes and tidy up some files --- icefuzz/tests/ip/make_html_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'icefuzz/tests/ip/make_html_table.py') diff --git a/icefuzz/tests/ip/make_html_table.py b/icefuzz/tests/ip/make_html_table.py index 3d8cb70..0bea73d 100755 --- a/icefuzz/tests/ip/make_html_table.py +++ b/icefuzz/tests/ip/make_html_table.py @@ -43,4 +43,4 @@ for print_t in ["SB", "G", "CBIT"]: x, y, name = entry print("%s(%d, %d, %s)%s" % (em_o, x, y, name, em_c), end='') print("") -print ("") \ No newline at end of file +print ("") -- cgit v1.2.3