aboutsummaryrefslogtreecommitdiffstats
path: root/icefuzz/make_ram40.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-10-31 18:24:01 +0100
committerClifford Wolf <clifford@clifford.at>2017-10-31 18:24:01 +0100
commit3ba18d001754de563ab0baa2a1c8eecbe63ef121 (patch)
tree55369de2e9c3b4d7651961b9308b2c8893583ae1 /icefuzz/make_ram40.py
parentd9d2a3dcaa749014f5b9a539768b8368bb529b28 (diff)
parent2ad5600b47f436752418609af19915a00e7b24f8 (diff)
downloadicestorm-3ba18d001754de563ab0baa2a1c8eecbe63ef121.tar.gz
icestorm-3ba18d001754de563ab0baa2a1c8eecbe63ef121.tar.bz2
icestorm-3ba18d001754de563ab0baa2a1c8eecbe63ef121.zip
Merge branch 'daveshah1-u5k'
Diffstat (limited to 'icefuzz/make_ram40.py')
-rw-r--r--icefuzz/make_ram40.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/icefuzz/make_ram40.py b/icefuzz/make_ram40.py
index f4acb4e..75ac604 100644
--- a/icefuzz/make_ram40.py
+++ b/icefuzz/make_ram40.py
@@ -14,7 +14,11 @@ os.mkdir(working_dir)
for idx in range(num):
with open(working_dir + "/ram40_%02d.v" % idx, "w") as f:
glbs = ["glb[%d]" % i for i in range(np.random.randint(8)+1)]
- glbs_choice = ["wa", "ra", "msk", "wd", "we", "wce", "wc", "re", "rce", "rc"]
+ # Connecting GLB to CE pins seemingly disallowed
+ if device_class == "5k":
+ glbs_choice = ["wa", "ra", "msk", "wd", "we", "wc", "re", "rc"]
+ else:
+ glbs_choice = ["wa", "ra", "msk", "wd", "we", "wce", "wc", "re", "rce", "rc"]
print("""
module top (
input [%d:0] glb_pins,
@@ -26,7 +30,7 @@ for idx in range(num):
.USER_SIGNAL_TO_GLOBAL_BUFFER(glb_pins),
.GLOBAL_BUFFER_OUTPUT(glb)
);
- """ % (len(glbs)-1, len(pins) - 16 - 1, len(glbs)-1, len(glbs)-1), file=f)
+ """ % (len(glbs)-1, len(pins) - len(glbs) - 16 - 1, len(glbs)-1, len(glbs)-1), file=f)
bits = ["in_pins[%d]" % i for i in range(60)]
bits = list(np.random.permutation(bits))
for i in range(num_ramb40):
@@ -102,7 +106,7 @@ for idx in range(num):
print("endmodule", file=f)
with open(working_dir + "/ram40_%02d.pcf" % idx, "w") as f:
p = list(np.random.permutation(pins))
- for i in range(len(pins) - 16):
+ for i in range(len(pins) - len(glbs) - 16):
print("set_io in_pins[%d] %s" % (i, p.pop()), file=f)
for i in range(16):
print("set_io out_pins[%d] %s" % (i, p.pop()), file=f)