From 7ae7b0c16c257b4e8ad9bbc11d5868abbfca78f5 Mon Sep 17 00:00:00 2001 From: John McMaster Date: Thu, 18 Jan 2018 19:53:40 -0800 Subject: [PATCH] roi_harness: misc fixes Signed-off-by: John McMaster --- minitests/roi_harness/basys3.sh | 1 + minitests/roi_harness/runme.sh | 6 ++++++ minitests/roi_harness/runme.tcl | 6 +++--- tools/fasm2frame.py | 1 + tools/segprint2fasm.py | 3 ++- 5 files changed, 13 insertions(+), 4 deletions(-) mode change 100644 => 100755 tools/fasm2frame.py mode change 100644 => 100755 tools/segprint2fasm.py diff --git a/minitests/roi_harness/basys3.sh b/minitests/roi_harness/basys3.sh index 0ffed377..00fed676 100644 --- a/minitests/roi_harness/basys3.sh +++ b/minitests/roi_harness/basys3.sh @@ -11,3 +11,4 @@ export XRAY_PIN_04="W15" export XRAY_PIN_05="V15" export XRAY_PIN_06="W14" +export XRAY_BITREAD="$XRAY_DIR/build/tools/bitread -part_file $XRAY_DIR/database/artix7/xc7a35tcpg236-1.yaml" diff --git a/minitests/roi_harness/runme.sh b/minitests/roi_harness/runme.sh index 149ec619..b35e890a 100644 --- a/minitests/roi_harness/runme.sh +++ b/minitests/roi_harness/runme.sh @@ -1,6 +1,12 @@ #!/bin/bash set -ex +rm -f out_last vivado -mode batch -source runme.tcl test -z "$(fgrep CRITICAL vivado.log)" +pushd out_last +${XRAY_BITREAD} -F $XRAY_ROI_FRAMES -o design.bits -z -y design.bit +${XRAY_SEGPRINT} -zd design.bits >design.segp +${XRAY_DIR}/tools/segprint2fasm.py design.segp design.fasm +popd diff --git a/minitests/roi_harness/runme.tcl b/minitests/roi_harness/runme.tcl index e3a7ed7d..58e4d876 100644 --- a/minitests/roi_harness/runme.tcl +++ b/minitests/roi_harness/runme.tcl @@ -53,6 +53,7 @@ puts " Y_DOUT_BASE: $Y_DOUT_BASE" puts " outdir: $outdir" file mkdir $outdir +file link -symbolic out_last $outdir source ../../utils/utils.tcl @@ -92,8 +93,8 @@ if {$part eq "xc7a50tfgg484-1"} { incr banki set net2pin(dout[$i]) $pin } -# Arty A7 switch, button, and LED } elseif {$part eq "xc7a35tcsg324-1"} { + # Arty A7 switch, button, and LED if {$pincfg eq "ARTY-A7-SWBUT"} { # https://reference.digilentinc.com/reference/programmable-logic/arty/reference-manual?redirect=1 # 4 switches then 4 buttons @@ -142,7 +143,6 @@ if {$part eq "xc7a50tfgg484-1"} { } else { error "Unsupported config $pincfg" } -# Arty A7 switch, button, and LED } elseif {$part eq "xc7a35tcpg236-1"} { if {$pincfg eq "BASYS3-SWBUT"} { # https://raw.githubusercontent.com/Digilent/digilent-xdc/master/Basys-3-Master.xdc @@ -168,7 +168,7 @@ if {$part eq "xc7a50tfgg484-1"} { } } else { error "Unsupported config $pincfg" - } + } } else { error "Pins: unsupported part $part" } diff --git a/tools/fasm2frame.py b/tools/fasm2frame.py old mode 100644 new mode 100755 index 622b85cc..c29b9295 --- a/tools/fasm2frame.py +++ b/tools/fasm2frame.py @@ -183,6 +183,7 @@ def run(f_in, f_out, sparse=False, debug=False): 'INT_L': int2dbkey, 'INT_R': int2dbkey, 'HCLK_L': int2dbkey, + 'HCLK_R': int2dbkey, } f = tile2dbkey.get(tilej['type'], None) diff --git a/tools/segprint2fasm.py b/tools/segprint2fasm.py old mode 100644 new mode 100755 index 198f795b..4d4e37d5 --- a/tools/segprint2fasm.py +++ b/tools/segprint2fasm.py @@ -61,10 +61,11 @@ def tag2fasm(grid, seg, tag): 'INT_L': intf, 'INT_R': intf, 'HCLK_L': intf, + 'HCLK_R': intf, } f = tag2asm.get(tile_type, None) if f is None: - raise Exception("Unhandled segment type %s" % tilej['type']) + raise Exception("Unhandled segment type %s" % tile_type) return f(seg, tile, tag_post)