Coding StyleΒΆ

collected based on Spyglass rules

  • Arrary Rules

    1. W17:

      Prefer full range of a bus/array in sensitivity list. Avoid bits or slices

      warning:

      always @( dat[1:0], ... ) begin
         ...    // expressions with dat[1:0]
      end
      

      preferred:

      assign dat_sub_w = dat[1:0];
      
      always @(*) begin
         ...    // expressions with dat_sub_w
      end
      
    2. W86:

      Not all elements of an array are set

    3. W111:

      Not all elements of an array are read

    4. W488:

      A bus variable appears in the sensitivity list but not all bits of the bus are read in the contained block

  • Case Rules

    1. W69:

      case constructs that do not have all possible clauses described and also do not have the default clause

      warning:

      always @(*) begin
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 'b000 ;
            2'd1 :    dat_thermal_w = 'b001 ;
            2'd2 :    dat_thermal_w = 'b011 ;
         endcase
      end
      

      preferred:

      always @(*) begin
                      dat_thermal_w = 'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 'b000 ;
            2'd1 :    dat_thermal_w = 'b001 ;
            2'd2 :    dat_thermal_w = 'b011 ;
            2'd3 :    dat_thermal_w = 'b111 ;
         endcase
      end
      
    2. W71:

      case constructs that do not contain a default clause

      warning:

      always @(*) begin
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 4'b000 ;
            2'd1 :    dat_thermal_w = 4'b001 ;
            2'd2 :    dat_thermal_w = 4'b011 ;
            2'd3 :    dat_thermal_w = 4'b111 ;
         endcase
      end
      

      preferred:

      always @(*) begin
                      dat_thermal_w = 4'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 4'b000 ;
            2'd1 :    dat_thermal_w = 4'b001 ;
            2'd2 :    dat_thermal_w = 4'b011 ;
            2'd3 :    dat_thermal_w = 4'b111 ;
         endcase
      end
      
    3. W171:

      Expressions used as case clause labels

      warning:

      always @(*) begin
                                   dat_thermal_w = 4'b000 ;
         case( dat_bin_w )
            dat_condition_0_w :    dat_thermal_w = 4'b000 ;
            dat_condition_1_w :    dat_thermal_w = 4'b001 ;
            dat_condition_2_w :    dat_thermal_w = 4'b011 ;
            dat_condition_3_w :    dat_thermal_w = 4'b111 ;
         endcase
      end
      

      preferred:

      always @(*) begin
         if( dat_bin_w == dat_condition_0_w ) begin
            dat_thermal_w = 4'b000 ;
         end
         else if( dat_bin_w == dat_condition_1_w ) begin
            dat_thermal_w = 4'b001 ;
         end
         else if( dat_bin_w == dat_condition_2_w ) begin
            dat_thermal_w = 4'b011 ;
         end
         else if( dat_bin_w == dat_condition_3_w ) begin
            dat_thermal_w = 4'b111 ;
         end
         else begin
            dat_thermal_w = 4'b000 ;
         end
      end
      
    4. W187:

      case constructs where the default clause is not the last clause

      warning:

      always @(*) begin
         case( dat_bin_w )
            2'd0   :    dat_thermal_w = 'b000 ;
            2'd1   :    dat_thermal_w = 'b001 ;
            default:    dat_thermal_w = 'b000 ;
            2'd3   :    dat_thermal_w = 'b111 ;
         endcase
      end
      

      preferred:

      always @(*) begin
                      dat_thermal_w = 'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 'b000 ;
            2'd1 :    dat_thermal_w = 'b001 ;
            2'd3 :    dat_thermal_w = 'b111 ;
         endcase
      end
      
    5. W226:

      case constructs where the selector is a constant or a static expression

      warning:

      always @(*) begin
                                   dat_thermal_w = 4'b000 ;
         case( 2'b2 )
            dat_condition_0_w :    dat_thermal_w = 4'b000 ;
            dat_condition_1_w :    dat_thermal_w = 4'b001 ;
            dat_condition_2_w :    dat_thermal_w = 4'b011 ;
            dat_condition_3_w :    dat_thermal_w = 4'b111 ;
         endcase
      end
      

      preferred:

      always @(*) begin
         if( dat_condition_0_w == 'd2 ) begin
            dat_thermal_w = 4'b000 ;
         end
         else if( dat_condition_1_w == 'd2 ) begin
            dat_thermal_w = 4'b001 ;
         end
         else if( dat_condition_2_w == 'd2 ) begin
            dat_thermal_w = 4'b011 ;
         end
         else if( dat_condition_3_w == 'd2 ) begin
            dat_thermal_w = 4'b111 ;
         end
         else begin
            dat_thermal_w = 4'b000 ;
         end
      end
      
    6. W263:

      case clause labels whose widths do not match the width of the corresponding case construct selector

      warning:

      wire [2-1 :0]    dat_bin_w ;
      
      always @(*) begin
                      dat_thermal_w = 'b000 ;
         case( dat_bin_w )
            1'd0 :    dat_thermal_w = 'b000 ;
            1'd1 :    dat_thermal_w = 'b001 ;
            2'd2 :    dat_thermal_w = 'b011 ;
         endcase
      end
      

      preferred:

      wire [2-1 :0]    dat_bin_w ;
      
      always @(*) begin
                      dat_thermal_w = 'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 'b000 ;
            2'd1 :    dat_thermal_w = 'b001 ;
            2'd2 :    dat_thermal_w = 'b011 ;
         endcase
      end
      
    7. W332:

      case constructs that do not have all possible clauses described and have a default clause

    8. W337:

      Illegal case construct labels

      warning:

      always @(*) begin
                       dat_thermal_w = 'b000 ;
         case( dat_bin_w )
            2'b00 :    dat_thermal_w = 'b000 ;
            2'b01 :    dat_thermal_w = 'b001 ;
            2'b1x :    dat_thermal_w = 'b111 ;
         endcase
      end
      

      preferred:

      always @(*) begin
                       dat_thermal_w = 'b000 ;
         casez( dat_bin_w )
            2'b00 :    dat_thermal_w = 'b000 ;
            2'b01 :    dat_thermal_w = 'b001 ;
            2'b1? :    dat_thermal_w = 'b111 ;
         endcase
      end
      
    9. W398:

      Duplicate choices in CASE construct

      warning:

      always @(*) begin
                      dat_thermal_w = 4'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 4'b000 ;
            2'd1 :    dat_thermal_w = 4'b001 ;
            2'd2 :    dat_thermal_w = 4'b011 ;
            2'd2 :    dat_thermal_w = 4'b011 ;
            2'd3 :    dat_thermal_w = 4'b111 ;
         endcase
      end
      

      preferred:

      always @(*) begin
                      dat_thermal_w = 4'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 4'b000 ;
            2'd1 :    dat_thermal_w = 4'b001 ;
            2'd2 :    dat_thermal_w = 4'b011 ;
            2'd3 :    dat_thermal_w = 4'b111 ;
         endcase
      end
      
    10. W453:

      case constructs with large selector bit-width and more number of case clauses

      warning:

      wire [32-1 :0]    dat_x_w ;
      
      always @(*) begin
                           ...
         case( dat_x_w )
            32'h00000000 : ...
            32'h00000001 : ...
            ... : ...
            32'hffffffff : ...
         endcase
      end
      

      preferred:

      design should be optimized

    11. W551:

      case constructs with the default clause and full_case pragma applied or priority/unique case constructs with default clause

      warning:

      always @(*) begin
                        dat_thermal_w = 4'b000 ;
         case( dat_bin_w )
            // synopsys full case
            2'd0   :    dat_thermal_w = 4'b000 ;
            2'd1   :    dat_thermal_w = 4'b001 ;
            2'd2   :    dat_thermal_w = 4'b011 ;
            2'd3   :    dat_thermal_w = 4'b111 ;
            default:    dat_thermal_w = 4'b011 ;
         endcase
      end
      

      preferred:

      always @(*) begin
                      dat_thermal_w = 4'b000 ;
         case( dat_bin_w )
            2'd0 :    dat_thermal_w = 4'b000 ;
            2'd1 :    dat_thermal_w = 4'b001 ;
            2'd2 :    dat_thermal_w = 4'b011 ;
            2'd3 :    dat_thermal_w = 4'b111 ;
         endcase
      end
      
  • Lint_Reset Rules

    1. W392:

      Reset/Set signals that have been used in both negative and positive polarity in the same architecture

      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(posedge clk or posedge rstn ) begin
         if( rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    2. W395:

      process/always blocks that use multiple asynchronous set/reset signals

      always @(posedge clk, negedge rstn_1, negedge rstn_2 ) begin
         if( !rstn_1 ) begin
            dat_r <= 'd0 ;
         end
         else if( !rstn_2 ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    3. W396:

      Processes that have a clock signal but no asynchronous reset signal

      always @(posedge clk) begin
         ...
      end
      
    4. W402:

      Reset signals that are internally generates at level other than the top-level of the design

    5. W402a:

      Synchronous reset signals that are not inputs to the module

    6. W402b:

      Asynchronous reset signals that are not inputs to the module

    7. W448:

      Signals that are used both as synchronous and asynchronous reset/set in a design

      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_a_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(posedge clk ) begin
         if( !rstn ) begin
            dat_b_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_a_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(posedge clk or negedge rstn ) begin
         ...
      end
      
    8. W501:

      Reset ports in component instantiations that are connected to static names (generic or constant)

      test test(
         .clk     ( clk     ),
         .rstn    ( 1'b0    ),
         ...
      );
      
  • Lint_Clock Rules

    1. W391:

      Modules where both edges of a clock are used to describe sequential elements

      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_a_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(negedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_b_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    2. W401:

      Clock signals that are not input to the module where they are used

      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            clk_r <= 'd0 ;
         end
         else begin
            clk_r <= ! clk_r ;
         end
      end
      
      always @(negedge clk_r or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            flg_r <= 'd0 ;
         end
         else begin
            flg_r <= ! flg_r ;
         end
      end
      
      always @(negedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            if( flg_r ) begin
               ...
            end
         end
      end
      
    3. W422:

      Event control descriptions with more than one clock

      always @(posedge clk1 or posedge clk2 or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    4. W500:

      Clock ports of component instances that use bus, indexed-name, sliced-name, expressions, or concatenation

      test test(
         .clk     ( 1'b0    ),
         .rstn    ( rstn    ),
         ...
      );
      
      test test(
         .clk     ( clk1 || clk2    ),
         .rstn    ( rstn            ),
         ...
      );
      
  • Usage Rules

    1. W34:

      Macros that are defined but not used

    2. W88:

      Memories where all their elements are not set in the design

    1. W120:

      Variables that are declared but not used

    2. W121:

      Object names that are not unique within the current scope

      reg dat_r ;
      
      generate
         for( ... ) begin
            reg dat_r ;
            always @(posedge clk or negedge rstn ) begin
               if( !rstn ) begin
            end
         end
      endgenerate
      
    3. W123:

      Signal/ variable that has been read out but is never set

    4. W143:

      Macros redefinitions in the same file

    5. W154:

      Implicit net declarations

      assign dat_c_w = dat_a_w + dat_b_w ;
      
    6. W175:

      Parameters that are never used

    7. W188:

      Assignments to input ports

    8. W215:

      Bit-selects of integer or time variables

      integer i;
      
      always @(*)
         ...
         dat_r = i[1:0];
         ...
      end
      
    9. W216:

      Part-selects of integer or time variables

    10. W240:

      Input ports that are never read

    11. W241:

      Output ports that are not completely set

    12. W333:

      UDPs (user-defined primitives) that are never instantiated

    13. W423:

      Ports that are re-declared with a different range in the same module

      input  [10-1 :0]   dat_i ;
      wire   [20-1 :0]   dat_i ;
      
    14. W468:

      Variables used as array index that are narrower than the array width

      reg  [10-1 :0]   dat_r[128-1 :0] ;
      wire [3 -1 :0]   idx_w ;
      assign dat_w = dat_r[idx_w] ;
      
    15. W493:

      Use of shared variables with global scope

    16. W494:

      Inout ports that are never used

    17. W494a:

      Input ports that are never read

    18. W494b:

      Output ports that are never set

    19. W495:

      Inout ports that are read but never set

    20. W497:

      Bus signals that are not completely set in the design

    21. W498:

      Bus signals that are not completely read in the design

    22. W528:

      Signals or variables that are set but never read

  • Lint_Tristate Rules

    1. W438:

      Tristate descriptions that are not at the top-level of the design

    2. W541:

      Inferred tristate nets

    assign dat_o = flg_r ? dat_w : 1'bz ;
    
  • Assign Rules

    1. W19:

      Usage of constants where the constant is wider than the usage context

      wire [2-1 :0]    dat_w ;
      
      assign flg_o = dat_w == 2'b0101 ;
      
    2. W164:

      Assignments in which LHS width does not match with the RHS width of an expression

    3. W164c:

      Assignments in which the LHS width is greater than the (implied) width of the RHS expression

    4. W257:

      Delays

    5. W280:

      Intra-assignment delays specified with nonblocking assignments

    6. W306:

      integer type to real type conversions

    7. W307:

      Unsigned type (reg type) to real type conversions

    8. W308:

      real type to integer type conversions

    9. W309:

      Unsigned type (reg type) to integer type conversions

    10. W310:

      integer type to unsigned type (reg type) conversions

    11. W311:

      real type to unsigned type (reg type) conversions

    12. W312:

      real type to single-bit type conversions

    13. W314:

      Multi-bit reg types to single-bit conversions

    14. W317:

      Assignments to supply nets

    15. W336:

      Blocking assignment used in sequential always constructs

      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_r = 'd0 ;
         end
         else begin
            if( val ) begin
               dat_r = dat_i ;
            end
         end
      end
      
    16. W397:

      Value assignments to input ports

    17. W414:

      nonblocking assignments used in combinational always constructs

      always @(*) begin
         dat_w <= dat_i ;
      end
      
    18. W446:

      Output ports that are read in the module where they are set

    19. W474:

      Variables that are assigned but not deassigned

    20. W475:

      Variables that are deassigned without being assigned

    21. W476:

      Variables that are forced but are not released

    22. W477:

      Variables that are released without being forced

    23. W484:

      Possible loss of carry or borrow bits during assignments using addition and subtraction arithmetic operators

    24. W505:

      Signals or variables that are being assigned values using both blocking and nonblocking assignments

      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            if( val ) begin
               dat_r = dat_i ;
            end
         end
      end
      
  • Function-Task Rules

    1. W190:

      Tasks or procedures that are declared but not used in the design

    2. W191:

      Functions that are declared but not used in the design

    3. W243:

      Recursive task calls

    4. W345:

      Presence of an event control in a task or procedure body may not be synthesizable

    5. W346:

      Task descriptions with multiple event control statements

    6. W372:

      User-defined PLI functions that are not registered in the Verilog Lint ruledeck file

    7. W373:

      User-defined PLI tasks that are not registered in the Verilog Lint ruledeck file

    8. W424:

      Functions that set global variables

    9. W425:

      Functions that read global variables

    10. W426:

      Tasks that set global variables

    11. W427:

      Tasks that read global signals

    12. W428:

      Task calls in combinational always constructs

    13. W429:

      Task calls in sequential always constructs

    14. W489:

      Functions where the last statement in the function description is not assigning to the function return value

    15. W499:

      Functions where all bits of the function return value are not assigned in the function description

  • Function-Subprogram Rules

    1. W190:

      Tasks or procedures that are declared but not used in the design

    2. W191:

      Functions that are declared but not used in the design

    3. W345:

      Presence of an event control in a task or procedure body may not be synthesizable

    4. W416:

      Functions where the range of the return type is not same as the function return value

    5. W424:

      Functions that set global variables

    6. W425:

      Functions that read global variables

    7. W489:

      Functions where the last statement in the function description is not assigning to the function return value

  • Delay Rules

    1. W126:

      Non-integer delay values

    2. W127:

      Delay values containing X or Z

    3. W128:

      Negative delays

    4. W129:

      Non-constant delay values

  • Lint_Latch Rules

    1. W18:

      Latches inferred in the design

  • Instance Rules

    1. W107:

      Bus connections to primitive gates

    2. W110:

      Width mismatch between a module port and the net connected to the port in a module instance

    1. W146:

      Module instances where the port association is by position

    2. W156:

      Reverse connected buses

      test test(
         ...
         .dat_i    ( dat_w[0:19]    ),
         ...
      )
      
    3. W210:

      Module/Interface instances with unconnected ports

    4. W287a:

      Module instances where nets connected to input ports are not driven

    5. W287b:

      Module instances where the output ports are not connected

      warning

      test test(
         ...
         //.dat_o    (    ),
         ...
      )
      

      preferred

      test test(
         ...
         .dat_o    ( /* UNUSED */    ),
         ...
      )
      
    6. W287c:

      Module instances where the inout ports are not connected or connected net is hanging

    7. W504:

      Port expression that uses integers

  • Synthesis Rules

    1. badimplicitSM1:

      Sequential descriptions where the clock and reset cannot be inferred

      always @(posedge clk or negedge rstn ) begin
         if( rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
      always @(posedge clk or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    2. badimplicitSM2:

      Sequential descriptions where the states are updated on different clock edges

    3. badimplicitSM4:

      Sequential descriptions where event control expressions use with more than one clock edge

      always @(posedge clk or negedge clk or negedge rstn ) begin
         if( rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    1. bothedges:

      Multiple edges of a variable used in the control list

      always @(posedge clk or posedge rstn or negedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    1. infiniteloop:

      while or forever loops without event control to break the loop

    1. mixedsenselist:

      Mixed edge and non-edge conditions in sensitivity list of an always construct

    1. readclock:

      Sequential descriptions where the clock signal is read inside the always construct

      always @(posedge clk or posedge rstn ) begin
         if( !rstn ) begin
            dat_r <= 'd0 ;
         end
         else begin
            if( clk == 1'b1 ) begin
               ...
            end
         end
      end
      
    1. W182c:

      time variable declarations

    2. W182g:

      tri0 declarations

    3. W182h:

      tri1 declarations

    4. W182k:

      trireg declarations

    5. W182n:

      Switches (pmos, nmos, and cmos)

    6. W213:

      PLI functions

    7. W218:

      Event expressions that check for edge on a multi-bit signal

      wire [2-1 :0]    dat_i ;
      always @(posedge dat_i) begin
         dat_o = dat_i ;
      end
      
    8. W239:

      Hierarchical name references

      assign dat_o = test.dat_w ;
      
    9. W250:

      disable statements

    1. W293:

      Functions that return real values

    2. W294:

      Un-synthesizable constructs

      real r = 0.025 ;
      
    3. W295:

      event variables

      event w ;
      
    1. W339a:

      Identity operators identity equal (===) and identity not equal (!==) operators

    2. W430:

      initial constructs

    1. W442a:

      Un-synthesizable asynchronous reset sequences

      always @(posedge clk or negedge rstn ) begin
            dat_b_r <= 'd0 ;
         if( !rstn ) begin
            dat_a_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    2. W442b:

      Complex reset sequences

      always @(posedge clk or negedge rstn ) begin
         if( !rstn == flg_w ) begin
            dat_a_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    3. W442c:

      Reset sequences where the reset signal is being modified by operators other than logical inverse (!) and bit-wise inverse (~) operators

      always @(posedge clk or negedge rstn ) begin
         if( &rstn ) begin
            dat_a_r <= 'd0 ;
         end
         else begin
            ...
         end
      end
      
    1. W464:

      Unsupported synthesis directives

    2. W496a:

      Comparisons to tristate signals in control expressions

      always @(*) begin
         if( condition_w == 2'b1z ) begin
            ...
         end
         else begin
            ...
         end
      end
      
    3. W496b:

      Comparisons to tristate signals in case construct control expressions

    always @(*) begin
                     dat_thermal_w = 4'b000 ;
       case( dat_bin_w )
          2'b00 :    dat_thermal_w = 4'b000 ;
          2'b01 :    dat_thermal_w = 4'b001 ;
          2'b1z :    dat_thermal_w = 4'b111 ;
       endcase
    end
    
    1. W503:

      event variables that are never triggered

  • Expression Rules

    1. W116:

      Unequal length operands in bitwise logical/ arithmetic/ ternary operator

    2. W159:

      Control expressions that evaluate to a constant

    1. W224:

      Multi-bit expressions found where single-bit expressions were expected

      assign dat_c_w = (dat_a_w-dat_b_w) ? 'd1 : 'd0 ;
      
    2. W289:

      real operands used in logical comparisons

    3. W292:

      Logical comparison operations on real type operands

    4. W341:

      Assignments to constants where the size of the assigned value is narrower than the constant and the high-order bit/byte are zero

    5. W342:

      Assignments to constants where the size of the assigned value is narrower than the constant and the high-order bit/byte are X

    6. W343:

      Assignments to constants where the size of the assigned value is narrower than the constant and the high-order bit/byte are Z

    7. W362:

      Unequal widths in arithmetic comparison operations

      wire [7-1 :0]    dat_a_w ;
      wire [3-1 :0]    dat_b_w ;
      assign flg_w = (dat_a_w>dat_b_w) ? 'd1 : 'd0 ;
      
    8. W443:

      Based numbers that contain the unknown character (X)

      always @(posedge clk or negedge rstn ) begin
         if( &rstn ) begin
            dat_a_r <= 'dx ;
         end
         else begin
            ...
         end
      end
      
    9. W444:

      All occurrences of the high impedance character (Z) or ? in the design

      always @(posedge clk or negedge rstn ) begin
         if( &rstn ) begin
            dat_a_r <= 'd? ;
         end
         else begin
            dat_a_r <= 'dz ;
         end
      end
      
    10. W467:

      Based numbers that contain the dont care character (?)

    11. W486:

      Shift operation overflows

      wire [5-1 :0]    dat_a_w ;
      wire [5-1 :0]    dat_b_w ;
      assign dat_b_w = dat_a_w << 'd2 ;
      
    12. W490:

      Constant control expressions or sub-expressions

    13. W491:

      case clause condition constants that are ?-extended

    14. W561:

      Zero-width based numbers

      0'd0
      
    15. W563:

      Unary reduction operations on single-bit expressions

      wire dat_a_w ;
      wire dat_b_w ;
      assign dat_b_w = | dat_a_w ;
      
    16. W575:

      Logical not operators used on vector signals

      wire [10-1 :0]    dat_w ;
      wire              flg_w ;
      assign flg_w = !dat_w ;
      
    17. W576:

      Logical operations performed on vector signals

      wire [10-1 :0]    dat_a_w ;
      wire [10-1 :0]    dat_b_w ;
      wire              flg_w ;
      assign flg_w = dat_a_w && dat_b_w ;
      
  • MultipleDriver Rules

    1. W259:

      Signals that have multiple drivers but no associated resolution function

    2. W323:

      Non-tristate inout nets that are driven in more than one always construct or module instance

    3. W415:

      Non-tristate nets that are driven in more than one always construct or module instance

    4. W415a:

      Signals that are multiply assigned in the same always construct

    5. W552:

      Flip-flop outputs whose different bit-selects are driven in different sequential always constructs

    6. W553:

      Nets whose different bit-selects are driven in different combinational always constructs

  • Simulation Rules

    1. W122:

      Signal that is read in a combinational process/ always block, but is not included in the sensitivity list

    2. W167:

      Modules that do not have any port interface

    3. W456:

      Signals that are in the sensitivity list of a combinational always construct but are not completely read in the construct

    4. W456a:

      Signals that are in the sensitivity list of a combinational process block but are not read in the process block

    1. W502:

      variable that is present in the sensitivity list and is modified in the always block

    2. W526:

      IF-ELSE constructs that should be changed to case constructs to improve performance

  • Event Rules

    1. W238:

      always construct where both blocking assignments and nonblocking assignments are used

    2. W245:

      Reduction OR operator (|) or logical OR operator (||) used in the sensitivity list of an always construct

    3. W253:

      Data event variables specified with an edge in a timing check system task call

    4. W254:

      Reference event variables specified without an edge in a timing check system task call

    5. W256:

      Notifiers that are not single-bit registers

    6. W326:

      event variables used with edges

    7. W421:

      always constructs that have neither a sensitivity list nor an event control statement

  • Loop Rules

    1. W66:

      repeat constructs with non-static control expressions

      repeat( dat_w ) begin
         ...
      end
      
    2. W352:

      for constructs with condition expression that evaluate to a constant

    1. W479:

      for constructs where the control expression does not set the value of the variable used in the step expression or always sets it to a constant value

    2. W480:

      for constructs where the loop index variable evaluates to a non-integer

    3. W481a:

      for constructs where the variable used in the step expression is not used in the condition expression

    4. W481b:

      for constructs where the variable used in the initialization expression is not same as the variable used in the step expression

  • Lint_Elab_Rules

    1. W162:

      Constant integer assignments to signals when the width of the signal is wider than the width of the constant integer

    2. W163:

      Cases where a constant integer value is assigned to a vector of smaller size

    3. W164a:

      Assignments in which the LHS width is less than the (implied) width of the RHS expression

    4. W164b:

      Assignments in which the LHS width is greater than the (implied) width of the RHS expression

    1. W316:

      Integer conversions where the left expression is wider than the right expression

    2. W328:

      Constant conversions where the left expression is narrower than the right expression but the extra bits in the right expressions are all zeros

  • Verilint_Compat Rules

    1. W313:

      integer type to single-bit type conversions

    1. W348:

      Concatenation expressions where the width of an integer expression is unspecified

      assign dat_w = { dat_0_w ,dat_1_w ,dat_2_w+'d3 ,dat_4_w };
      
  • Miscellaneous Rules

    1. W189:

      Nested translate_off comments

    2. W192:

      Empty BEGIN-END blocks

    3. W193:

      Empty statements (isolated semicolons)

    4. W208:

      Nested translate_on comments

    5. W350:

      Control characters found in strings

    6. W351:

      Control characters found in comment lines

    7. W433:

      Multiple top-level modules

    8. W527:

      Dangling ELSE statements

    9. W546:

      Duplicate design unit

    10. W701:

      Included files that are not required for analysis

  • CDC Rule

    1. Ac_unsync01:

      Asynchronous clock domain crossings for scalar signals that have at least one unsynchronized source

    2. Ac_unsync02:

      Asynchronous clock domain crossings for vector signals having at least one unsynchronized source

    1. Ac_conv01:

      Same-domain signals that are synchronized with multi-flop and sync-cell synchronizers to another domain and that are converging after any number of sequential elements

  • Advanced Clock Functional Verification Rules

    1. Ac_cdc01a:

      Fast-to-slow clock crossings where the data generated by the source register (fast clock) is not stable long enough for the destination register (slow clock) to properly capture the data when the clock crossing is found to be synchronized by the multi-flop synchronization scheme

    2. Ac_cdc01b:

      Fast-to-slow clock crossings where the data generated by the source register (fast clock) is not stable long enough for the destination register (slow clock) to properly capture the data when the clock crossing is found to be synchronized by a scheme other than the multi-flop synchronization scheme

    3. Ac_cdc01c:

      Fast-to-slow clock crossings where the data generated by the source register (fast clock) is not stable long enough for the destination register (slow clock) to properly capture the data when the clock crossing is found to be un-synchronized

    4. Ac_cdc08:

      Synchronized multi-bit control buses where the bus is not Gray encoded