data/full_repos/permissive/42434302/ivltests/sv_cast_string.v
1: b'%Error: data/full_repos/permissive/42434302/ivltests/sv_cast_string.v:33: Unsupported or unknown PLI call: $ivl_string_method$to_vec\n    $ivl_string_method$to_vec(str, chars);\n    ^~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/42434302/ivltests/sv_cast_string.v:51: syntax error, unexpected "\'", expecting "\'{"\n    str = string\'(chars);\n                ^\n%Error: Exiting due to 2 error(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module sv_cast_string();
   string str;
   typedef logic [55:0] strbits;
   strbits chars;

 initial begin
    int i;
    str = "0123456";
    chars = strbits'(str);


    $ivl_string_method$to_vec(str, chars);
    if(chars != 56'h30313233343536)
    begin
        $display("FAILED 1 chars = %x", chars);
        $finish();
    end


    str = "6543210";
    chars = strbits'(str);
    if(chars != "6543210")
    begin
        $display("FAILED 2 chars = %x", chars);
        $finish();
    end

    str = "wrong string";

    str = string'(chars);
    if(str != "6543210")
    begin
        $display("FAILED 3 str = %x", str);
        $finish();
    end

    $display("PASSED");
end
endmodule
module sv_cast_string();

   string str;
   typedef logic [55:0] strbits;
   strbits chars;

 initial begin
    int i;
    str = "0123456";
    chars = strbits'(str);


    $ivl_string_method$to_vec(str, chars);
    if(chars != 56'h30313233343536)
    begin
        $display("FAILED 1 chars = %x", chars);
        $finish();
    end


    str = "6543210";
    chars = strbits'(str);
    if(chars != "6543210")
    begin
        $display("FAILED 2 chars = %x", chars);
        $finish();
    end

    str = "wrong string";

    str = string'(chars);
    if(str != "6543210")
    begin
        $display("FAILED 3 str = %x", str);
        $finish();
    end

    $display("PASSED");
end
endmodule