← ProblemsCircuits / Sequential Logic / Latches and Flip-Flops
Mux and DFF
36%flip-flopsmuxproceduresImplement one stage of a loadable shift register: a 2-to-1 multiplexer feeding a D flip-flop.
At every rising edge of clk, the flip-flop captures the mux output:
- If
L(load) is 1, the mux selectsr_in. - If
Lis 0, the mux selectsq_in.
So: Q <= L ? r_in : q_in.