aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/transform_arachne_loc.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-20 17:13:26 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-20 17:13:26 +0200
commite16b4a325e2b0721e29cba93804923dedf74a68c (patch)
treea80aa31ed8be848d460cd90410a91f24da14cea9 /ice40/transform_arachne_loc.py
parentc0f1af87f6c1c6843e536a87ef88e39fa3428c5b (diff)
parent6c835d76f27af79813299419780c039eb2a8b02e (diff)
downloadnextpnr-e16b4a325e2b0721e29cba93804923dedf74a68c.tar.gz
nextpnr-e16b4a325e2b0721e29cba93804923dedf74a68c.tar.bz2
nextpnr-e16b4a325e2b0721e29cba93804923dedf74a68c.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into gridapi
Diffstat (limited to 'ice40/transform_arachne_loc.py')
-rwxr-xr-xice40/transform_arachne_loc.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/ice40/transform_arachne_loc.py b/ice40/transform_arachne_loc.py
deleted file mode 100755
index 14792845..00000000
--- a/ice40/transform_arachne_loc.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python3
-import json
-import sys
-import re
-
-with open(sys.argv[1]) as f:
- data = json.load(f)
-
-for mod, moddata in data["modules"].items():
- if "cells" in moddata:
- for cell, celldata in moddata["cells"].items():
- pos = re.split('[,/]', celldata["attributes"]["loc"])
- pos = [int(_) for _ in pos]
- if celldata["type"] == "ICESTORM_LC":
- celldata["attributes"]["BEL"] = "X%d/Y%d/lc%d" % (pos[0], pos[1], pos[2])
- elif celldata["type"] == "SB_IO":
- celldata["attributes"]["BEL"] = "X%d/Y%d/io%d" % (pos[0], pos[1], pos[2])
- elif "RAM" in celldata["type"]:
- celldata["attributes"]["BEL"] = "X%d/Y%d/ram" % (pos[0], pos[1])
- elif celldata["type"] == "SB_GB":
- celldata["attributes"]["BEL"] = "X%d/Y%d/gb" % (pos[0], pos[1])
- else:
- assert False
-print(json.dumps(data, sort_keys=True, indent=4)) \ No newline at end of file