data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv
 line:13: before: "package"
1: b"%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:15: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING\n  import PkgChdrUtils::*;\n         ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:23: Unsupported: classes\n  class ChdrPacket #(parameter int CHDR_W = 64,\n  ^~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:26: Unsupported: Parameter classes\n    typedef ChdrPacket #(CHDR_W,USER_WIDTH)       ChdrPacket_t;\n                         ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:27: syntax error, unexpected '#', expecting '.' or ';'\n    typedef AxiStreamPacket #(CHDR_W, USER_WIDTH) AxisPacket_t;\n                            ^\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:28: syntax error, unexpected '#', expecting '.' or ';'\n    typedef ChdrData   #(CHDR_W)::chdr_word_t chdr_word_t;\n                       ^\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:29: syntax error, unexpected ::, expecting '.' or ';'\n    typedef AxisPacket_t::data_t data_t;\n                        ^~\n                                                                                                                      : ... Perhaps 'AxisPacket_t' is a package which needs to be predeclared? (IEEE 1800-2017 26.3)\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:31: Unsupported: const class member qualifier\n    const int BYTES_PER_CHDR_W = CHDR_W / 8;\n    ^~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:33: syntax error, unexpected IDENTIFIER\n    chdr_header_t    header;\n    ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:40: Unsupported: extern class method prototype\n    extern function ChdrPacket_t copy();\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:41: Unsupported: extern class method prototype\n    extern function bit          equal(ChdrPacket_t packet);\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:42: Unsupported: extern class method prototype\n    extern function string       sprint(bit pretty = 1);\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:43: Unsupported: extern class method prototype\n    extern function void         print(bit pretty = 1);\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:46: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void write_raw          (ref chdr_header_t         header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:51: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void read_raw           (output chdr_header_t      header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:56: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void write_stream_status(ref chdr_header_t         header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:58: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void read_stream_status (output chdr_header_t      header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:60: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void write_stream_cmd   (ref chdr_header_t         header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:62: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void read_stream_cmd    (output chdr_header_t      header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:64: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void write_mgmt         (ref chdr_header_t         header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:66: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void read_mgmt          (output chdr_header_t      header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:68: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void write_ctrl         (ref chdr_header_t         header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:73: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void read_ctrl          (output chdr_header_t      header,\n                                                                       ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:80: Unsupported: extern class method prototype\n    extern function int  header_bytes();\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:81: Unsupported: extern class method prototype\n    extern function int  mdata_bytes();\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:82: Unsupported: extern class method prototype\n    extern function int  data_bytes();\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:83: Unsupported: extern class method prototype\n    extern function void update_lengths(int payload_bytes = 0);\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:85: Unsupported: extern class method prototype\n    extern function string sprint_raw();\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:86: Unsupported: extern class method prototype\n    extern function string sprint_pretty();\n    ^~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:88: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function bit chdr_word_queues_equal(ref chdr_word_t a[$], \n                                                               ^\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:93: syntax error, unexpected IDENTIFIER, expecting ')'\n    extern function void         axis_to_chdr (AxisPacket_t axis_packet);\n                                                            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:94: syntax error, unexpected IDENTIFIER, expecting ';'\n    extern function AxisPacket_t chdr_to_axis ();\n                                 ^~~~~~~~~~~~\n%Error: Internal Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/rfnoc/PkgChdrBfm.sv:23: ../V3ParseSym.h:114: Symbols suggest ending TASK 'axis_to_chdr' but parser thinks ending CLASS 'ChdrPacket'\n  class ChdrPacket #(parameter int CHDR_W = 64,\n  ^~~~~\n"
function string ChdrPacket::sprint_pretty();
    string str;
    str = {str, $sformatf("ChdrPacket:\n")};
    str = {str, $sformatf("- header: %p\n", header) };
    if (header.pkt_type == CHDR_DATA_WITH_TS) begin
      str = {str, $sformatf("- timestamp: %0d\n", timestamp) };
    end
    if (header.num_mdata != '0) begin
      str = {str, $sformatf("- metadata:\n") };
      foreach (metadata[i]) begin
        str = {str, $sformatf("%5d> %X\n", i, metadata[i]) };
      end
    end
    str = {str, $sformatf("- data (%s):\n", header.pkt_type.name) };
    if (header.pkt_type == CHDR_MANAGEMENT) begin
      chdr_header_t tmp_hdr;
      chdr_mgmt_t tmp_mgmt;
      read_mgmt(tmp_hdr, tmp_mgmt);
      str = {str, $sformatf("  > chdr_mgmt_header_t : %p\n", tmp_mgmt.header)};
      foreach (tmp_mgmt.ops[i]) begin
        str = {str, $sformatf("  > %3d: chdr_mgmt_op_t: '{op_payload:0x%12x,op_code:%s,ops_pending:%0d}\n",
          i, tmp_mgmt.ops[i].op_payload, tmp_mgmt.ops[i].op_code.name, tmp_mgmt.ops[i].ops_pending)};
      end
    end else if (header.pkt_type == CHDR_STRM_STATUS) begin
      chdr_header_t tmp_hdr;
      chdr_str_status_t tmp_sts;
      read_stream_status(tmp_hdr, tmp_sts);
      str = {str, $sformatf("  > chdr_str_status_t0 : '{status_info:0x%012x,buff_info:0x%04x,xfer_count_bytes:%0d,xfer_count_pkts:%0d...\n",
        tmp_sts.status_info,tmp_sts.buff_info,tmp_sts.xfer_count_bytes,tmp_sts.xfer_count_pkts)};
      str = {str, $sformatf("  > chdr_str_status_t1 :   capacity_pkts:%0d,capacity_bytes:%0d,status:%s,src_epid:%0d}\n",
        tmp_sts.capacity_pkts,tmp_sts.capacity_bytes,tmp_sts.status.name,tmp_sts.src_epid)};
    end else if (header.pkt_type == CHDR_STRM_CMD) begin
      chdr_header_t tmp_hdr;
      chdr_str_command_t tmp_cmd;
      read_stream_cmd(tmp_hdr, tmp_cmd);
      str = {str, $sformatf("  > chdr_str_command_t : %p\n", tmp_cmd)};
    end else if (header.pkt_type == CHDR_CONTROL) begin
      chdr_header_t tmp_hdr;
      chdr_timestamp_t tmp_ts;
      chdr_ctrl_header_t tmp_ctrl_hdr;
      ctrl_op_word_t tmp_op_word;
      ctrl_word_t tmp_ctrl_data[$];
      read_ctrl(tmp_hdr, tmp_ctrl_hdr, tmp_op_word, tmp_ctrl_data, tmp_ts);
      str = {str, $sformatf("  > chdr_ctrl_header_t : %p\n", tmp_ctrl_hdr)};
      if (tmp_ctrl_hdr.has_time)
        str = {str, $sformatf("  > timestamp          : %0d\n", tmp_ts)};
      str = {str, $sformatf("  > ctrl_op_word_t     : '{status:%s,op_code:%s,byte_enable:0b%4b,address:0x%05x}\n",
        tmp_op_word.status.name, tmp_op_word.op_code.name, tmp_op_word.byte_enable, tmp_op_word.address)};
      foreach (tmp_ctrl_data[i]) begin
        str = {str, $sformatf("  > data %2d            : 0x%08x\n", i, tmp_ctrl_data[i])};
      end
    end else begin
      foreach (data[i]) begin
        str = {str, $sformatf("%5d> %X\n", i, data[i]) };
      end
    end
    return str;
  endfunction
function string ChdrPacket::sprint_pretty();

    string str;
    str = {str, $sformatf("ChdrPacket:\n")};
    str = {str, $sformatf("- header: %p\n", header) };
    if (header.pkt_type == CHDR_DATA_WITH_TS) begin
      str = {str, $sformatf("- timestamp: %0d\n", timestamp) };
    end
    if (header.num_mdata != '0) begin
      str = {str, $sformatf("- metadata:\n") };
      foreach (metadata[i]) begin
        str = {str, $sformatf("%5d> %X\n", i, metadata[i]) };
      end
    end
    str = {str, $sformatf("- data (%s):\n", header.pkt_type.name) };
    if (header.pkt_type == CHDR_MANAGEMENT) begin
      chdr_header_t tmp_hdr;
      chdr_mgmt_t tmp_mgmt;
      read_mgmt(tmp_hdr, tmp_mgmt);
      str = {str, $sformatf("  > chdr_mgmt_header_t : %p\n", tmp_mgmt.header)};
      foreach (tmp_mgmt.ops[i]) begin
        str = {str, $sformatf("  > %3d: chdr_mgmt_op_t: '{op_payload:0x%12x,op_code:%s,ops_pending:%0d}\n",
          i, tmp_mgmt.ops[i].op_payload, tmp_mgmt.ops[i].op_code.name, tmp_mgmt.ops[i].ops_pending)};
      end
    end else if (header.pkt_type == CHDR_STRM_STATUS) begin
      chdr_header_t tmp_hdr;
      chdr_str_status_t tmp_sts;
      read_stream_status(tmp_hdr, tmp_sts);
      str = {str, $sformatf("  > chdr_str_status_t0 : '{status_info:0x%012x,buff_info:0x%04x,xfer_count_bytes:%0d,xfer_count_pkts:%0d...\n",
        tmp_sts.status_info,tmp_sts.buff_info,tmp_sts.xfer_count_bytes,tmp_sts.xfer_count_pkts)};
      str = {str, $sformatf("  > chdr_str_status_t1 :   capacity_pkts:%0d,capacity_bytes:%0d,status:%s,src_epid:%0d}\n",
        tmp_sts.capacity_pkts,tmp_sts.capacity_bytes,tmp_sts.status.name,tmp_sts.src_epid)};
    end else if (header.pkt_type == CHDR_STRM_CMD) begin
      chdr_header_t tmp_hdr;
      chdr_str_command_t tmp_cmd;
      read_stream_cmd(tmp_hdr, tmp_cmd);
      str = {str, $sformatf("  > chdr_str_command_t : %p\n", tmp_cmd)};
    end else if (header.pkt_type == CHDR_CONTROL) begin
      chdr_header_t tmp_hdr;
      chdr_timestamp_t tmp_ts;
      chdr_ctrl_header_t tmp_ctrl_hdr;
      ctrl_op_word_t tmp_op_word;
      ctrl_word_t tmp_ctrl_data[$];
      read_ctrl(tmp_hdr, tmp_ctrl_hdr, tmp_op_word, tmp_ctrl_data, tmp_ts);
      str = {str, $sformatf("  > chdr_ctrl_header_t : %p\n", tmp_ctrl_hdr)};
      if (tmp_ctrl_hdr.has_time)
        str = {str, $sformatf("  > timestamp          : %0d\n", tmp_ts)};
      str = {str, $sformatf("  > ctrl_op_word_t     : '{status:%s,op_code:%s,byte_enable:0b%4b,address:0x%05x}\n",
        tmp_op_word.status.name, tmp_op_word.op_code.name, tmp_op_word.byte_enable, tmp_op_word.address)};
      foreach (tmp_ctrl_data[i]) begin
        str = {str, $sformatf("  > data %2d            : 0x%08x\n", i, tmp_ctrl_data[i])};
      end
    end else begin
      foreach (data[i]) begin
        str = {str, $sformatf("%5d> %X\n", i, data[i]) };
      end
    end
    return str;
  endfunction