data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v
 line:144: before: ")"
1: b"%Error: data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v:62: Define or directive not defined: '`OPENFLOW_ACTION_WIDTH'\n    output [`OPENFLOW_ACTION_WIDTH-1:0]    wildcard_data,\n            ^~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v:68: Define or directive not defined: '`PRIO_WIDTH'\n    input [`PRIO_WIDTH -1:0] tcam_addr,\n           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v:77: Define or directive not defined: '`PRIO_WIDTH'\n    input [`PRIO_WIDTH-1:0]bram_addr,\n           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v:98: Define or directive not defined: '`LOG2_FUNC'\n   `LOG2_FUNC\n   ^~~~~~~~~~\n%Error: data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v:99: Define or directive not defined: '`CEILDIV_FUNC'\n   `CEILDIV_FUNC\n   ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/121277233/ons20-app52-ref_ofshw/vivado/onets_7020_4x_ref_ofshw/ip/packet_pipeline_v1_0/src/user_data_path/wildcard_match.v:144: Define or directive not defined: '`OPENFLOW_ACTION_WIDTH'\n       .DATA_WIDTH         (`OPENFLOW_ACTION_WIDTH),\n                            ^~~~~~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 6 error(s)\n"
module wildcard_match
    #(parameter NUM_OUTPUT_QUEUES = 8,
      parameter PKT_SIZE_WIDTH = 12,
      parameter OPENFLOW_ENTRY_WIDTH = 64,
      parameter OPENFLOW_WILDCARD_TABLE_SIZE = 16,
      parameter CURRENT_TABLE_ID = 0,
      parameter OPENFLOW_WILDCARD_TABLE_DEPTH = 4,
      parameter CMP_WIDTH = 64
      )
   (
    input [OPENFLOW_ENTRY_WIDTH-1:0]       flow_entry,
    input                                  flow_entry_vld,
    input [PKT_SIZE_WIDTH-1:0]             pkt_size,
    output                                 wildcard_match_rdy,



    output                                 wildcard_hit,

    output [`OPENFLOW_ACTION_WIDTH-1:0]    wildcard_data,

    output                                 wildcard_data_vld,


    
    input [`PRIO_WIDTH -1:0] tcam_addr,
    output  [CMP_WIDTH-1:0] tcam_data_out,
    output  [CMP_WIDTH-33:0] tcam_data_mask_out,
    input tcam_we,
    input [CMP_WIDTH-1:0] tcam_data_in,
    input [CMP_WIDTH-33:0] tcam_data_mask_in,
    
    input bram_cs,
    input bram_we,
    input [`PRIO_WIDTH-1:0]bram_addr,
    input [319:0]lut_actions_in,  
    output [319:0]lut_actions_out,
    
    input [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0] counter_addr_in,
    input counter_addr_rd,
    output [31:0]pkt_counter_out,
    output [31:0]byte_counter_out,
   
   input                            skip_lookup,





    input [31:0]                           openflow_timer,
    input                                  reset,
    input                                  clk,
    output [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0]            wildcard_address
   );

   `LOG2_FUNC
   `CEILDIV_FUNC



   localparam METADATA_WIDTH = OPENFLOW_WILDCARD_TABLE_DEPTH;

   localparam SIMULATION = 0

	      || 1

	      ;

    

   wire                                                      cam_busy;
   wire                                                      cam_match;
   wire [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0]                  cam_match_addr;

   wire [OPENFLOW_ENTRY_WIDTH-1:0]                           cam_din;





   wire [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0]                                 dout_wildcard_address;

   reg [OPENFLOW_WILDCARD_TABLE_SIZE-1:0]                    wildcard_hit_address_decoded;
   wire [OPENFLOW_WILDCARD_TABLE_SIZE*PKT_SIZE_WIDTH - 1:0]  wildcard_hit_address_decoded_expanded;
   wire [OPENFLOW_WILDCARD_TABLE_SIZE*PKT_SIZE_WIDTH - 1:0]  wildcard_entry_hit_byte_size;
   wire [OPENFLOW_WILDCARD_TABLE_SIZE*32 - 1:0]              wildcard_entry_last_seen_timestamps;

   wire [PKT_SIZE_WIDTH-1:0]                                 dout_pkt_size;

   reg [PKT_SIZE_WIDTH-1:0]                                  wildcard_entry_hit_byte_size_word [OPENFLOW_WILDCARD_TABLE_SIZE-1:0];
   reg [31:0]                                                wildcard_entry_last_seen_timestamps_words[OPENFLOW_WILDCARD_TABLE_SIZE-1:0];

   integer                                                   i;
   wire [2 * OPENFLOW_WILDCARD_TABLE_SIZE * OPENFLOW_ENTRY_WIDTH - 1 :0]  lut_linear;
   
   wire [OPENFLOW_ENTRY_WIDTH-1:0]cam_cmp_din;

   assign wildcard_match_rdy = 1;

   wildcard_lut_action
     #(.CMP_WIDTH (OPENFLOW_ENTRY_WIDTH),
       .DATA_WIDTH         (`OPENFLOW_ACTION_WIDTH),
       .LUT_DEPTH          (OPENFLOW_WILDCARD_TABLE_SIZE),
       .LUT_DEPTH_BITS     (OPENFLOW_WILDCARD_TABLE_DEPTH),
       .CURRENT_TABLE_ID   (CURRENT_TABLE_ID)
       )wildcard_lut_action
         (
          .lookup_req          (flow_entry_vld),
          .lookup_cmp_data     (flow_entry),

          .lookup_ack          (wildcard_data_vld),
          .lookup_hit          (wildcard_hit),
          .lookup_data         (wildcard_data),
          .lookup_address      (wildcard_address),


          .bram_cs                               (bram_cs        ),
          .bram_we                               (bram_we        ),
          .bram_addr                             (bram_addr      ),
          .lut_actions_in                        (lut_actions_in ),
          .lut_actions_out                       (lut_actions_out),


          .cam_busy            (cam_busy),
          .cam_match           (cam_match),
          .cam_match_addr      (cam_match_addr),
          .cam_cmp_din         (cam_cmp_din),



          .table_flush         (0),


          .reset               (reset),
          .clk                 (clk),
          
          .skip_lookup          (skip_lookup)
          );

   wildcard_tcam 
   #(
      .CMP_WIDTH (OPENFLOW_ENTRY_WIDTH),
      .DEPTH (OPENFLOW_WILDCARD_TABLE_SIZE),
      .DEPTH_BITS (OPENFLOW_WILDCARD_TABLE_DEPTH),
      .ENCODE (0),
      .CURRENT_TABLE_ID(CURRENT_TABLE_ID)
   ) wildcard_tcam
   (

      .busy                             (cam_busy),
      .match                            (cam_match),
      .match_addr                       (cam_match_addr),

      .clk                              (clk),
      .reset                            (reset),
      .cmp_din                          (cam_cmp_din),
      .cmp_req                          (flow_entry_vld),

      .we                               (tcam_we),
      .tcam_addr                        (tcam_addr),
      .tcam_data_in                     (tcam_data_in),
      .tcam_data_mask_in                (tcam_data_mask_in),
      .tcam_data_out                    (tcam_data_out ),
      .tcam_data_mask_out               (tcam_data_mask_out)
   );

   small_fifo
     #(.WIDTH(PKT_SIZE_WIDTH),
       .MAX_DEPTH_BITS(3))
      pkt_size_fifo
        (.din           (pkt_size),
         .wr_en         (flow_entry_vld),
         .rd_en         (fifo_rd_en),
         .dout          (dout_pkt_size),
         .full          (),
         .prog_full     (),
         .nearly_full   (),
         .empty         (pkt_size_fifo_empty),
         .reset         (reset),
         .clk           (clk)
         );

    wildcard_counter
    #(.ADDR_WIDTH(OPENFLOW_WILDCARD_TABLE_DEPTH),
      .PKT_WIDTH(PKT_SIZE_WIDTH),
      .LUT_DEPTH(OPENFLOW_WILDCARD_TABLE_SIZE),
      .DEPTH_BITS (OPENFLOW_WILDCARD_TABLE_DEPTH)
      )
     wildcard_counter
    (
      .clk                    (clk),
      .reset                    (reset),
      .fifo_rd_en             (fifo_rd_en),
      .dout_pkt_size          (dout_pkt_size),
      .wildcard_data_vld          (wildcard_data_vld),
      .wildcard_hit          (wildcard_hit),
      .wildcard_address      (wildcard_address),
      .counter_addr_in (counter_addr_in),
      .counter_addr_rd  (counter_addr_rd),
      .pkt_counter_out   (pkt_counter_out),
      .byte_counter_out  (byte_counter_out)
      
    );

         
         












