diff options
author | David Shah <davey1576@gmail.com> | 2018-06-07 20:39:53 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-06-07 20:39:53 +0200 |
commit | 41b949832c0b5f02a7b345b1c8f14480d5f81a8a (patch) | |
tree | 9cc87b980fb0192910650180228728e47a20267a /python | |
parent | 9b87f132c8f0ffa63357096313c92eef0bc5633f (diff) | |
download | nextpnr-41b949832c0b5f02a7b345b1c8f14480d5f81a8a.tar.gz nextpnr-41b949832c0b5f02a7b345b1c8f14480d5f81a8a.tar.bz2 nextpnr-41b949832c0b5f02a7b345b1c8f14480d5f81a8a.zip |
Fix handling of parameters in JSON
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'python')
-rw-r--r-- | python/dump_design.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/dump_design.py b/python/dump_design.py index 5bac140d..1850d509 100644 --- a/python/dump_design.py +++ b/python/dump_design.py @@ -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))) |