// Synthesizable, zero-delay generic circuit. Segment order: { g, f, e, d, c, b, a }.

module basic_sipo
(
    input              clk,
    input              rst,
    input              serial,
    output logic [3:0] q
);

    always_ff @ (posedge clk or posedge rst)
        if (rst)
            q <= '0;
        else
            q <= { q [2:0], serial };

endmodule
