From 3920526653c11ac61d6684de5601812635d1eae7 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 2 Oct 2020 10:02:53 +0000 Subject: [PATCH] really really cut down core --- experiments9/Makefile | 14 ++++++----- experiments9/coriolis2/ioring.py | 24 +++++++++++++++++-- .../{ls180.il => partial_core_ls180.il} | 0 pinmux | 2 +- 4 files changed, 31 insertions(+), 9 deletions(-) rename experiments9/non_generated/{ls180.il => partial_core_ls180.il} (100%) diff --git a/experiments9/Makefile b/experiments9/Makefile index d90a63b..50562d3 100755 --- a/experiments9/Makefile +++ b/experiments9/Makefile @@ -5,7 +5,7 @@ # YOSYS_SET_TOP = Yes CHIP = chip - CORE = ls180 + #CORE = ls180 MARGIN = 2 BOOMOPT = BOOGOPT = @@ -14,9 +14,10 @@ USE_CLOCKTREE = Yes USE_DEBUG = No USE_KITE = No - VST_FLAGS = --vst-use-concat + #VST_FLAGS = --vst-use-concat - NETLISTS = $(shell cat cells.lst) + #NETLISTS = $(shell cat cells.lst) + NETLISTS = ls180 # YOSYS_FLATTEN = $(shell cat flatten.lst) @@ -24,11 +25,12 @@ include ./mk/design-flow.mk pinmux: - python ../pinmux/src/pinmux_generator.py -v -s ls180 -o coriolis2/ls180 + (cd coriolis2 && python ../../pinmux/src/pinmux_generator.py -v -s ls180 -o ls180) ln -f -s ../pinmux/src/parse.py coriolis2/pinparse.py -blif: ls180.blif -vst: ls180.vst +# comment out for now +#blif: ls180.blif +#vst: ls180.vst lvx: lvx-chip_cts_r druc: druc-chip_cts_r diff --git a/experiments9/coriolis2/ioring.py b/experiments9/coriolis2/ioring.py index babf856..c61fa47 100644 --- a/experiments9/coriolis2/ioring.py +++ b/experiments9/coriolis2/ioring.py @@ -4,11 +4,31 @@ from helpers import l, u, n import os import json +def _byteify(data, ignore_dicts = False): + # if this is a unicode string, return its string representation + if isinstance(data, unicode): + return data.encode('utf-8') + # if this is a list of values, return list of byteified values + if isinstance(data, list): + return [ _byteify(item, ignore_dicts=True) for item in data ] + # if this is a dictionary, return dictionary of byteified keys and values + # but only if we haven't already byteified it + if isinstance(data, dict) and not ignore_dicts: + return dict((_byteify(key, ignore_dicts=True), + _byteify(value, ignore_dicts=True)) + for key, value in data.iteritems()) + # if it's anything else, return it in its original form + return data + # load JSON-formatted pad info from pinmux pth = os.path.abspath(__file__) pth = os.path.split(pth)[0] +print "path", pth with open("%s/ls180/litex_pinpads.json" % pth) as f: - chip = json.loads(f.read()) + txt = f.read() +chip = json.loads(txt, object_hook=_byteify) +chip = _byteify(chip, ignore_dicts=True) +print chip chip.update({ 'pads.ioPadGauge' : 'pxlib', # core option (big, time-consuming) @@ -18,4 +38,4 @@ chip.update({ 'pads.ioPadGauge' : 'pxlib', 'core.size' : ( l(13000), l(13000) ), 'chip.size' : ( l(17000), l(17000) ), 'chip.clockTree' : True, - } + }) diff --git a/experiments9/non_generated/ls180.il b/experiments9/non_generated/partial_core_ls180.il similarity index 100% rename from experiments9/non_generated/ls180.il rename to experiments9/non_generated/partial_core_ls180.il diff --git a/pinmux b/pinmux index 53a0fdc..9795616 160000 --- a/pinmux +++ b/pinmux @@ -1 +1 @@ -Subproject commit 53a0fdcfa1c8073b7d0e227c5cb14b1d9d87dd49 +Subproject commit 979561656b82cea849876330e659b03388450d94 -- 2.30.2