It complains that
sv2v: test.sv:14:51: Parse error: declaration missing type information
CallStack (from HasCallStack):
error, called at src/Language/SystemVerilog/Parser/ParseDecl.hs:599:26 in main:Language.SystemVerilog.Parser.ParseDecl
function automatic signed [2:0] p4vs(input en,err,[1:0]d);
reg signed [2:0] sym;
begin
case(d[1:0])
2'b00: sym = 3'b101;
default: sym = 3'b111;
endcase // case (d[1:0])
if(!en) p4vs = 3'd0;
else p4vs = err? sym : -sym;
end
endfunction
It complains that sv2v: test.sv:14:51: Parse error: declaration missing type information CallStack (from HasCallStack): error, called at src/Language/SystemVerilog/Parser/ParseDecl.hs:599:26 in main:Language.SystemVerilog.Parser.ParseDecl
function automatic signed [2:0] p4vs(input en,err,[1:0]d); reg signed [2:0] sym; begin case(d[1:0]) 2'b00: sym = 3'b101; default: sym = 3'b111; endcase // case (d[1:0]) if(!en) p4vs = 3'd0; else p4vs = err? sym : -sym; end endfunction