Logical circuit design |
|
NASCO =  | N-1 Π i=0 |
iVldi | M-1 Π i=0 |
oStalli |      Here N and M are eachgrouping of front stage and back stage[2] |
Simple grouping method |
|
module node(iVld, iStall, oVld, oStall); parameter N = 4; parameter M = 4; input [N-1:0] iVld; output [N-1:0] iStall; output [M-1:0] oVld; input [M-1:0] oStall; wire nasc = (&iVld) & (~|oStall); assign iStall = {N{~nasc}}; assign oVld = {M{nasc}}; endmodule |
General grouping method |
|
module node(iVld, iStall, oVld, oStall); parameter P = 2; parameter Q = 2; parameter M = 1<<P; parameter N = 1<<Q input [N-1:0] iVld; output [N-1:0] iStall; output [M-1:0] oVld; input [M-1:0] oStall; reg [N-1:0] iStall; reg [M-1:0] oVld; integer i; always @(iVld or oStall) for (i=0; i<N; i=i+1) iStall = ~&vldSerFunc(iVld, i) | (|oStall); always @(iVld or oStall) for (i=0; i<M; i=i+1) oVld = &iVld & (~|StallSerFunc(oStall, i)); function [N-1:0] vldSerFunc; input [N-1:0] vld; input [Q-1:0] num; integer i; for (i=0; i<N; i=i+1) vldSerFunc[i] = (i == num) ? 1'b1 : vld[i]; endfunction function [M-1:0] StallSerFunc; input [M-1:0] Stall; input [P-1:0] num; integer i; for (i=0; i<M; i=i+1) StallSerFunc[i] = (i == num) ? 1'b0 : Stall[i]; endfunction endmodule |
Logical design circuit > Pipeline > Grouping Next Page(Throughput control) Top of this page ▲