我在写SystemVerilog代码,我发现$ sformat是一个系统任务,而不是一个函数。 有没有相当于$ sformat的函数?
我想要做一个函数内的以下内容:
assert(my_dto_h.a == 10) else begin
`ovm_error("component", $sformat("my_dto_h.a should be 10, not %0d", my_dto_h.a))
end
不幸的是,我从QuestaSim 10.2获得以下运行时错误:
** Error: (vsim-PLI-3029) component.sv(105): Expected a system function, not system task '$sformat'.