@@ -202,7 +202,7 @@ def recurse_models( m, spaces ):
202
202
for i , net in enumerate (trimmed_value_nets ):
203
203
# Convert everything to Bits to get around lack of bit struct support.
204
204
# The first cycle VCD contains the default value
205
- bin_str = net [0 ]._dsl .Type ().to_bits ().bin ()
205
+ bin_str = net [0 ]._dsl .Type ().to_bits ().vcd_bin ()
206
206
207
207
print ( f"b{ bin_str } { net_symbol_mapping [i ]} " , file = vcd_file )
208
208
@@ -221,7 +221,7 @@ def recurse_models( m, spaces ):
221
221
if i != vcd_clock_net_idx ]
222
222
223
223
# Flip clock for the first cycle
224
- print ( '\n #0\n b0b1 {}\n ' .format ( clock_symbol ), file = vcd_file , flush = True )
224
+ print ( '\n #0\n 1 {}\n ' .format ( clock_symbol ), file = vcd_file , flush = True )
225
225
226
226
# Returns a dump_vcd function that is ready to be appended to _sched.
227
227
# TODO: type check?
@@ -243,21 +243,21 @@ def dump_vcd_inner( s ):
243
243
except Exception as e :
244
244
raise TypeError (f'{ e } \n - { signal } becomes another type. Please check your code.' )
245
245
246
- net_bits_bin_str = net_bits_bin .bin ()
246
+ net_bits_bin_str = net_bits_bin .vcd_bin ()
247
247
# `last_value` is the string form of a Bits object in binary
248
- # e.g. '0b000 ' == Bits3(0).bin ()
248
+ # e.g. '000 ' == Bits3(0).vcd_bin ()
249
249
# We store strings instead of values ...
250
250
if last_values [i ] != net_bits_bin_str :
251
251
last_values [i ] = net_bits_bin_str
252
252
print ( f'b{ net_bits_bin_str } { symbol } ' , file = vcd_file )
253
253
254
254
# Flop clock at the end of cycle
255
255
next_neg_edge = 100 * vcd_sim_ncycles + 50
256
- print ( f'\n #{ next_neg_edge } \n b0b0 { clock_symbol } ' , file = vcd_file )
256
+ print ( f'\n #{ next_neg_edge } \n 0 { clock_symbol } ' , file = vcd_file )
257
257
258
258
# Flip clock of the next cycle
259
259
next_pos_edge = next_neg_edge + 50
260
- print ( f'#{ next_pos_edge } \n b0b1 { clock_symbol } \n ' , file = vcd_file , flush = True )
260
+ print ( f'#{ next_pos_edge } \n 1 { clock_symbol } \n ' , file = vcd_file , flush = True )
261
261
vcd_sim_ncycles += 1
262
262
263
263
def gen_dump_vcd ( s ):
0 commit comments