From 8ea00d305ce4c2f78f7df10ce572a10e6fdb6b58 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 21 Dec 2017 01:18:41 +0100 Subject: [PATCH 1/6] Change kintex7 ROI, fix kintex7 settings Signed-off-by: Clifford Wolf --- database/kintex7/settings.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/database/kintex7/settings.sh b/database/kintex7/settings.sh index 036d072b..b4632b78 100644 --- a/database/kintex7/settings.sh +++ b/database/kintex7/settings.sh @@ -1,14 +1,11 @@ -source $(dirname ${BASH_SOURCE[0]})/../../utils/environment.sh - export XRAY_DATABASE="kintex7" export XRAY_PART="xc7k70tfbg676-2" -export XRAY_ROI="SLICE_X24Y150:SLICE_X35Y199" -# FIXME: a7 value -export XRAY_ROI_FRAMES="0x00020500:0x000208ff" -export XRAY_ROI_GRID_X1="48" -export XRAY_ROI_GRID_X2="67" -export XRAY_ROI_GRID_Y1="0" -export XRAY_ROI_GRID_Y2="52" +export XRAY_ROI="SLICE_X0Y50:SLICE_X19Y99 DSP48_X0Y20:DSP48_X0Y39 RAMB18_X0Y20:RAMB18_X0Y39 RAMB36_X0Y10:RAMB36_X0Y19" +export XRAY_ROI_FRAMES="0x00400100:0x004006ff" +export XRAY_ROI_GRID_X1="9" +export XRAY_ROI_GRID_X2="38" +export XRAY_ROI_GRID_Y1="104" +export XRAY_ROI_GRID_Y2="156" # Choose the first N High Range I/Os export XRAY_PIN_00="K25" export XRAY_PIN_01="K26" @@ -17,3 +14,5 @@ export XRAY_PIN_03="L25" export XRAY_PIN_04="M19" export XRAY_PIN_05="M20" export XRAY_PIN_06="M21" + +source $(dirname ${BASH_SOURCE[0]})/../../utils/environment.sh From 7eaa8bd651fb34e5b9845d4c8692e4e4e9e5a3e3 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 21 Dec 2017 01:19:36 +0100 Subject: [PATCH 2/6] Fix htmlgen for incomplete databases Signed-off-by: Clifford Wolf --- htmlgen/htmlgen.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htmlgen/htmlgen.py b/htmlgen/htmlgen.py index 104040ce..b9e5e8c9 100755 --- a/htmlgen/htmlgen.py +++ b/htmlgen/htmlgen.py @@ -38,6 +38,9 @@ else: db_dir = os.path.join(get_setting("XRAY_DATABASE_DIR"), get_setting("XRAY_DATABASE")) def db_open(fn): + filename = os.path.join(db_dir, fn) + if not os.path.exists(filename): + return open("/dev/null") return open(os.path.join(db_dir, fn)) def out_open(fn): @@ -233,6 +236,7 @@ with out_open("index.html") as f: for grid_x in range(grid_range[0], grid_range[2]+1): tilename = grid_map[(grid_x, grid_y)] tiledata = grid["tiles"][tilename] + segdata = None bgcolor = "#aaaaaa" if tiledata["type"] in ["INT_L", "INT_R"]: bgcolor="#aaaaff" @@ -253,7 +257,10 @@ with out_open("index.html") as f: title.append("%s site: %s" % (sitetype, sitename)) if "segment" in tiledata: - title.append("Baseaddr: %s %d" % tuple(segdata["baseaddr"])) + if "baseaddr" in segdata: + title.append("Baseaddr: %s %d" % tuple(segdata["baseaddr"])) + else: + print("Warning: no baseaddr in segment %s (via tile %s)." % (tiledata["segment"], tilename)) print("" % (bgcolor, "\n".join(title)), file=f) if "segment" in tiledata: From ffa7ede78089e15c0c2de630098eed079c1291a4 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 21 Dec 2017 01:32:04 +0100 Subject: [PATCH 3/6] Fix segmaker for segments without known base address Signed-off-by: Clifford Wolf --- utils/segmaker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/segmaker.py b/utils/segmaker.py index 831731df..0354973d 100644 --- a/utils/segmaker.py +++ b/utils/segmaker.py @@ -42,6 +42,9 @@ class segmaker: segdata = self.grid["segments"][tiledata["segment"]] + if "baseaddr" not in segdata: + continue + if segdata["type"] not in self.segments_by_type: self.segments_by_type[segdata["type"]] = dict() segments = self.segments_by_type[segdata["type"]] From b9ede7cab9d7fc1243bfab8b7c91af8683549e9d Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 21 Dec 2017 01:49:34 +0100 Subject: [PATCH 4/6] Fix various instances of top.py for kintex ROI Signed-off-by: Clifford Wolf --- fuzzers/011-ffconfig/top.py | 2 +- fuzzers/012-clbn5ffmux/top.py | 2 +- fuzzers/013-clbncy0/top.py | 2 +- fuzzers/014-ffsrcemux/top.py | 2 +- fuzzers/015-clbnffmux/top.py | 2 +- fuzzers/016-clbnoutmux/top.py | 2 +- fuzzers/017-clbprecyinit/top.py | 2 +- fuzzers/018-clbram/top.py | 2 +- fuzzers/019_ndi1mux/top.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fuzzers/011-ffconfig/top.py b/fuzzers/011-ffconfig/top.py index 9f78e0b0..f3a5a06e 100644 --- a/fuzzers/011-ffconfig/top.py +++ b/fuzzers/011-ffconfig/top.py @@ -9,7 +9,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/012-clbn5ffmux/top.py b/fuzzers/012-clbn5ffmux/top.py index e1032bad..a712fda5 100644 --- a/fuzzers/012-clbn5ffmux/top.py +++ b/fuzzers/012-clbn5ffmux/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/013-clbncy0/top.py b/fuzzers/013-clbncy0/top.py index fa307753..254e9461 100644 --- a/fuzzers/013-clbncy0/top.py +++ b/fuzzers/013-clbncy0/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/014-ffsrcemux/top.py b/fuzzers/014-ffsrcemux/top.py index a76897be..d87dc6ce 100644 --- a/fuzzers/014-ffsrcemux/top.py +++ b/fuzzers/014-ffsrcemux/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/015-clbnffmux/top.py b/fuzzers/015-clbnffmux/top.py index 1d0e19e0..abd0ef97 100644 --- a/fuzzers/015-clbnffmux/top.py +++ b/fuzzers/015-clbnffmux/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/016-clbnoutmux/top.py b/fuzzers/016-clbnoutmux/top.py index 2b34e385..11c3043c 100644 --- a/fuzzers/016-clbnoutmux/top.py +++ b/fuzzers/016-clbnoutmux/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/017-clbprecyinit/top.py b/fuzzers/017-clbprecyinit/top.py index 0bef994c..0b7abeb8 100644 --- a/fuzzers/017-clbprecyinit/top.py +++ b/fuzzers/017-clbprecyinit/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/018-clbram/top.py b/fuzzers/018-clbram/top.py index 84a6fd40..f1864364 100644 --- a/fuzzers/018-clbram/top.py +++ b/fuzzers/018-clbram/top.py @@ -24,7 +24,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) diff --git a/fuzzers/019_ndi1mux/top.py b/fuzzers/019_ndi1mux/top.py index ea137279..d50c4067 100644 --- a/fuzzers/019_ndi1mux/top.py +++ b/fuzzers/019_ndi1mux/top.py @@ -7,7 +7,7 @@ def slice_xy(): '''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)''' # SLICE_X12Y100:SLICE_X27Y149 # Note XRAY_ROI_GRID_* is something else - m = re.match(r'SLICE_X(.*)Y(.*):SLICE_X(.*)Y(.*)', os.getenv('XRAY_ROI')) + m = re.match(r'SLICE_X([0-9]*)Y([0-9]*):SLICE_X([0-9]*)Y([0-9]*)', os.getenv('XRAY_ROI')) ms = [int(m.group(i + 1)) for i in range(4)] return ((ms[0], ms[2] + 1), (ms[1], ms[3] + 1)) From b510c6b96ad6de8af98f217811231227c9139ee3 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 21 Dec 2017 02:09:28 +0100 Subject: [PATCH 5/6] Improve group highlighting in generated HTML output Signed-off-by: Clifford Wolf --- htmlgen/htmlgen.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htmlgen/htmlgen.py b/htmlgen/htmlgen.py index b9e5e8c9..34482350 100755 --- a/htmlgen/htmlgen.py +++ b/htmlgen/htmlgen.py @@ -293,6 +293,7 @@ for segtype in sorted(segbits.keys()): var grp2bits = { }; var bit2grp = { } var highlight_bits = [ ]; +var highlight_cache = { }; function ome(bit) { // console.log("ome: " + bit); @@ -301,9 +302,12 @@ function ome(bit) { for (i in grp2bits[grp]) { b = grp2bits[grp][i]; // console.log(" -> " + b); - el = document.getElementById("bit" + b); - el.style.fontWeight = "bold"; - highlight_bits.push(b); + if (!(b in highlight_cache)) { + el = document.getElementById("bit" + b); + highlight_cache[b] = el.bgColor; + el.bgColor = "#ffffff" + highlight_bits.push(b); + } } } } @@ -313,6 +317,8 @@ function oml() { for (i in highlight_bits) { b = highlight_bits[i]; el = document.getElementById("bit" + b); + el.bgColor = highlight_cache[b]; + delete highlight_cache[b]; el.style.fontWeight = "normal"; } highlight_bits.length = 0; From ac532961dfd5aacdc59e2b71219ff9a189e0e933 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 21 Dec 2017 02:19:25 +0100 Subject: [PATCH 6/6] Fix JS code in htmlgen.py Signed-off-by: Clifford Wolf --- htmlgen/htmlgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htmlgen/htmlgen.py b/htmlgen/htmlgen.py index 34482350..6099886e 100755 --- a/htmlgen/htmlgen.py +++ b/htmlgen/htmlgen.py @@ -305,7 +305,7 @@ function ome(bit) { if (!(b in highlight_cache)) { el = document.getElementById("bit" + b); highlight_cache[b] = el.bgColor; - el.bgColor = "#ffffff" + el.bgColor = "#ffffff"; highlight_bits.push(b); } }