Skip to content

Commit 31c8a0b

Browse files
committed
[wip] vcs/defs: Added options for fsdb
Signed-off-by: Jan Bylicki <[email protected]>
1 parent e4b5044 commit 31c8a0b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

common/providers.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ WaveformInfo = provider(
1818
doc = "Waveform collected during a simulation run",
1919
fields = {
2020
"vcd_files": "VCD waveform files",
21+
"fsdb_files": "FSDB waveform files",
2122
"vpd_files": "VPD waveform files",
2223
},
2324
)

vcs/defs.bzl

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,21 @@ def _vcs_run(ctx):
319319
args.append("+vcs+dumpon+0+0")
320320
args.append("+vcs+dumparrays")
321321

322-
outputs += trace_vcd + trace_vpd
322+
trace_fsdb = []
323+
if ctx.attr.trace_fsdb:
324+
file = ctx.actions.declare_file("{}.fsdb".format(ctx.label.name))
325+
trace_fsdb.append(file)
326+
args.append("+fsdb=" + file.path)
327+
args.append("+vcs+dumparrays")
328+
args.append("+vcs+dumparrays")
329+
args.append("-kdb")
330+
331+
332+
outputs += trace_vcd + trace_vpd + trace_fsdb
323333
result.append(WaveformInfo(
324334
vpd_files = depset(trace_vpd),
325335
vcd_files = depset(trace_vcd),
336+
fsdb_files = depset(trace_fsdb),
326337
))
327338

328339
# Binary runfiles
@@ -434,6 +445,10 @@ vcs_run = rule(
434445
doc = "Enable trace output in VCD format",
435446
default = False,
436447
),
448+
"trace_fsdb": attr.bool(
449+
doc = "Enable trace output in FSDB format",
450+
default = False,
451+
),
437452
"trace_vpd": attr.bool(
438453
doc = "Enable trace output in VPD format",
439454
default = False,

0 commit comments

Comments
 (0)