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 void ChdrPacket::write_raw (
    ref chdr_header_t      header,
    ref chdr_word_t        data[$],
    input chdr_word_t      metadata[$] = {},
    input chdr_timestamp_t timestamp = 0,
    input int              data_byte_length = -1
  );
    this.header    = header;
    this.timestamp = timestamp;
    this.data      = data;
    this.metadata  = metadata;
    update_lengths();


    if (data_byte_length >= 0) begin
      int array_num_bytes;


      assert((data_byte_length+(BYTES_PER_CHDR_W-1)) / BYTES_PER_CHDR_W == data.size()) else begin
        $error("ChdrPacket::write_raw: data_byte_length doesn't correspond to number of words in data");
      end

      array_num_bytes = data.size() * BYTES_PER_CHDR_W;
      this.header.length -= (array_num_bytes - data_byte_length);
    end
  endfunction
function void ChdrPacket::write_raw (
    ref chdr_header_t      header,
    ref chdr_word_t        data[$],
    input chdr_word_t      metadata[$] = {},
    input chdr_timestamp_t timestamp = 0,
    input int              data_byte_length = -1
  );

    this.header    = header;
    this.timestamp = timestamp;
    this.data      = data;
    this.metadata  = metadata;
    update_lengths();


    if (data_byte_length >= 0) begin
      int array_num_bytes;


      assert((data_byte_length+(BYTES_PER_CHDR_W-1)) / BYTES_PER_CHDR_W == data.size()) else begin
        $error("ChdrPacket::write_raw: data_byte_length doesn't correspond to number of words in data");
      end

      array_num_bytes = data.size() * BYTES_PER_CHDR_W;
      this.header.length -= (array_num_bytes - data_byte_length);
    end
  endfunction