@@ -204,7 +204,7 @@ def recurse_models( m, spaces ):
204
204
# The first cycle VCD contains the default value
205
205
bin_str = net [0 ]._dsl .Type ().to_bits ().bin ()
206
206
207
- print ( f"b{ bin_str } { net_symbol_mapping [i ]} " , file = vcd_file )
207
+ print ( f"b{ bin_str [ 2 :] } { net_symbol_mapping [i ]} " , file = vcd_file )
208
208
209
209
# Set this to be the last cycle value str
210
210
last_values [i ] = bin_str
@@ -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?
@@ -249,15 +249,15 @@ def dump_vcd_inner( s ):
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
- print ( f'b{ net_bits_bin_str } { symbol } ' , file = vcd_file )
252
+ print ( f'b{ net_bits_bin_str [ 2 :] } { 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