@@ -175,25 +175,31 @@ final class Workspace(
175175 l()
176176
177177 l(" // Tracing" )
178+ l(" int traceSupported = 0;" )
178179 l(" export \" DPI-C\" function simulation_initializeTrace;" )
179180 l(" function void simulation_initializeTrace;" )
180181 l(" input string traceFilePath;" )
181182 l(" `ifdef SVSIM_ENABLE_VCD_TRACING_SUPPORT" )
182183 l(" $dumpfile({traceFilePath,\" .vcd\" });" )
183184 l(" $dumpvars(0, " , dut.instanceName," );" )
185+ l(" traceSupported = 1;" )
184186 l(" `endif" )
185187 l(" `ifdef SVSIM_ENABLE_VPD_TRACING_SUPPORT" )
186188 l(" $vcdplusfile({traceFilePath,\" .vpd\" });" )
187189 l(" $dumpvars(0, " , dut.instanceName," );" )
188190 l(" $vcdpluson(0, " , dut.instanceName," );" )
191+ l(" traceSupported = 1;" )
189192 l(" `endif" )
190193 l(" `ifdef SVSIM_ENABLE_FSDB_TRACING_SUPPORT" )
191194 l(" $fsdbDumpfile({traceFilePath,\" .fsdb\" });" )
192195 l(" $fsdbDumpvars(0, " , dut.instanceName," );" )
196+ l(" traceSupported = 1;" )
193197 l(" `endif" )
194198 l(" endfunction" )
195199 l(" export \" DPI-C\" function simulation_enableTrace;" )
196200 l(" function void simulation_enableTrace;" )
201+ l(" output int success;" )
202+ l(" success = traceSupported;" )
197203 l(" `ifdef SVSIM_ENABLE_VCD_TRACING_SUPPORT" )
198204 l(" $dumpon;" )
199205 l(" `elsif SVSIM_ENABLE_VPD_TRACING_SUPPORT" )
@@ -205,6 +211,8 @@ final class Workspace(
205211 l(" endfunction" )
206212 l(" export \" DPI-C\" function simulation_disableTrace;" )
207213 l(" function void simulation_disableTrace;" )
214+ l(" output int success;" )
215+ l(" success = traceSupported;" )
208216 l(" `ifdef SVSIM_ENABLE_VCD_TRACING_SUPPORT" )
209217 l(" $dumpoff;" )
210218 l(" `elsif SVSIM_ENABLE_VPD_TRACING_SUPPORT" )
0 commit comments