From bf21b644984656fdea6ec2609b22a74f3296115b Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 23 Oct 2017 11:30:23 +0100 Subject: Fix IeRen database for up5k --- icefuzz/tests/.gitignore | 2 ++ icefuzz/tests/ioctrl_5k.py | 21 +++++++++++++++++++++ icefuzz/tests/ioctrl_5k.sh | 28 ++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 icefuzz/tests/.gitignore create mode 100644 icefuzz/tests/ioctrl_5k.py create mode 100755 icefuzz/tests/ioctrl_5k.sh (limited to 'icefuzz/tests') diff --git a/icefuzz/tests/.gitignore b/icefuzz/tests/.gitignore new file mode 100644 index 0000000..cc0ba46 --- /dev/null +++ b/icefuzz/tests/.gitignore @@ -0,0 +1,2 @@ +ioctrl.work +intosc.work diff --git a/icefuzz/tests/ioctrl_5k.py b/icefuzz/tests/ioctrl_5k.py new file mode 100644 index 0000000..67c0c6d --- /dev/null +++ b/icefuzz/tests/ioctrl_5k.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +import fileinput + +for line in fileinput.input(): + line = line.split() + if len(line) == 0: + continue + if line[0] == ".io_tile": + current_tile = (int(line[1]), int(line[2])) + if line[0] == "IoCtrl" and line[1] == "REN_0": + ren = (current_tile[0], current_tile[1], 0) + if line[0] == "IoCtrl" and line[1] == "REN_1": + ren = (current_tile[0], current_tile[1], 1) + if line[0] == "IOB_0": + iob = (current_tile[0], current_tile[1], 0) + if line[0] == "IOB_1": + iob = (current_tile[0], current_tile[1], 1) + +print("(%2d, %2d, %2d, %2d, %2d, %2d)," % (iob[0], iob[1], iob[2], ren[0], ren[1], ren[2])) + diff --git a/icefuzz/tests/ioctrl_5k.sh b/icefuzz/tests/ioctrl_5k.sh new file mode 100755 index 0000000..339cac7 --- /dev/null +++ b/icefuzz/tests/ioctrl_5k.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -ex + +mkdir -p ioctrl.work +cd ioctrl.work + +pins="2 3 4 6 9 10 11 12 + 13 14 15 16 17 18 19 20 21 23 + 25 26 27 28 31 32 34 35 36 + 37 38 42 43 44 45 46 47 48 + " +pins="$( echo $pins )" + +for pin in $pins; do + pf="ioctrl_$pin" + echo "module top (output pin); assign pin = 1; endmodule" > ${pf}.v + echo "set_io pin $pin" > ${pf}.pcf + bash ../../icecube.sh -up5k ${pf}.v > ${pf}.log 2>&1 + ../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp +done + +set +x +echo "--snip--" +for pin in $pins; do + python3 ../ioctrl_5k.py ioctrl_${pin}.exp +done | tee ioctrl_db.txt +echo "--snap--" -- cgit v1.2.3