Atelier des rouesLab FR
Objects/Documentation

largeurs.v

I provide the eight-bit descriptions and direct Verilog.

Download ↓
module horner8(input [2:0] r, input [7:0] b, output [2:0] y);
    wire [2:0] state [0:8];
    assign state[0] = r;
    genvar j;
    generate for (j=0; j<8; j=j+1) begin: stage
        wire [3:0] twice = {state[j], b[7-j]};
        wire [3:0] reduced = twice >= 4'd5 ? twice - 4'd5 : twice;
        assign state[j+1] = reduced[2:0];
    end endgenerate
    assign y = r < 5 ? state[8] : r;
endmodule

module staged8(input [2:0] r, input [7:0] b, output [2:0] y);
    wire [2:0] a,c,d;
    radix4step first(r,b[7:6],a);
    radix4step second(a,b[5:4],c);

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.