aboutsummaryrefslogtreecommitdiffstats
path: root/generic/examples/write_fasm.py
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-08-05 17:28:54 +0100
committerDavid Shah <dave@ds0.me>2019-08-05 17:28:54 +0100
commitebcdfc1ae83eaef8e4a4d7586385eafdf8443386 (patch)
treeb4ae25c38d44280091b9a5c41f6064608ddbb6d5 /generic/examples/write_fasm.py
parentec48f8f464a63dece47e9af903098387088c68c5 (diff)
downloadnextpnr-ebcdfc1ae83eaef8e4a4d7586385eafdf8443386.tar.gz
nextpnr-ebcdfc1ae83eaef8e4a4d7586385eafdf8443386.tar.bz2
nextpnr-ebcdfc1ae83eaef8e4a4d7586385eafdf8443386.zip
generic: New Property interface
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'generic/examples/write_fasm.py')
-rw-r--r--generic/examples/write_fasm.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/examples/write_fasm.py b/generic/examples/write_fasm.py
index 1f279b63..ede8f16b 100644
--- a/generic/examples/write_fasm.py
+++ b/generic/examples/write_fasm.py
@@ -45,8 +45,7 @@ def write_fasm(ctx, paramCfg, f):
print("%s.%s" % (cell.bel, fasm_name), file=f)
else:
# Parameters with width >32 are direct binary, otherwise denary
- binval = val if cfg.width > 32 else "{:0{}b}".format(int(val), cfg.width)
- print("%s.%s[%d:0] = %d'b%s" % (cell.bel, fasm_name, cfg.width-1, cfg.width, binval), file=f)
+ print("%s.%s[%d:0] = %d'b%s" % (cell.bel, fasm_name, cfg.width-1, cfg.width, val), file=f)
else:
print("%s.%s.%s" % (cell.bel, fasm_name, val), file=f)
print("", file=f) \ No newline at end of file