// Synthesizable generic design.

module register_file
(
    input              clk,
    input              we,
    input        [1:0] wa,
    input        [1:0] ra,
    input        [1:0] rb,
    input        [3:0] data,
    output       [3:0] qa,
    output       [3:0] qb
);

    logic [3:0] memory [0:3];
    always_ff @ (posedge clk)
        if (we)
            memory [wa] <= data;
    assign qa = memory [ra];
    assign qb = memory [rb];

endmodule
