Use hex addresses in smtbmc vcd mem traces
authorClifford Wolf <clifford@clifford.at>
Tue, 28 Feb 2017 12:54:50 +0000 (13:54 +0100)
committerClifford Wolf <clifford@clifford.at>
Tue, 28 Feb 2017 12:54:50 +0000 (13:54 +0100)
backends/smt2/smtbmc.py

index b587981bc6a34fab4df2b713e65eb823566486a2..5b5ade1035ed8866d905593af784202c5bbd061a 100644 (file)
@@ -637,7 +637,7 @@ def write_vcd_trace(steps_start, steps_stop, index):
                 assert len(tdata) == len(rdata)
 
                 netpath = mempath[:]
-                netpath[-1] += "<%d>" % int(addr, 2)
+                netpath[-1] += "<%0*x>" % ((len(addr)+3) // 4, int(addr, 2))
                 vcd.add_net([topmod] + netpath, width)
 
                 for i in range(steps_start, steps_stop):