The SystemVerilog 2012 standard also got into this problem and looked at it, but did not notice the mention of subscription in the section on format specifiers. An alternative (mostly equivalent) solution is also used here:
$display("acc : %d", $signed(acc))
The $ signed function converts the input value to a signed type with the same bit width.
source share