aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-18 13:46:00 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-18 13:46:00 +0200
commitacdaec249ad9b6288cc053e4d504ca8f14e41ec6 (patch)
tree2c718de11d9bdcf9fece55f2e4e9c0da22d7a114
parent609794f9e6561fec1324ee554d85742e13e3d513 (diff)
downloadnextpnr-acdaec249ad9b6288cc053e4d504ca8f14e41ec6.tar.gz
nextpnr-acdaec249ad9b6288cc053e4d504ca8f14e41ec6.tar.bz2
nextpnr-acdaec249ad9b6288cc053e4d504ca8f14e41ec6.zip
Cleanups in iCE40 blinky and picorv32 tests
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r--ice40/blinky.ys2
-rwxr-xr-xice40/picorv32.sh2
-rwxr-xr-xice40/picorv32_arachne.sh9
-rwxr-xr-xice40/transform_arachne_loc.py24
4 files changed, 2 insertions, 35 deletions
diff --git a/ice40/blinky.ys b/ice40/blinky.ys
index bad0a8b4..a5dd2c85 100644
--- a/ice40/blinky.ys
+++ b/ice40/blinky.ys
@@ -1,3 +1,3 @@
read_verilog blinky.v
-synth_ice40 -top blinky -nocarry
+synth_ice40 -top blinky
write_json blinky.json
diff --git a/ice40/picorv32.sh b/ice40/picorv32.sh
index 2c67f641..87426cde 100755
--- a/ice40/picorv32.sh
+++ b/ice40/picorv32.sh
@@ -2,5 +2,5 @@
set -ex
rm -f picorv32.v
wget https://raw.githubusercontent.com/cliffordwolf/picorv32/master/picorv32.v
-yosys -p 'synth_ice40 -nocarry -json picorv32.json -top top' picorv32.v picorv32_top.v
+yosys -p 'synth_ice40 -json picorv32.json -top top' picorv32.v picorv32_top.v
../nextpnr-ice40 --hx8k --asc picorv32.asc --json picorv32.json
diff --git a/ice40/picorv32_arachne.sh b/ice40/picorv32_arachne.sh
deleted file mode 100755
index b3960fdc..00000000
--- a/ice40/picorv32_arachne.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-set -ex
-rm -f picorv32.v
-wget https://raw.githubusercontent.com/cliffordwolf/picorv32/master/picorv32.v
-yosys -p 'synth_ice40 -nocarry -blif picorv32.blif -top top' picorv32.v picorv32_top.v
-arachne-pnr -d 8k --post-place-blif picorv32_place.blif picorv32.blif -o picorv32_arachne_all.asc
-yosys -p "read_blif -wideports picorv32_place.blif; read_verilog -lib +/ice40/cells_sim.v; write_json picorv32_place.json"
-./transform_arachne_loc.py picorv32_place.json > picorv32_place_nx.json
-../nextpnr-ice40 --hx8k --asc picorv32_ar_placed.asc --json picorv32_place_nx.json --force
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