Logical circuit design
Inquiry Sitemap Link Tips
Grouping

Simple grouping method sample RTL

Simple grouping method
  • Required sufficient condition(NASC) is true then, assert all oVld after grouping, and de-assert all iStall before grouping
  • iStalliby itself relates to iVldi, hence if for previous stage any type other thanBuffer Type(SU is used, iVldiwill bedeasserted foreverand will not function
  • oVldiby itself relates to oStalli, hence if for following stage if for throughput controlInput control type is used,looped combination circuit[3]occurs
    
    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 sample RTL

General grouping method
  • Required sufficient condition(NASC)is true then, oVld after grouping is asserted with below condition, and iStall before grouping is dasserted with below conditions.
    • iStalliby itself is excludes relation to iVldi
    • oVldiby itself excludes relation to oStalli
  • With the below condition also, if for throughput control to later stagesInput control typearemultipleused, then looped combined circuit[3]will occur
    
    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 ▲

[1]
Although have not taken any statistics, think that this is where the most problems occur.

From experience, know that the most dangerous case is when coding for Stall is forgotten as it is rarely asserted. Testing is after constructing the module and Stall is difficult to purposely assert, and hence many times it is forgotten

In this case, there will be a lot of errors after the design is made into a LSI and it is most painful in trying to find the reason for the errors and solutions. Take extreme care here.
[2]
At the grouping part, it is possible to avoid mistakes by counting the number of input signals (groupings -1 ) and output signals (1) and seeing that the total is same as the number of groupings.

Further, this is the case when Valid, Stall of termination condition signal are added. Also need to check if logic has been designed for Valid and Stall with the conditions.

For terminated condition of state machine, another mistake which can cuase problems is to forget the start signal so that the system is IDLE for all conditions.(Also the condition is IDLE even though start signal is received.)。
[3]
For logical composing tool, it is possible there may be no messages output for grouped circuit loops. To avoid, to dismantle vectors and completely exclude variables and code them