// VLSI Hub authored example, CC0-1.0.
module counter4(input logic clk, rst, output logic [3:0] count);
  always_ff @(posedge clk) begin
    if (rst) count <= 4'b0;
    else count <= count + 1'b1;
  end
endmodule
