Don't dump VCD values if unchanged
This commit is contained in:
parent
878f21a647
commit
bd23a3b423
|
@ -57,19 +57,14 @@ class VCDDump(Dump):
|
|||
c = ""
|
||||
for v in self.variables:
|
||||
try:
|
||||
if v.values[self.cnt + 1] != v.current_value:
|
||||
c += "b"
|
||||
c += dec2bin(v.values[self.cnt + 1], v.width)
|
||||
c += " "
|
||||
c += v.code
|
||||
c += "\n"
|
||||
val = v.values[self.cnt + 1]
|
||||
if val != v.current_value:
|
||||
v.current_value = val
|
||||
c += f"b{dec2bin(val, v.width)} {v.code}\n"
|
||||
except:
|
||||
pass
|
||||
if c != "":
|
||||
r += "#"
|
||||
r += str(self.cnt+1)
|
||||
r += "\n"
|
||||
r += c
|
||||
r += f"#{self.cnt + 1}\n{c}"
|
||||
return r
|
||||
|
||||
def generate_date(self):
|
||||
|
|
Loading…
Reference in New Issue