Hello, I encountered a problem when reading a Syst...
# openlane
Hello, I encountered a problem when reading a Systemverilog package with Yosys. Error message is as shown below:
Copy code
2. Executing Verilog-2005 frontend: ./designs/src/opentitan_soc/ip/prim/rtl/prim_util_pkg.sv
./designs/src/opentitan_soc/ip/prim/rtl/prim_util_pkg.sv:28: ERROR: syntax error, unexpected TOK_FUNCTION
And the part of the code it is complaining about looks like: (line 28 is the 
function automatic...
Copy code
function automatic integer _clog2(integer value);
    integer result;
    integer v = value;
    v = v - 1;
    for (result = 0; v > 0; result++) begin
      v = v >> 1;
    return result;
Is it because Yosys has yet to support Systemverilog functions in packages?
I saw that there is a recent PR for that http://phoenix.yizimg.com/YosysHQ/yosys/pull/2801 Thanks
Hi Everyone, is anyone able to synthesize systemVerilog using the latest of Yosys? Either way, what do you guys do and which sv2v tool work for you? @User @User @User
@Ke-Haur Taur make sure this package is not declare in a generate block of verilog.
@Zeeshan Rafique No that function is not in a generate block And it is not imported in a generate block either. The error was thrown before Yosys got to the files where it actually used the package. Yosys stopped parsing that package due to the
construct which is only supported by the latest build I think
Is it independent of any block?
@Peijun Hou