data/full_repos/permissive/136197078/hardware/ip/nt_packet_counter/hdl/nt_packet_counter.v
data/verilator_xmls/ee360f74-ea7d-43fc-8338-bf6cdf7065a3.xml
module nt_packet_counter (

  input wire clk,
  input wire rstn,
  input wire rst_sw,


  input wire axis_tvalid,
  input wire axis_tready,
  input wire axis_tlast,

  output reg [31:0]    cntr_o
);

  always @(posedge clk) begin
    if (~rstn | rst_sw) begin
      cntr_o <= 32'b0;
    end else begin
      if (axis_tvalid & axis_tready & axis_tlast) begin

        cntr_o <= cntr_o + 1;
      end else begin
        cntr_o <= cntr_o;
      end
    end
  end

endmodule
module nt_packet_counter (

  input wire clk,
  input wire rstn,
  input wire rst_sw,


  input wire axis_tvalid,
  input wire axis_tready,
  input wire axis_tlast,

  output reg [31:0]    cntr_o
);


  always @(posedge clk) begin
    if (~rstn | rst_sw) begin
      cntr_o <= 32'b0;
    end else begin
      if (axis_tvalid & axis_tready & axis_tlast) begin

        cntr_o <= cntr_o + 1;
      end else begin
        cntr_o <= cntr_o;
      end
    end
  end

endmodule