endmodule
module wildcard_match
    #(parameter NUM_OUTPUT_QUEUES = 8,
      parameter PKT_SIZE_WIDTH = 12,
      parameter OPENFLOW_ENTRY_WIDTH = 64,
      parameter OPENFLOW_WILDCARD_TABLE_SIZE = 16,
      parameter CURRENT_TABLE_ID = 0,
      parameter OPENFLOW_WILDCARD_TABLE_DEPTH = 4,
      parameter CMP_WIDTH = 64
      )
   (
    input [OPENFLOW_ENTRY_WIDTH-1:0]       flow_entry,
    input                                  flow_entry_vld,
    input [PKT_SIZE_WIDTH-1:0]             pkt_size,
    output                                 wildcard_match_rdy,



    output                                 wildcard_hit,

    output [`OPENFLOW_ACTION_WIDTH-1:0]    wildcard_data,

    output                                 wildcard_data_vld,


    
    input [`PRIO_WIDTH -1:0] tcam_addr,
    output  [CMP_WIDTH-1:0] tcam_data_out,
    output  [CMP_WIDTH-33:0] tcam_data_mask_out,
    input tcam_we,
    input [CMP_WIDTH-1:0] tcam_data_in,
    input [CMP_WIDTH-33:0] tcam_data_mask_in,
    
    input bram_cs,
    input bram_we,
    input [`PRIO_WIDTH-1:0]bram_addr,
    input [319:0]lut_actions_in,  
    output [319:0]lut_actions_out,
    
    input [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0] counter_addr_in,
    input counter_addr_rd,
    output [31:0]pkt_counter_out,
    output [31:0]byte_counter_out,
   
   input                            skip_lookup,





    input [31:0]                           openflow_timer,
    input                                  reset,
    input                                  clk,
    output [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0]            wildcard_address
   );


   `LOG2_FUNC
   `CEILDIV_FUNC



   localparam METADATA_WIDTH = OPENFLOW_WILDCARD_TABLE_DEPTH;

   localparam SIMULATION = 0

	      || 1

	      ;

    

   wire                                                      cam_busy;
   wire                                                      cam_match;
   wire [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0]                  cam_match_addr;

   wire [OPENFLOW_ENTRY_WIDTH-1:0]                           cam_din;





   wire [OPENFLOW_WILDCARD_TABLE_DEPTH-1:0]                                 dout_wildcard_address;

   reg [OPENFLOW_WILDCARD_TABLE_SIZE-1:0]                    wildcard_hit_address_decoded;
   wire [OPENFLOW_WILDCARD_TABLE_SIZE*PKT_SIZE_WIDTH - 1:0]  wildcard_hit_address_decoded_expanded;
   wire [OPENFLOW_WILDCARD_TABLE_SIZE*PKT_SIZE_WIDTH - 1:0]  wildcard_entry_hit_byte_size;
   wire [OPENFLOW_WILDCARD_TABLE_SIZE*32 - 1:0]              wildcard_entry_last_seen_timestamps;

   wire [PKT_SIZE_WIDTH-1:0]                                 dout_pkt_size;

   reg [PKT_SIZE_WIDTH-1:0]                                  wildcard_entry_hit_byte_size_word [OPENFLOW_WILDCARD_TABLE_SIZE-1:0];
   reg [31:0]                                                wildcard_entry_last_seen_timestamps_words[OPENFLOW_WILDCARD_TABLE_SIZE-1:0];

   integer                                                   i;
   wire [2 * OPENFLOW_WILDCARD_TABLE_SIZE * OPENFLOW_ENTRY_WIDTH - 1 :0]  lut_linear;
   
   wire [OPENFLOW_ENTRY_WIDTH-1:0]cam_cmp_din;

   assign wildcard_match_rdy = 1;

   wildcard_lut_action
     #(.CMP_WIDTH (OPENFLOW_ENTRY_WIDTH),
       .DATA_WIDTH         (`OPENFLOW_ACTION_WIDTH),
       .LUT_DEPTH          (OPENFLOW_WILDCARD_TABLE_SIZE),
       .LUT_DEPTH_BITS     (OPENFLOW_WILDCARD_TABLE_DEPTH),
       .CURRENT_TABLE_ID   (CURRENT_TABLE_ID)
       )wildcard_lut_action
         (
          .lookup_req          (flow_entry_vld),
          .lookup_cmp_data     (flow_entry),

          .lookup_ack          (wildcard_data_vld),
          .lookup_hit          (wildcard_hit),
          .lookup_data         (wildcard_data),
          .lookup_address      (wildcard_address),


          .bram_cs                               (bram_cs        ),
          .bram_we                               (bram_we        ),
          .bram_addr                             (bram_addr      ),
          .lut_actions_in                        (lut_actions_in ),
          .lut_actions_out                       (lut_actions_out),


          .cam_busy            (cam_busy),
          .cam_match           (cam_match),
          .cam_match_addr      (cam_match_addr),
          .cam_cmp_din         (cam_cmp_din),



          .table_flush         (0),


          .reset               (reset),
          .clk                 (clk),
          
          .skip_lookup          (skip_lookup)
          );

   wildcard_tcam 
   #(
      .CMP_WIDTH (OPENFLOW_ENTRY_WIDTH),
      .DEPTH (OPENFLOW_WILDCARD_TABLE_SIZE),
      .DEPTH_BITS (OPENFLOW_WILDCARD_TABLE_DEPTH),
      .ENCODE (0),
      .CURRENT_TABLE_ID(CURRENT_TABLE_ID)
   ) wildcard_tcam
   (

      .busy                             (cam_busy),
      .match                            (cam_match),
      .match_addr                       (cam_match_addr),

      .clk                              (clk),
      .reset                            (reset),
      .cmp_din                          (cam_cmp_din),
      .cmp_req                          (flow_entry_vld),

      .we                               (tcam_we),
      .tcam_addr                        (tcam_addr),
      .tcam_data_in                     (tcam_data_in),
      .tcam_data_mask_in                (tcam_data_mask_in),
      .tcam_data_out                    (tcam_data_out ),
      .tcam_data_mask_out               (tcam_data_mask_out)
   );

   small_fifo
     #(.WIDTH(PKT_SIZE_WIDTH),
       .MAX_DEPTH_BITS(3))
      pkt_size_fifo
        (.din           (pkt_size),
         .wr_en         (flow_entry_vld),
         .rd_en         (fifo_rd_en),
         .dout          (dout_pkt_size),
         .full          (),
         .prog_full     (),
         .nearly_full   (),
         .empty         (pkt_size_fifo_empty),
         .reset         (reset),
         .clk           (clk)
         );

    wildcard_counter
    #(.ADDR_WIDTH(OPENFLOW_WILDCARD_TABLE_DEPTH),
      .PKT_WIDTH(PKT_SIZE_WIDTH),
      .LUT_DEPTH(OPENFLOW_WILDCARD_TABLE_SIZE),
      .DEPTH_BITS (OPENFLOW_WILDCARD_TABLE_DEPTH)
      )
     wildcard_counter
    (
      .clk                    (clk),
      .reset                    (reset),
      .fifo_rd_en             (fifo_rd_en),
      .dout_pkt_size          (dout_pkt_size),
      .wildcard_data_vld          (wildcard_data_vld),
      .wildcard_hit          (wildcard_hit),
      .wildcard_address      (wildcard_address),
      .counter_addr_in (counter_addr_in),
      .counter_addr_rd  (counter_addr_rd),
      .pkt_counter_out   (pkt_counter_out),
      .byte_counter_out  (byte_counter_out)
      
    );

         
         












endmodule