I'm using Questasim 10.4c to simulate a Systemverilog design that uses the `ifdef compiler directive at a bunch of places. Example:
`ifdef FOR_SIMULATION_ONLY
<code>
`endif
After compiling, I haven't found any way to get Questasim to be able to tell me explicitly whether FOR_SIMULATION_ONLY has been defined, though. I've dug through the user guide and command reference manual and the closest thing I've found is putting a -E option in all my vlog compile statements and then examining the files created to see if FOR_SIMULATION_ONLY is defined. Can Questasim tell me, though, whether it's been defined without having to use the vlog -E method?
There is no switch to do that. You can put in
`ifdef FOR_SIMULATION_ONLY
$info("FOR_SIMULATION_ONLY defined");
`endif
and get a message at elaboration time.