Atelier des rouesLab FR
Objects/Documentation

banc07.v

I fix both common register banks.

Download ↓
// CORE is a previously mapped combinational module. Both register banks are common.
module bench(input clk, input [8:0] a, output [2:0] y);
    wire [8:0] held;
    wire [2:0] answer;
    genvar i;
    generate for (i=0; i<9; i=i+1) begin: launch
        SB_DFF reg_in(.C(clk), .D(a[i]), .Q(held[i]));
    end endgenerate
    `CORE core(.r(held[8:6]), .b(held[5:0]), .y(answer));
    generate for (i=0; i<3; i=i+1) begin: capture
        SB_DFF reg_out(.C(clk), .D(answer[i]), .Q(y[i]));
    end endgenerate
endmodule

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.