@@ -143,6 +143,8 @@ def _vcs_binary(ctx):
143
143
command += " -top " + ctx .attr .module_top
144
144
command += " -debug_access -debug_region=cell+encrypt +v2k"
145
145
command += " +vcs+vcdpluson"
146
+ command += " -kdb"
147
+
146
148
147
149
for opt in ctx .attr .opts :
148
150
command += " " + opt
@@ -319,10 +321,23 @@ def _vcs_run(ctx):
319
321
args .append ("+vcs+dumpon+0+0" )
320
322
args .append ("+vcs+dumparrays" )
321
323
322
- outputs += trace_vcd + trace_vpd
324
+ trace_fsdb = []
325
+ if ctx .attr .trace_fsdb :
326
+ file = ctx .actions .declare_file ("{}.fsdb" .format (ctx .label .name ))
327
+ trace_fsdb .append (file )
328
+ args .append ("+fsdb=" + file .path )
329
+ args .append ("+vcs+dumparrays" )
330
+ args .append ("+vcs+dumparrays" )
331
+ args .append ("-kdb" )
332
+ args .append ("-error=noTLVRZ" )
333
+ args .append ("-suppress=SVA-UB" )
334
+
335
+
336
+ outputs += trace_vcd + trace_vpd + trace_fsdb
323
337
result .append (WaveformInfo (
324
338
vpd_files = depset (trace_vpd ),
325
339
vcd_files = depset (trace_vcd ),
340
+ fsdb_files = depset (trace_fsdb ),
326
341
))
327
342
328
343
# Binary runfiles
@@ -434,6 +449,10 @@ vcs_run = rule(
434
449
doc = "Enable trace output in VCD format" ,
435
450
default = False ,
436
451
),
452
+ "trace_fsdb" : attr .bool (
453
+ doc = "Enable trace output in FSDB format" ,
454
+ default = False ,
455
+ ),
437
456
"trace_vpd" : attr .bool (
438
457
doc = "Enable trace output in VPD format" ,
439
458
default = False ,
0 commit comments