There are many references to $psprintf on this forum and two references in the OVM Reference Guide, even though the SystemVerilog committee rejected the standardization of $psprintf since the language already had $sformatf. A quick search shows that both are used two times each in the reference guide.
Has $psprintf become a defacto standard command in all of the simulators?
Is it treated exactly the same as $sformatf?
Regards - Cliff Cummings
Verilog & SystemVerilog Guru
Sunburst Design
The reality is that once a simulator vendor implements a feature, it’s almost impossible to get them to remove it, regardless of what happens in the IEEE standard committee. The only time I see a feature removed is when you can prove that the existence of a feature causes problems for the user (e.g. conflicts with proper implementation of that feature, like generate). Apparently, having code that is not portable is not a problem for some users.
Why is the output different for both of these prints? I could roughly give a guess for what could be happening with the sformatf - (might be printing integer values of the string it generated) it would be better if someone could give a concrete explanation for me.
Also, simulator throws something like below. Am I missing some point for the sformatf ??
Warning-[STASKW_SFRTMATR] More arguments than required
testbench.sv, 12
Number of arguments (9) passed to place in the format string are more than
the number of format specifiers (1).
As was discussed in the previous replies in this thread, $psprintf is not in the SystemVerilog LRM. Implementation may differ between simulators and it may not even be supported in some simulators.
Per the LRM, $sformat has the following signature: