1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-01-26 12:12:29 +00:00

Fix handling of parameters in JSON

Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
David Shah
2018-06-07 20:39:53 +02:00
parent 9b87f132c8
commit 41b949832c
2 changed files with 6 additions and 2 deletions

View File

@@ -15,7 +15,11 @@ for cell in sorted(design.cells, key=lambda x: x.first):
if len(cell.second.params) > 0:
print("\tParams:")
for param in cell.second.params:
print("\t\t{}: {}".format(param.first, param.second))
val = param.second
if val.isdigit():
val = bin(int(val))[2:]
val = "{}'b{}".format(len(val), val)
print("\t\t{}: {}".format(param.first, val))
if not cell.second.bel.nil():
print("\tBel: {}".format(chip.getBelName(cell.second.bel)))