// Synthesizable ideal functional model; physical power pins omitted.

module cd4015b
(
    input              p1_clk_b,
    input              p6_rst_a,
    input              p7_d_a,
    input              p9_clk_a,
    input              p14_rst_b,
    input              p15_d_b,
    output             p2_q4_b,
    output             p3_q3_a,
    output             p4_q2_a,
    output             p5_q1_a,
    output             p10_q4_a,
    output             p11_q3_b,
    output             p12_q2_b,
    output             p13_q1_b
);

    logic [3:0] a, b;

    always_ff @ (posedge p9_clk_a or posedge p6_rst_a)
        if (p6_rst_a)
            a <= '0;
        else
            a <= { a [2:0], p7_d_a };

    always_ff @ (posedge p1_clk_b or posedge p14_rst_b)
        if (p14_rst_b)
            b <= '0;
        else
            b <= { b [2:0], p15_d_b };

    assign { p10_q4_a, p3_q3_a, p4_q2_a, p5_q1_a }   = a;
    assign { p2_q4_b, p11_q3_b, p12_q2_b, p13_q1_b } = b;

endmodule
