Objets/Documentation
etages.v
Je lis les six bits deux par deux avec trois étages de tables.
Télécharger ↓module radix4step(input [2:0] r, input [1:0] d, output [2:0] y);
wire [2:0] transition [0:31];
genvar j;
generate for (j=0; j<32; j=j+1) begin: line
assign transition[j] = (j/4 < 5) ? j%5 : j/4;
end endgenerate
assign y = transition[{r,d}];
endmodule
module staged6(input [2:0] r, input [5:0] b, output [2:0] y);
wire [2:0] a, c;
radix4step first(r,b[5:4],a);
radix4step second(a,b[3:2],c);
radix4step third(c,b[1:0],y);
endmodule