Nlint Rules
Nlint Rules
Nlint Rules
Rule Category
SpringSoft, Inc.
Hsinchu, Taiwan and San Jose, CA www.springsoft.com
Printing
Printed on April 3, 2009
Version
This manual supports nLint 2009 series and higher versions.
Copyright
All rights reserved. No part of this manual may be reproduced in any form or by any means without written permission of SpringSoft, Inc.: No. 25, Industry East Road IV Science-Based Industrial Park Hsinchu 300, Taiwan, R.O.C. or 2025 Gateway Place, Suite 400, San Jose, CA 95110 www.springsoft.com Copyright (c) 1996-2009 SpringSoft, Inc.
Trademarks
Debussy, Verdi and nLint are trademarks or registered trademarks of SpringSoft USA, Inc. or SpringSoft, Inc. in the United States and other countries. The product names used in this manual are the trademarks or registered trademarks of their respective owners.
Confidentiality
The information in this document is confidential and is covered by a license agreement between SpringSoft and your organization. Distribution and disclosure are restricted.
Restricted Rights
The information contained in this document is subject to change without notice.
Audience
The audience for this book includes chip designers who require faster and more efficient automated and customizable checking tools. This document assumes that you have a basic knowledge of the platform on which your version of nLint runs: Unix, Linux, or Windows NT; and that you are knowledgeable in Verilog/VHDL and digital logic design.
Bold font is used to emphasize menu items, function keys, button name, i.e., Create Path command, press F2 to save, click OK button, etc; Menu->Command identifies the path used to
select a menu command. Blue text is used to outline text area for active hypertext links ; it helps you jump to the reference topic.
Courier type is used for program listings, TCL command and arguments. It is also used for test message that displays on the screen.
TypedinText is used to indicate a paragraph text that a user needs to type in. For example, type filename and then press Return. NOTE describes important information, warnings, or unique commands.
Related Publications
nLint User Guide and Tutorial Explains how to install nLint and guides you step-by-step through the nLint system. nLint Guide to User-definable Rules and Open KDB Reference Manual Provides guide to user-definable rules (UDR) and Open KDB Reference. nLint Release Notes and Installation Files For current information about the latest software version, see nLint Release Notes shipped with the product and the Installation Files in the distribution directories.
Simulation
22005 Loss of Significant Bit 22006 (Verilog) Significant Bits Extended by X/Z/? 22009 (Verilog) Non-zero Bit(s) Truncated 22011 Combinational Loop 22013 Asynchronous Loop 22014 Synchronous Loop 22016 (Verilog) Apparent Loop 22018 (Verilog) Logic '1' Used to Extend Significant Bits of Constants 22019 (Verilog) Bit Index out of Bus Range 22024 (Verilog) Logic '0' Used to Extend Significant Bits of Constants 22026 (Verilog) Zero Bit(s) Truncated 22079 Constant Conditional Expression 22082 Port Not Connected 22083 Parameter Bit-width Too Long 22085 No Return Value in a Conditional Branch of a Function 22089 (Verilog) Vector Used in a Single-bit Logical Operation 22091 (Verilog) Multi-bit Expression when One Bit Expression Expected 22109 (Verilog) Logical or Bitwise OR Used in Event Control 22112 (Verilog) Zero Loop Count 22113 Infinite Loop 22115 (Verilog) Undefined Repeat Expression 22139 (Verilog) Constant Event Expression 22151 (Verilog) Assignment to an Input Signal 22169 Unassigned Bits in Function's Return Value 22179 Signal in Sensitivity List Changed in the Block 22187 (Verilog) Negative Delay 22195 Signal Assigned to Self 22217 (Verilog) Event Never Triggered 22235 All Bits Shifted Out 22243 (Verilog) Default Not Used as the Last Case Label 22247 (Verilog) Delay in Non-blocking Assignment 22269 Combinational Path between Two Registers is Too Long 22271 Report Snake Path 22279 Port is Deliberately Not Connected 22281 (Verilog) Gate Port is Not Connected 22283 (Verilog) Gate Port is Deliberately Not Connected 23008 (Verilog) Default is Not Found 23011 Incomplete Sensitivity List
23013 Extra Signal in Sensitivity List 23028 (Verilog) Memory is Read and Written at Same Time 23029 Race Condition in Sequential Logic 23030 Race Condition in Combinational Logic 23123 Overlapped Case Labels 23125 (Verilog) Procedural Continuous Assignment Not Synthesizable 23131 (Verilog) Operation on X/Z 27003 Event Control or Delay Statement Not Found in All Branches 27071 (VHDL) Bit or Bit_vector Type Not Recommended 27099 (VHDL) Composite Record Used as Trigger 27101 (VHDL) Function Returning Dynamically Allocated Memory may Lead to Memory Leak 27105 (VHDL) Attribute Leads to Bad Simulation Performance 27109 (VHDL) Non-event Attribute on Sensitive Signal 27111 (VHDL) Should Rising_Edge or Falling_Edge Function 27115 (VHDL) Integer Type Used 27123 Temporary Variable Used in Non-blocking Assignment 27125 Un-initialized Variable Referenced in an Edge-triggered Block 27127 Un-initialized Variable Referenced in Combinational Process 27335 Synopsys Directives 'translate_off'/'translate_on' Used 27337 (Verilog) Synopsys Directives 'full_case' Used 27550 (VHDL) Global Signal without Initial Value 27573 (VHDL) Timeout Clause in Wait Statement Ignored by Synthesis 27661 Asynchronous Reference in Edge-sensitive Logic 27662 (Verilog) Dual Set or Reset Detected 27672 (Verilog) Large Bit Width of Reduction Operand 27673 (Verilog) Signal Written and Read in Same Always Block 27676 (Verilog) Signal Read before Written in Same Always Block 27805 (Verilog) Task in 'always_comb' Block 27821 (Verilog) Incomplete Assignment in 'always_comb' 29807 (Verilog) Fractional Delay Value
Synthesis
22019 (Verilog) Bit Index out of Bus Range 22075 (Verilog) Nested Edge-triggers 22077 (Verilog) Edge-trigger in Task 22083 Parameter Bit-width Too Long 22119 (Verilog) Logic Expression Used in Sensitivity List 22121 (Verilog) Duplicate Signal Found in Sensitivity List 22177 (Verilog) Signal Driven by Both Blocking and Non-blocking Assignments 22193 (Verilog) Recursive Function Call 22194 (Verilog) Function Call Stack Exceeds Maximum Depth 22207 (Verilog) Non-constant Shift Amount 22211 Signal Stuck at Logic 1 22213 Signal Stuck at Logic 0 22218 (Verilog) Ignore Do Not Care Values in Case Expressions 22239 Non-constant Case Label 22247 (Verilog) Delay in Non-blocking Assignment 23001 Bit Select in Sensitivity List 23002 Inferred Storage Not in Library 23003 Inferred Latch 23004 Inferred Mux 23005 Inferred Tri-state 23008 (Verilog) Default is Not Found 23011 Incomplete Sensitivity List 23015 (Verilog) Blocking/Non-blocking Assignment in Edge-triggered Block 23016 (Verilog) Blocking/Non-blocking Assignment in Combinational Block 23017 Case-like If Statement 23021 (Verilog) Gate Instance Found 23025 Non-constant Bit Range 23026 (Verilog) Loop Variable Not the Same in All Parts 23027 Non-constant 'for' Loop Count 23031 Z or X Used in Conditional Expression 23033 (Verilog) Non-constant Divisor 23034 (Verilog) Non-constant Dividend 23035 (Verilog) Loop Variable Changed in 'for' Loop 23037 (Verilog) Blocking and Non-blocking Statements in the Same Always Block 23039 While Statement Not Synthesizable 23042 Bit of a Bus Signal Used as Special Type Signal 23043 Multiple Bits in Special Type Signal 23044 Special Type Port Connected to an Expression 23045 (Verilog) Time Variable Not Synthesizable
23047 Real Variable Not Synthesizable 23049 (Verilog) Realtime Variable Not Synthesizable 23050 (Verilog) Unpacked Union Not Synthesizable 23051 (Verilog) Event Not Synthesizable 23053 (Verilog) UDP Instance Not Synthesizable 23055 (Verilog) Specify Block Not Synthesizable 23057 (Verilog) Initial Block Not Synthesizable 23059 (Verilog) Task Not Synthesizable 23061 (Verilog) UDP Not Synthesizable 23065 (Verilog) Macromodule Not Synthesizable 23069 (Verilog) Function with Integer Return Value 23071 Function Returning Real Not Synthesizable 23073 (Verilog) Net Types Not Synthesizable 23075 (Verilog) Delay Ignored by Synthesis 23077 (Verilog) Defparam Not Synthesizable 23079 (Verilog) Memory Not Synthesizable 23083 (Verilog) Drive Strength Not Synthesizable 23087 (Verilog) Repeat Statement Not Synthesizable 23089 (Verilog) Delay Control Ignored by Synthesis 23091 (Verilog) Event Control in Unsuitable Place is Not Synthesizable 23095 (Verilog) Wait Statement Not Synthesizable 23097 (Verilog) Event Enable Statement Not Synthesizable 23099 (Verilog) Fork Statement Not Synthesizable 23101 (Verilog) Task Call Not Synthesizable 23103 (Verilog) System Task Call Not Synthesizable 23105 (Verilog) Disable Statement Not Synthesizable 23107 (Verilog) Force Statement Not Synthesizable 23109 (Verilog) Release Statement Not Synthesizable 23115 (Verilog) String Constant Not Synthesizable 23117 (Verilog) Real Constant Not Synthesizable 23119 (Verilog) Hierarchical Reference Not Synthesizable 23123 Overlapped Case Labels 23125 (Verilog) Procedural Continuous Assignment Not Synthesizable 23127 (Verilog) Deassign Statement Not Synthesizable 23129 (Verilog) Case Equivalence Operator Not Synthesizable 23133 (Verilog) Redundant Asynchronous Signal 23135 (Verilog) Different Polarity in Condition and Sensitivity List 23137 (Verilog) Both Edge and Non-edge Expressions in the Sensitivity List 24017 (Verilog) Synopsys Template Directive should be Used Before Parameter 27081 (VHDL) 'std_ulogic_vector' Not Recommended
27083 (VHDL) Resolved/Unresolved Type Not Recommended 27107 (VHDL) WAIT Statement Not the First Statement 27122 (Verilog) Variable is Conditionally Assigned in the Block 27123 Temporary Variable Used in Non-blocking Assignment 27126 Unassigned Variable Referenced in an Edge-triggered Block 27128 Variable Not Fully Assigned before Referenced in Combinational Process 27181 (VHDL) Use Signal Instead of Variable in Process 27335 Synopsys Directives 'translate_off'/'translate_on' Used 27337 (Verilog) Synopsys Directives 'full_case' Used 27505 (VHDL) Non-integer Type Generic Not Synthesizable 27507 (VHDL) Declaration Here Not Synthesizable 27509 (VHDL) Passive Entity Statement Ignored by Synthesis 27515 (VHDL) Shared Variable Not Synthesizable 27517 (VHDL) File Object Declaration Ignored by Synthesis 27518 (VHDL) File Operation Not Synthesizable 27519 (VHDL) Alias Ignored by Synthesis 27521 (VHDL) Group Ignored by Synthesis 27522 (VHDL) Group Template Ignored by Synthesis 27523 (VHDL) Pure or Impure for Sub-program Not Synthesizable 27524 Synthesis Ignores Initial Value 27525 (VHDL) User-defined Attribute Except ENUM_ENCODING Ignored 27529 (VHDL) Signature Not Synthesizable 27531 (VHDL) Deferred Constant in Package Declaration Not Synthesizable 27533 (VHDL) Null Range Not Synthesizable 27535 (VHDL) Access Type Declaration Ignored by Synthesis 27536 (VHDL) Object of Ignored Type Not Synthesizable 27537 (VHDL) Incomplete Type Declaration 27539 (VHDL) Multi-dimensional Array Not Synthesizable 27541 (VHDL) Non-integer Type Range Value Not Synthesizable 27543 (VHDL) User-defined Resolution Function Ignored by Synthesis 27545 (VHDL) Signal with REGISTER or BUS Kind Not Synthesizable 27549 (VHDL) Assigning to Global Signal Not Synthesizable 27550 (VHDL) Global Signal without Initial Value 27551 (VHDL) Linkage Mode Not Synthesizable 27553 (VHDL) Type Conversion in Formal Part of Association List Not Synthesizable 27557 (VHDL) Disconnect Ignored by Synthesis 27559 (VHDL) Xnor Operator Not Synthesizable 27561 (VHDL) Shift Operator Not Synthesizable 27563 (VHDL) Non-static Operand in Multiplying or Miscellaneous Operation 27565 (VHDL) Null for Expression Not Synthesizable
27567 (VHDL) Allocator and Deallocator Not Synthesizable 27571 (VHDL) Wait on Sensitivity List Not Synthesizable 27573 (VHDL) Timeout Clause in Wait Statement Ignored by Synthesis 27575 (VHDL) Assertion Statement Ignored by Synthesis 27577 (VHDL) Report Statement Not Synthesizable 27581 (VHDL) Transport Delay in Signal Assignment Ignored by Synthesis 27585 (VHDL) Multiple Waveform Elements Not Synthesizable 27587 (VHDL) Unaffected Clause Not Synthesizable 27589 (VHDL) After Clause Ignored by Synthesis 27595 (VHDL) POSTPONED Not Synthesizable 27597 (VHDL) Guarded Expression Not Synthesizable 27598 (VHDL) Explicit Signal GUARD Not Synthesizable 27599 (VHDL) Guarded Signal Assignment Not Synthesizable 27601 (VHDL) Block Header Not Synthesizable 27605 (VHDL) Binding Specification in Component Instantiation Statement Not Synthesizable 27609 (VHDL) Non-synthesizable Pre-defined Attribute 27610 (VHDL) Expression in Attribute Not Synthesizable 27613 (VHDL) Package TEXTIO Not Synthesizable 27615 (VHDL) Wait Statement in Sub-program Not Synthesizable 27617 (VHDL) Use Clause Not Referencing the Entire Package 27619 (VHDL) Physical Type Declaration Ignored by Synthesis 27621 (VHDL) Floating Type Declaration Ignored by Synthesis 27623 (VHDL) File Type Enumeration Not Synthesizable 27625 (VHDL) Severity Level Enumeration Ignored by Synthesis 27627 (VHDL) File Type Declaration Ignored by Synthesis 27629 (VHDL) File in Port Association Not Synthesizable 27631 (VHDL) VHDL-93 Only Syntax Not Synthesizable 27633 (VHDL) Configuration Specification Ignored by Synthesis 27635 (VHDL) Index Name on Unconstrained Object Not Synthesizable 27639 (VHDL) Explicit Inertial Delay Not Synthesizable 27641 (VHDL) Meta-logic Value in Case Choice 27643 (VHDL) Edge Specification in Concurrent Signal Assignment Not Synthesizable 27645 (VHDL) Same Signal Assigned and Referenced in Waveforms Not Synthesizable 27649 (VHDL) Generate Parameter Specification Not Static 27651 (VHDL) Extended Identifier Not Synthesizable 27653 (VHDL) Clock Signal Type Not BIT or STD_ULOGIC 27655 (VHDL) Else Branch Following Edge Condition Not Synthesizable 27657 (VHDL) Statements Outside of Edge-sensitive If Statement Not Synthesizable 27661 Asynchronous Reference in Edge-sensitive Logic 27662 (Verilog) Dual Set or Reset Detected
27663 (VHDL) Unconstrained Port Not Synthesizable 27664 (Verilog) Large Multiplier Inferred 27666 (Verilog) Complex Repeating Statements is Not Allowed 27667 (Verilog) Condition Signal Assigned to 'x' in Default Branch 27668 (Verilog) Arithmetic/Relational Operations Sharing with Large Operand Not Allowed 27669 (Verilog) Timing Path Limited in Two Sub Blocks 27670 (Verilog) Always Block Contains Multiple Resets 27671 (Verilog) Critical Path in Multiple Blocks 27674 (Verilog) Reduce Selectors with Same Contents 27676 (Verilog) Signal Read before Written in Same Always Block 27801 (Verilog) 'iff' Construct Not Synthesizable 27803 (Verilog) Statement Labels Not Synthesizable 27805 (Verilog) Task in 'always_comb' Block 27813 (Verilog) Constructs in $root Not Synthesizable 27821 (Verilog) Incomplete Assignment in 'always_comb' 27823 (Verilog) Event Control Construct in 'always_comb' 27825 (Verilog) Repeated Common Subexpression Not Allowed in 'for' Loop 27829 (Verilog) Unintended Logic Inferred 28101 (Verilog) Both Set and Reset Found for a Flip-flop/Latch 29112 (Verilog) Use Simple Expression for Asynchronous Set or Reset 29113 (Verilog) If Statement Describing Asynchronous Set/Reset should be the Most Beginning Statement in a Always Block 29115 (Verilog) Clock cannot be Explicitly Read in Always Block 29116 (Verilog) Signal Assigned by Independent Statements in a Sequential Block 29118 (Verilog) Do Not Use Integer Variable in Port Expression 29201 (Verilog) Mismatched Synopsys 'translate_on'/'translate_off' Comments 29211 (Verilog) Procedural Continuous Assignment Used in Task/Function 29212 (Verilog) Procedural Continuous Deassign Used in Task/Function 29810 (Verilog) Non-blocking Statement in Function 29818 (Verilog) 'set_dont_touch' Used 29819 (Verilog) Arithmetic Operations in 'for' Loop 29820 (Verilog) Logical or Relational Operations in 'for' Loop 29821 (Verilog) Instance/Module Name Matches Library Cell Name 29822 (Verilog) Library Cell Instantiated 29823 (Verilog) Flip-flop Initialized in Initial Block
DFT
22001 Signal with Multiple Drivers 22002 Three-state Net Not Properly Driven 22007 Constant Connected to Instance 22008 (Verilog) Expression Connected to an Instance Port 22011 Combinational Loop 22013 Asynchronous Loop 22014 Synchronous Loop 22020 Multiple Tri-state Cause Potential Bus Contention 22053 Gated Clock 22054 Inverted Clock 22055 Buffered Clock 22056 Reset Driven by Combinational Logic 22057 Set Driven by Combinational Logic 22058 Reset is Driven by a Path with Potential Glitch 22059 Set Driven by Sequential Logic 22127 Clock Signal Used as Data Input 22128 Clock Signal Feeds into Macro 22129 Clock Signal Used as Reset 22130 Clock Feeds into Primary Output 22131 Clock Driven by Sequential Logic 22132 Clock Active on Both Edges 22134 (Verilog) Clock Feeds into Floating Gate 22181 Multiple Clock Signals 22203 Reset Signal Used as Data Input 22204 Reset Signal Feeds into Primary Output 22205 Reset Driven by Sequential Logic 22227 Set Signal Used as Data Input 22228 Set Signal Feeds into Primary Output 22229 Clock Signal Used as a Control 22231 Clock Signal Used as Set 22269 Combinational Path between Two Registers is Too Long 22271 Report Snake Path 25001 Signal with No Driver 25003 Signal with No Load 25014 (Verilog) Input Signal Not Driven by Flip-Flop 27381 Scan Enable Driven by Combinational Logic 27383 Scan Enable Driven by Sequential Logic 27385 Scan Enable Signal Used as Data Input 27387 Scan Enable Feeds into Primary Output
ERC
23401 (Verilog) Floating Net 23405 (Verilog) Input Floating 23407 (Verilog) Partial Input Floating 23409 (Verilog) Output Floating
Design Style
22001 Signal with Multiple Drivers 22002 Three-state Net Not Properly Driven 22007 Constant Connected to Instance 22008 (Verilog) Expression Connected to an Instance Port 22010 Latch to Latch Connected should be Enabled in Different Phase 22011 Combinational Loop 22013 Asynchronous Loop 22014 Synchronous Loop 22017 Module with No Output 22045 (Verilog) Use Localparam in Module or Interface 22053 Gated Clock 22054 Inverted Clock 22055 Buffered Clock 22056 Reset Driven by Combinational Logic 22057 Set Driven by Combinational Logic 22058 Reset is Driven by a Path with Potential Glitch 22059 Set Driven by Sequential Logic 22061 Unused Object 22063 Two-process Style Not Used for FSM 22067 FSM and Non-FSM Logic in the Same Module 22097 (Verilog) Function Call in Procedural Continuous Assignment 22105 Different Bits of Vector Driven in Different Blocks 22117 Synchronous or Asynchronous Reset Detected 22118 (Verilog) Flip-flops with and without Asynchronous Reset/Set Coexist 22120 (Verilog) Latch should Not Coexist with Other Logic in a Module 22122 (Verilog) Tri-state Buffer should Not Coexist with Other Logic in a Module 22123 (Verilog) Specify Asynchronous Reset Signal with Negedge 22124 (Verilog) Tri-state Output Mixed with Other Logic in a Module 22126 (Verilog) Tri-state Enable Mixed with Other Logic in a Module 22131 Clock Driven by Sequential Logic 22149 Direct Connection from Input to Output 22152 (Verilog) Output Signal Referenced 22153 (Verilog) Multiple Top Modules 22159 Non-constant Delay 22167 Bi-directional Port Declared 22168 (Verilog) Connection between Unidirectional Port and Bidirectional Port 22175 Signal Used as Synchronous and Asynchronous Reset 22176 Signal Used as Synchronous and Asynchronous Set 22181 Multiple Clock Signals
22201 Write Enable Signals for Memories should be Disabled in the Test Mode 22203 Reset Signal Used as Data Input 22204 Reset Signal Feeds into Primary Output 22205 Reset Driven by Sequential Logic 22221 Reset Signal Active High and Low 22223 Set Signal Active High and Low 22225 Clock Signal Used on Both Edges 22227 Set Signal Used as Data Input 22228 Set Signal Feeds into Primary Output 22229 Clock Signal Used as a Control 22231 Clock Signal Used as Set 22233 Signal Used as Set and Reset 22252 (Verilog) Multiple Concatenation Used 22254 (Verilog) Avoid Confusing Self-determined Expressions 22261 Tri-state Inferred in Non-top Module 22263 (Verilog) Null Port Used 22269 Combinational Path between Two Registers is Too Long 22271 Report Snake Path 22273 Separate Different Clock Source Triggered Register in Different Modules 22275 Separate Clock Generate Circuit in Different Modules 22277 Separate Reset Generate Circuit in Different Modules 23001 Bit Select in Sensitivity List 23035 (Verilog) Loop Variable Changed in 'for' Loop 23037 (Verilog) Blocking and Non-blocking Statements in the Same Always Block 23042 Bit of a Bus Signal Used as Special Type Signal 23043 Multiple Bits in Special Type Signal 23044 Special Type Port Connected to an Expression 23121 No Set or Reset Signal 23122 Unassigned in Data Clause 25001 Signal with No Driver 25003 Signal with No Load 25005 (Verilog) Signal has Never been Assigned or Referenced 25007 (Verilog) Signal has been Assigned in More than One Block 25009 Signal with Heavy Fan-out Loading 25011 Input with Heavy Transitive Fan Out of End Points 25013 Output with Heavy Transitive Fan In of Start Points 25015 Outputs Leaving Partition without been Driven by Register 25016 A Combinational Path between PI and PO without Being Registered 25017 (Verilog) Duplicated Names Detected in Ports 27327 (VHDL) Mixed Sequential and Combinational Logic in a PROCESS
27328 (Verilog) Combinational Logic Found in Sequential Block 27329 (Verilog) Unrecommended Continuous Assignment 27331 (VHDL) Constrained Return Expression in Unconstrained Return Type Function 27341 (VHDL) Place Entity, Architecture and Configuration into the Same File 27343 (Verilog) Integer Type Used on Port Instance 27359 (Verilog) Unused Macro 27361 No Falling Active Clock Used 27369 Integer Type Object Detected 27401 Mix Combinational Logic with Sequential Logic 27413 Mutiple Clock Source Not Recommended 27417 No Glue Logic Allowed in Top Module 27421 (Verilog) FSM Stuck in State 27423 (Verilog) Un-reached State from Initial State of FSM 27425 (Verilog) FSM without Initial State 27427 (Verilog) Next State In Default Branch 27827 (Verilog) Declaration of Variable with Assignment 29108 (Verilog) Usage of Specific Keyword(s) Not Allowed 29110 (Verilog) Signals Names of an Identical Signal should Remain the Same throughout the Design Hierarchy. 29114 (Verilog) A Signal is Connected to Both Input and Output Ports of an Instance 29802 (Verilog) Constant Value Assigned to Case Default Clause 29803 (Verilog) Filp-flop Reset Logic in 'for' Loop 29808 (Verilog) Fixed Value of Case Selection Expression 29809 (Verilog) Negative Value Assigned to an Integer 29813 (Verilog) Logical/Arithmetic/BitWise Operation in Case Selection Expression 29814 (Verilog) One Statement in a Single Always Block 29815 (Verilog) Logical Operators Used in Single-bit Operations 29816 (Verilog) Describe Combinational Logic with Functions and an Assignment 29817 (Verilog) Function Called in an Always Block
Language Construct
22003 Bit Width Mismatch in Assignment 22004 Bit Width Mismatch in Bitwise Operation 22005 Loss of Significant Bit 22006 (Verilog) Significant Bits Extended by X/Z/? 22009 (Verilog) Non-zero Bit(s) Truncated 22012 Bit Width Mismatch between Module Port and Instance Port 22015 (Verilog) Zero Bit(s) Omitted 22018 (Verilog) Logic '1' Used to Extend Significant Bits of Constants 22019 (Verilog) Bit Index out of Bus Range 22022 (Verilog) Suspicious Use of Semicolon 22024 (Verilog) Logic '0' Used to Extend Significant Bits of Constants 22026 (Verilog) Zero Bit(s) Truncated 22083 Parameter Bit-width Too Long 22085 No Return Value in a Conditional Branch of a Function 22089 (Verilog) Vector Used in a Single-bit Logical Operation 22091 (Verilog) Multi-bit Expression when One Bit Expression Expected 22098 (Verilog) Deassign with Function Argument 22101 (Verilog) Bit Range Specified for Parameter 22103 (Verilog) Case Label out of Boundary 22104 Bit Width Mismatch in Logic Comparison Operation 22106 (Verilog) Bit Width Mismatch in Comparison of Case Statement 22109 (Verilog) Logical or Bitwise OR Used in Event Control 22119 (Verilog) Logic Expression Used in Sensitivity List 22121 (Verilog) Duplicate Signal Found in Sensitivity List 22125 (Verilog) Bit Range Used on Non-vector Object 22139 (Verilog) Constant Event Expression 22151 (Verilog) Assignment to an Input Signal 22155 Empty Block 22157 Empty Process 22165 Signal Driven by Constant 22169 Unassigned Bits in Function's Return Value 22187 (Verilog) Negative Delay 22199 (Verilog) Reduction Operation on Single-bit Signal 22209 Insufficient Index Variable 22210 (Verilog) Oversized Index Variable 22219 (Verilog) x/z? Used in Case Label 22220 (Verilog) Casez Label Contains X 22243 (Verilog) Default Not Used as the Last Case Label 22249 (Verilog) Variables with Different Bit Widths Used in Conditional Assignment Branches
22251 (Verilog) Integer Used in Concatenation 22255 Task or Function Refers to a Non-local Variable 22259 (Verilog) Loop Variable Not an Integer 22265 (Verilog) Operand Bit Size Mismatch in Addition or Subtraction 22267 (Verilog) Possible Loss of Carry or Borrow in Addition or Subtraction 22268 (Verilog) Possible Loss Value in Multiplication 22301 (Verilog) Zero Implicitly Filled to Higher Bits of LHS Variable in Assignment 22303 (Verilog) Unpacked Signal Bit Width Mismatch in Assignment 23006 (Verilog) Incomplete Case Expression with Default Clause 23007 (Verilog) Case Statement Not Fully Specified 23010 (Verilog) Incomplete Case Expression with Default Clause and Synopsys 'full_case' Directive 23028 (Verilog) Memory is Read and Written at Same Time 23029 Race Condition in Sequential Logic 23030 Race Condition in Combinational Logic 23031 Z or X Used in Conditional Expression 24011 (Verilog) Include Compiler Directive Used 24013 (Verilog) Conditional Compiler Directive Used 24015 Unknown Directive 24019 'dc_shell' Commands Detected 24021 (Verilog) Define Statements should be Put into One File 26001 (Verilog) Too Many Words in Memory 26003 (Verilog) Matching Deassign Statement Not Found 26005 (Verilog) Supply Signal Assigned 26007 (Verilog) Matching Assign Statement Not Found 26009 (Verilog) Event Type Tested by Posedge or Negedge 26011 (Verilog) Matching Release Statement Not Found 26013 (Verilog) Matching Force Statement Not Found 26015 (Verilog) Too Many Bits in Memory 27333 (Verilog) Variables Declared in Automatic Tasks Used with Incorrect Constructs 27345 (Verilog) Size Constant should be Specified for Integer 27665 (Verilog) Bit Width Mismatch in Logical Operation 29805 (Verilog) Use Case for Cases without 'Don't Care' Values 29806 (Verilog) Negative Value Assignment 29807 (Verilog) Fractional Delay Value
HDL Translation
24001 (Verilog) VHDL Reserved Words 24003 (VHDL) Verilog Reserved Words 24005 (Verilog) SystemVerilog Reserved Words 24007 (Verilog) Signal Names Distinguished Only by Letter Case 24011 (Verilog) Include Compiler Directive Used 24013 (Verilog) Conditional Compiler Directive Used 27143 (VHDL) BLOCK Statement Used 27144 (VHDL) GENERATE Statement Used
Coding Style
21023 Unconventional Vector Range Definition 21043 More than One Module Declared in a File 21044 Module Name Different from File Name 22021 Implicit and Confusing Operator Precedence 22023 More than One Statement per Line 22025 Line Too Long 22027 Improper Indentation 22029 TAB Used in Indentation 22031 One Port per Line 22032 Comment Not Found Following Port Declaration 22033 Interspersed Input and Output Declarations 22035 Unconventional Port Declaration Order 22038 Declare One Signal per Line with Comment 22039 Inconsistent Port Order in Definition and Instantiation 22041 (Verilog) Implicit Port Declaration 22043 Connection Ports by Ordered List 22044 Use Explicit Mapping for Parameters 22049 Literal Constant in Range Definition 22107 (Verilog) Redundant Case Labels 22108 (Verilog) Dangling Else 22161 (Verilog) Wire Not Explicitly Declared 22246 (Verilog) Non-blocking Assignment with Delay in Sequential Block 22306 (Verilog) Ambiguous Extension of X/Z 23009 (Verilog) Unreachable Default Branch of Case Statement 24009 Objects with Same Name of Object in Outer Scope 27001 (VHDL) Keywords Not Kept in the Same Line 27027 (VHDL) Pre-defined Identifier Redefined 27028 User Reserved Words Redefined 27029 (VHDL) Missing Entity Name in the END Statement 27031 (VHDL) Missing Architecture Name in the END Statement 27033 (VHDL) Missing Configuration Name in the END Statement 27035 (VHDL) Missing Package Declaration Name in the END Statement 27037 (VHDL) Missing Package Name in the END Statement of Package Body 27039 (VHDL) Missing Sub-program Name in the END Statement 27041 (VHDL) Missing Block Label in the END Statement 27043 (VHDL) Missing Process Label in the END Statement 27044 (VHDL) Missing Generate Statement Label in the END Statement 27045 (VHDL) Missing If Statement Label in the END Statement 27047 (VHDL) Missing Case Statement Label in the END Statement
27049 (VHDL) Missing Loop Statement Label in the END Statement 27051 (VHDL) Missing Component Name in the END Statement 27055 Too Many Lines in a Source File 27069 (VHDL) User-defined Logic Type and its Subtype Not Recommended 27071 (VHDL) Bit or Bit_vector Type Not Recommended 27077 (VHDL) Enumeration Literal Used in Range Specification 27081 (VHDL) 'std_ulogic_vector' Not Recommended 27083 (VHDL) Resolved/Unresolved Type Not Recommended 27085 (VHDL) Constrained Range Used for Array Type 27093 (VHDL) NEXT Statement Used in Loop 27095 (VHDL) EXIT Statement Used in Loop 27099 (VHDL) Composite Record Used as Trigger 27101 (VHDL) Function Returning Dynamically Allocated Memory may Lead to Memory Leak 27105 (VHDL) Attribute Leads to Bad Simulation Performance 27107 (VHDL) WAIT Statement Not the First Statement 27109 (VHDL) Non-event Attribute on Sensitive Signal 27111 (VHDL) Should Rising_Edge or Falling_Edge Function 27115 (VHDL) Integer Type Used 27119 (VHDL) BUFFER Port Used 27124 (VHDL) Initialized Variable Used as a Constant 27130 (Verilog) Variable Updated Twice in Same Time Point 27131 (Verilog) Assignment is Redundant 27143 (VHDL) BLOCK Statement Used 27144 (VHDL) GENERATE Statement Used 27338 (Verilog) Mixed Signed and Unsigned Operands Not Recommended 27339 (Verilog) Sign/Unsigned Conversion in Assignment 27347 Nested Synopsys Translate_on or Translate_off Directive Found 27349 (Verilog) No Comment Added after End Statement 27351 Operator Not Allowed 27353 (Verilog) No Escape Name Used 27357 (Verilog) Module Defined More than Once 27363 (Verilog) 'for' Loop Detected 27365 (Verilog) Casex or Casez Detected 27367 (Verilog) Conditional Assignment Detected 27371 Synopsys Synthesis Directive Detected 27377 Empty Module 27379 (Verilog) Unsigned Vector Compared with a Negative Value 27389 (Verilog) Timescale Missing 27391 (Verilog) 'reg' Declaration Detected 27393 (Verilog) Wire Declaration Detected
27394 (Verilog) 'tri' Declaration Detected 27395 (Verilog) No Direct Usage of Specified Data Types 27397 (Verilog) `define Used to Define Constants 27399 Comment on Synchronous Set or Reset 27411 (Verilog) Use Parameters for FSM State Coding 27412 (Verilog) Too Many States in a FSM 27675 (Verilog) Simple Signal Names for Array Index 27807 (Verilog) Non-void Function Not Declared as Automatic 27815 (Verilog) Incremented/Decremented Variables Used More than Once in the Same Expression 27817 (Verilog) 'always_ff' Not Used for Sequential Blocks 27819 (Verilog) Use 'always_comb' to Model Combinational Behavior 29003 (Verilog) Bus Direction Consist on Port Binding 29005 (Verilog) Too Many Levels of Nested If 29006 (Verilog) Too Many Levels of Nested Case 29100 (Verilog) Preserve Port Order 29101 (Verilog) Declaration of All Internal Nets should Follow the Port I/O Declaration at the Top of the Module 29102 (Verilog) Need Comment before Functional Block 29103 (Verilog) Use One Line Comment 29104 (Verilog) Comment on Cell Instantiation 29105 (Verilog) Comment Synthesis Directives 29106 (Verilog) Check File Header Format 29107 (Verilog) Comment Compiler Directives 29111 (Verilog) Check Construct Header Format 29206 (Verilog) Real Value Compared in Case Item 29801 (Verilog) Nested Text Macro 29804 (Verilog) Number Not execced threshold value 29811 (Verilog) Parameter Base Not Specified Explicitly 29812 (Verilog) Specify Constant Bit Width Explicitly
Naming Convention
21001 Signal Name Case 21003 Variable Name Case 21005 Port Name Case 21007 Signal Name Too Long 21009 Variable Name Too Long 21011 Port Name Too Long 21013 Clock Name Prefix or Suffix 21014 Latch Name Prefix or Suffix 21015 Reset Name Prefix or Suffix 21017 Set Name Prefix or Suffix 21019 Current State Name Prefix or Suffix 21020 Active Low Signal Name Prefix or Suffix 21021 Active High Signal Name Prefix or Suffix 21022 Regular of Active High Signal and Active Low Signal 21025 (Verilog) Port Name does Not Follow the Connected Signal 21027 Register Output Name Prefix or Suffix 21029 Asynchronous Signal Name Prefix or Suffix 21031 Tri-state Signal Name Prefix or Suffix 21035 Register Input Signal Name Prefix or Suffix 21041 Parameter Name Case 21045 File Name Too Long 21047 (Verilog) Names Easy to Get Confused 21049 Process Label Prefix or Suffix 21050 Missing Process Label Name 21051 Instance Name Prefix or Suffix 21053 (Verilog) Gate Name Prefix or Suffix 21055 (Verilog) Identical Module Name and Instance Name 21057 Use the Same Name for All Clocks from Same Source 24007 (Verilog) Signal Names Distinguished Only by Letter Case 27007 (VHDL) Keyword Case 27015 Unconventional File Extension 27063 (VHDL) Name Case of Number Literal 27201 (VHDL) ENTITY Name Length 27203 (VHDL) ENTITY Name Case 27205 (VHDL) ENTITY Name Prefix or Suffix 27209 MODULE Name Length 27211 MODULE Name Case 27213 MODULE Name Prefix or Suffix 27217 (VHDL) PACKAGE Name Length
27219 (VHDL) PACKAGE Name Case 27221 (VHDL) PACKAGE Name Prefix or Suffix 27225 (VHDL) CONFIGURATION Name Length 27227 (VHDL) CONFIGURATION Name Case 27229 (VHDL) CONFIGURATION Name Prefix or Suffix 27233 INSTANCE Name Length 27235 INSTANCE Name Case 27241 (VHDL) COMPONENT Name Length 27245 (VHDL) COMPONENT Name Prefix or Suffix 27249 PROCESS Name Length 27251 PROCESS Name Case 27257 (VHDL) CONSTANT Name Length 27259 (VHDL) CONSTANT Name Case 27261 (VHDL) CONSTANT Name Prefix or Suffix 27265 TYPE Name Length 27267 Case of TYPE Name 27269 Prefix or Suffix of TYPE Name 27273 PARAMETER Name Length 27277 PARAMETER Name Prefix or Suffix 27285 SIGNAL Name Prefix or Suffix 27287 (Verilog) VARIBLE Name 27288 (Verilog) VARIABLE Name Length 27289 (Verilog) FIELD Name 27290 (Verilog) FIELD Name Length 27293 VARIABLE Name Prefix or Suffix 27297 FUNCTION Name Length 27299 FUNCTION Name Case 27301 FUNCTION Name Prefix or Suffix 27305 TASK Name Length 27307 TASK Name Case 27309 TASK Name Prefix or Suffix 27313 (VHDL) BLOCK Name Length 27315 (VHDL) BLOCK Name Case 27317 (VHDL) BLOCK Name Prefix or Suffix 27321 (VHDL) ATTRIBUTE Name Length 27325 (VHDL) ATTRIBUTE Name Prefix or Suffix 27373 Next State Name Prefix or Suffix 27375 IDENTIFIER Name 27415 (Verilog) Specified Delay should be Used 29001 (Verilog) User Defined Primitive should be Named in Lower Case
29002 (Verilog) Instance Name Related to Module Name 29004 (Verilog) Module Name Follow Predefined Pattern 29109 (Verilog) Macro Naming Convention 29204 (Verilog) Instance Name Required for Module
VITAL Compliant
27155 (VHDL) Port Name with Underscore in Top Entity 27159 (VHDL) Range Constraint on Port in Top Entity 27163 (VHDL) Non-std_logic_1164 Type Used on Port in Top Entity
Clock
22051 (Verilog) Generated Reset 22052 (Verilog) Generated Clock 22130 Clock Feeds into Primary Output 22133 (Verilog) Reconverged Clock 27419 Mutiple Resolved Point Not Recommended 28009 End Point Not Generated from a Single Clock Source 28011 Inputs of a Tri-state Bus Not Generated from a Single Clock Source 28015 Tri-state Buffer in a Clock Path
Block Interconnect
27355 (Verilog) Conflict of Hierarchy Interconnection 27356 (Verilog) Block Assembly Error in the Same Hierarchy Level
CTS
25019 (Verilog) Set Sync/Ignore Pin Attribute on Output 25021 (Verilog) CTS ignore pin Attribute Set for All Fan-out Logics of an Instance
21001 (Verilog) Signal Name Case 21001 (VHDL) SIGNAL Name Case
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: signal "%s" should be named in %s case. (VHDL) <filename>(<line no.>): <severity> <rule no.>: SIGNAL "%s" should be named in %s case. Configurable Parameter Rule group: Naming Convention; Argument type: (CASE_UPPER, CASE_LOWER); Argument description: If the argument is set to CASE_UPPER, the rule checks whether the string is in upper case. If the argument is set to CASE_LOWER, the rule checks whether the string is in lower case. Default value: "CASE_LOWER" for Verilog, "CASE_LOWER" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether the signal names, including wires and regs, are all in lower (or upper) case. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 module test (A, b, C); input A, b; //warning on 'A' if CASE_LOWER output C; wire C; //warning on 'C' if CASE_LOWER and and1(C,A,b); endmodule
nLint reports following if the argument value is ("CASE_LOWER"): document.v(2): Warning 21001: signal "A" should be named in CASE_LOWER case. (Naming Convention) document.v(4): Warning 21001: signal "C" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is signal E : bit :='0'; --warning on 'E' if CASE_LOWER end top_ety; architecture arch of top_ety is signal s : bit :='0'; signal A : bit :='0'; --warning on 'A' if CASE_LOWER begin end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(2): Warning 21001: SIGNAL "E" should be named in CASE_LOWER case. (Naming Convention) document.vhd(7): Warning 21001: SIGNAL "A" should be named in CASE_LOWER case. (Naming Convention)
21003 (Verilog) Variable Name Case 21003 (VHDL) VARIABLE Name Case
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: variable "%s" should be named in %s case. (VHDL) <filename>(<line no.>): <severity> <rule no.>: VARIABLE "%s" should be named in %s case. Configurable Parameter Rule group: Naming Convention; Argument type: (CASE_UPPER, CASE_LOWER); Argument description: If the argument is set to CASE_UPPER, the rule checks whether the string is in upper case. If the argument is set to CASE_LOWER, the rule checks whether the string is in lower case. Default value: "CASE_LOWER" for Verilog, "CASE_LOWER" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the variable names, including integer, real and realtime variables, are all in lower (or upper) case. (VHDL) This rule checks whether the variable names are all in lower (or upper) case. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module test (a, b, r, y); input [7:0] a, b; output [7:0] y; reg [7:0] y; integer N; //warning on 'N' if CASE_LOWER always @(a) begin y=0; for (N=0; N<=7; N=N+1) y[N] = a[N] & b[N]; end endmodule
nLint reports following if the argument value is ("CASE_LOWER"): document.v(5): Warning 21003: variable "N" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is shared variable x: integer :=0; shared variable Y: integer :=0; --warning on 'Y' if CASE_LOWER end top_ety; architecture arch of top_ety is shared variable v1: integer :=0; shared variable V2: integer :=0; --warning on 'V2' if CASE_LOWER begin end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(3): Warning 21003: VARIABLE "Y" should be named in CASE_LOWER case. (Naming Convention) document.vhd(8): Warning 21003: VARIABLE "V2" should be named in CASE_LOWER case. (Naming Convention)
21005 (Verilog) Port Name Case 21005 (VHDL) PORT Name Case
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: port "%s" should be named in %s case. (VHDL) <filename>(<line no.>): <severity> <rule no.>: PORT "%s" should be named in %s case. Configurable Parameter Rule group: Naming Convention; Argument type: (CASE_UPPER, CASE_LOWER); Argument description: If the argument is set to CASE_UPPER, the rule checks whether the string is in upper case. If the argument is set to CASE_LOWER, the rule checks whether the string is in lower case. Default value: "CASE_LOWER" for Verilog, "CASE_LOWER" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether the port names are all in lower (or upper) case. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 module test (.PA(a), b, .Pc(c)); //suggest to use ".pa(a), .pc(c)" input a, b; output c; and and1(c, a, b); endmodule
nLint reports following if the argument value is ("CASE_LOWER"): document.v(1): Warning 21005: port "Pc" should be named in CASE_LOWER case. (Naming Convention) document.v(1): Warning 21005: port "PA" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is port(signal s1: in bit :='0'; signal S2: out bit :='0' --warning on 'S2' if CASE_LOWER ); end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(3): Warning 21005: PORT "S2" should be named in CASE_LOWER case. (Naming Convention)
21007 (Verilog) Signal Name Too Long 21007 (VHDL) SIGNAL Name Too Long
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the length of signal name "%s" should not exceed %d characters. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the length of SIGNAL name "%s" should not exceed %d characters. Configurable Parameter Rule group: Naming Convention; Argument type: integer; Argument description: specify the maximum number of characters in a signal name; Default value: "16" for Verilog, "16" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether the length of the signal name exceeds 'length' characters. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 module test; reg a1234567890123456, b; //warning on 'a1234567890123456' wire c; initial begin end endmodule
nLint reports following if the argument value is ("16"): document.v(2): Warning 21007: the length of signal name "a1234567890123456" should not exceed 16 characters. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is signal c1234567890123456 : bit :='0'; --warning on "c1234567890123456" signal c: bit :='0'; end top_ety; architecture arch of top_ety is signal a1234567890123456 : bit :='0'; --warning on "a1234567890123456" signal a : bit :='0'; begin end arch;
nLint reports following if the argument value is ("16"): document.vhd(2): Warning 21007: the length of SIGNAL name "c1234567890123456" should not exceed 16 characters. (Naming Convention) document.vhd(7): Warning 21007: the length of SIGNAL name "a1234567890123456" should not exceed 16 characters. (Naming Convention)
21009 (Verilog) Variable Name Too Long 21009 (VHDL) VARIABLE Name Too Long
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the length of variable name "%s" should not exceed %d characters. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the length of VARIABLE name "%s" should not exceed %d characters. Configurable Parameter Rule group: Naming Convention; Argument type: integer; Argument description: specify the maximum number of characters in a variable name; Default value: "16" for Verilog, "16" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether the length of the variable name exceeds 'length' characters. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 module test (a, b, r, y); input [7:0] a, b; input [2:0] r; output [7:0] y; reg [7:0] y; integer n1234567890123456; // warning on 'n1234567890123456' endmodule
nLint reports following if the argument value is ("16"): document.v(6): Warning 21009: the length of variable name "n1234567890123456" should not exceed 16 characters. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is shared variable e1234567890123456 : bit :='0'; --warning on -- "e1234567890123456" shared variable e : bit :='0'; constant c1234567890123456 : integer :=0; end entity top_ety; architecture arch of top_ety is shared variable a1234567890123456 : bit :='0'; --warning on -- "a1234567890123456" shared variable a : bit :='0'; begin end architecture arch;
nLint reports following if the argument value is ("16"): document.vhd(2): Warning 21009: the length of VARIABLE name "e1234567890123456" should not exceed 16 characters. (Naming Convention) document.vhd(10): Warning 21009: the length of VARIABLE name "a1234567890123456" should not exceed 16 characters. (Naming Convention)
21011 (Verilog) Port Name Too Long 21011 (VHDL) PORT Name Too Long
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the length of port name "%s" should not exceed %d characters. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the length of PORT name "%s" should not exceed %d characters. Configurable Parameter Rule group: Naming Convention; Argument type: integer; Argument description: specify the maximum number of characters in a port name; Default value: "16" for Verilog, "16" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether the length of the port name exceeds 'length' characters. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 module test(.pa123456789012345(a), b, .pc(c));// warning on //'pa123456789012345' input a, b; output c; endmodule
nLint reports following if the argument value is ("16"): document.v(1): Warning 21011: the length of port name "pa123456789012345" should not exceed 16 characters. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is port(signal a : in bit :='0'; signal a1234567890123456 : out bit --warning on --"a1234567890123456" ); end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports following if the argument value is ("16"): document.vhd(3): Warning 21011: the length of PORT name "a1234567890123456" should not exceed 16 characters. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","clk_"): document.v(6): Warning 21013: clock signal name "clock" does not match to regular expression "clk_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 entity top_ety is port ( reset : in bit; clock : in bit; d: in bit; q: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then q<='0'; elsif (clock'event and clock='1') then --warning on 'clock', --'clk_XXX' recommended q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("PREFIX","clk_"): document.vhd(15): Warning 21013: clock signal name "clock" does not match to regular expression "clk_.*". (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_lat"): document.v(5): Warning 21014: latch signal name "latch" does not match to regular expression ".*_lat". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 entity top_ety is end top_ety; architecture arch of top_ety is signal clk,latch,data : bit; begin process (clk) begin if (clk='1') then --warning here latch <= data; end if; end process; end arch;
nLint reports following if the argument value is ("SUFFIX","_lat"): document.vhd(9): Warning 21014: latch signal name "latch" does not match to regular expression ".*_lat". (Naming Convention)
nLint reports following if the argument value is ("PREFIX","rst_"): document.v(8): Warning 21015: reset signal name "reset" does not match to regular expression "rst_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d: in std_logic; q: out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then --warning on 'reset',
17 18 19 20 21 22 23
-- 'rst_XXX' recommended q<='0'; elsif (rising_edge(clock)) then q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("PREFIX","rst_"): document.vhd(16): Warning 21015: reset signal name "reset" does not match to regular expression "rst_.*". (Naming Convention)
nLint reports following if the argument value is ("PREFIX","set_"): document.v(7): Warning 21017: set signal name "preset" does not match to regular expression "set_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is port ( preset : in bit; clock : in bit; d: in bit; q: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,preset) is begin if (preset='1') then --warning on 'preset', -- 'set_XXX' recommended q<='1'; elsif (clock'event and clock='1') then q<=d;
18 19 20
nLint reports following if the argument value is ("PREFIX","set_"): document.vhd(13): Warning 21017: set signal name "preset" does not match to regular expression "set_.*". (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_cs"): document.v(27): Warning 21019: state register name "current" does not match to regular expression ".*_cs". (Naming Convention)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
entity test is port ( reset : in bit; clock : in bit; s: out integer ); end entity test; architecture arch of test is type state_T is (a,b,c,d); begin p1: process (clock,reset) is variable v : state_T :=a; begin if (reset='1') then s<=0; v:=a; elsif (clock'event and clock='1') then case (v) is --warning here; good style if using '_cs' --as suffix of current state signal "v" when a=> s<=1; v:=b; when b=> s<=2; v:=c; when c=> s<=3; v:=d; when others => s<=0; v:=a; end case; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("SUFFIX","_cs"): document.vhd(22): Warning 21019: state register name "v" does not match to regular expression ".*_cs". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 entity top_ety is port ( r: in bit; s: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process(r) is begin if (r='0') then --warning here: good style if using '_n' --for active low reset s<='0'; end if; end process p1; end architecture arch;
document.vhd(11): Warning 21020: active low signal name "r" does not match to regular expression ".*_n". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 entity top_ety is port ( r : in bit; s: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (r) is begin if (r='1') then --warning on "r", --good style if using '_p' for active high reset s<='0'; end if; end process p1; end architecture arch;
document.vhd(11): Warning 21021: active high signal name "r" does not match to regular expression ".*_p". (Naming Convention)
21 22 23 24 25 26
nLint reports following if the argument value is ("TRUE,RESET_LOW,rst_.*_n;FALSE,RESET_HIGH, rst_.*_p;TRUE,SET_LOW,set_.*_n; TRUE,SET_HIGH,set_.*_p; FALSE, LATCH_ENABLE_LOW; FALSE,LATCH_ENABLE_HIGH; FALSE,TRI_ENABLE_LOW; FALSE,TRI_ENABLE_HIGH"): document.v(7): Warning 21022: active low reset signal name "rst1" does not follow the regular expression "rst_.*_n". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 entity top_ety is end top_ety; architecture arch of top_ety is signal rst,rst1,rst_test_n: bit; signal s,s1,s2: bit; begin p1: process(rst) is begin if (rst='0') then --warning here s<='0'; end if; end process p1; p2: process(rst1) is begin if (rst1='1') then s1<='0'; end if; end process p2;
--no warning
p3: process(rst_test_n) is begin if (rst_test_n='0') then s2<='0'; end if; end process p3; end arch;
--no warning
nLint reports following if the argument value is ("TRUE,RESET_LOW,rst_.*_n;FALSE,RESET_HIGH, rst_.*_p;TRUE,SET_LOW,set_.*_n; TRUE,SET_HIGH,set_.*_p; FALSE, LATCH_ENABLE_LOW; FALSE,LATCH_ENABLE_HIGH; FALSE,TRI_ENABLE_LOW; FALSE,TRI_ENABLE_HIGH"): document.vhd(10): Warning 21022: active low reset signal name "rst" does not follow the regular expression "rst_.*_n". (Naming Convention)
nLint reports following if the argument value is ("ZERO_BOUND","DOWN_TO"): document.v(3): Warning 21023: descending bit order and zero bound are not used for range declaration of "B". (Coding Style) document.v(4): Warning 21023: descending bit order and zero bound are not used for range declaration of "C". (Coding Style) document.v(5): Warning 21023: descending bit order and zero bound are not used for range declaration of "Q". (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 entity top_ety is end entity top_ety; architecture arch of top_ety is type array1 is array (1 to 8) of bit; --warning on "(1 to 8)", --"(7 downto 0)" is recommended type array2 is array (natural range<>) of bit; subtype array2_s is array2 (1 to 16); --warning on "(1 to 16)", --"(15 downto 0)" is recommended signal s1 : array1; signal s2 : array2_s; signal s3 : array2(1 to 32); --warning on "(1 to 32)", --"(31 downto 0)" is recommended begin end architecture arch;
nLint reports following if the argument value is ("ZERO_BOUND","DOWN_TO"): document.vhd(5): Warning 21023: descending bit order and zero bound are not used for range declaration of "array1". (Coding Style) document.vhd(8): Warning 21023: descending bit order and zero bound are not used for range declaration of "array2_s". (Coding Style) document.vhd(13): Warning 21023: descending bit order and zero bound are not used for range declaration of "s3". (Coding Style)
21025 (Verilog) Port Name does Not Follow the Connected Signal
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: port "%s" and its connection "%s" should be similar. Configurable Parameter Rule group: Naming Convention; Argument type: (CHECK_LIB_CELL, IGNORE_LIB_CELL); Argument description: When checking port with the low-connected net, the argument will only be valid when the option -lint_cell_lib is turned ON, because the port and the low-connected net are both in the same module. Set the argument to IGNORE_LIB_CELL to filter the violations in lib cells; or set it as CHECK_LIB_CELL to check lib cells. When checking port instance with highconnected net, if the module of the instance is a lib cell and the instance itself is not in the lib cell, set the argument as CHECK_LIB_CELL to check the port instance name, or set it as IGNORE_LIB_CELL to not check the port instance name. If the instance itself is also included in a lib cell, the port instance name will be checked only when the -lint_lib_cell option is turned ON; Default value: "IGNORE_LIB_CELL" for Verilog; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether names of ports follow their connected signals. For a port and its low connection, checking of this rule is case insensitive. The port name should be the same as its lower signal name, or be sub-string of the signal name, and vice versa. For a port instance and its high connection, checking of this rule is case sensitive, and the lower name should be the same as the upper name, or be a sub-string of the upper name. Example
(Verilog) ///////////////example : document.v//////////// 1 module test; 2 reg ck,reset; 3 wire [8:0] count; 4 5 block cc (.clk(ck),.RESET(reset),.counti(count)); //warning on clk, RESET and counti 6 endmodule 7 8 module block(.clk(clock),.RESET(reset),.counti(count)); //warning on clk 9 input clock,reset; 10 output [8:0] count; 11 reg [8:0] count; 12 13 initial 14 count<=0; 15 16 always@( posedge clock or negedge reset) begin 17 if ( ~reset ) 18 count = 0; 19 else 20 count= count + 1; 21 end 22 endmodule
nLint reports following if the argument value is ("IGNORE_LIB_CELL"): document.v(5): Warning 21025: port "counti" and its connection "count" should be similar. (Naming Convention) document.v(5): Warning 21025: port "RESET" and its connection "reset" should be similar. (Naming Convention)
document.v(5): Warning 21025: port "clk" and its connection "ck" should be similar. (Naming Convention) document.v(8): Warning 21025: port "clk" and its connection "clock" should be similar. (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_r"): document.v(6): Warning 21027: register ouput name "dataout" does not match to regular expression ".*_r". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity top_ety is port ( reset : in bit; clock : in bit; d: in bit; q: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then q<='0'; --warning on 'q', 'q_r' recommended elsif (clock'event and clock='1') then q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("SUFFIX","_r"): document.vhd(14): Warning 21027: register ouput name "q" does not match to regular
nLint reports following if the argument value is ("SUFFIX","_a"): document.v(8): Warning 21029: asynchronous signal name "rst_pa" does not match to regular expression ".*_a". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 entity top_ety is port ( reset : in bit; clock : in bit; d: in bit; q: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then --using _p for active high reset --as well as _a for asynchronous reset q<='0'; elsif (clock'event and clock='1') then
17 18 19 20
nLint reports following if the argument value is ("SUFFIX","_a"): document.vhd(13): Warning 21029: asynchronous signal name "reset" does not match to regular expression ".*_a". (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_z"): document.v(9): Warning 21031: tri-state ouput signal name "q" does not match to regular expression ".*_z". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( enable : in bit; d: in std_ulogic; q: out std_ulogic ); end entity top_ety; architecture arch of top_ety is begin p1: process (enable,d) is begin
15 16 17 18 19 20 21
if (enable='1') then q<=d; --warning on 'q', 'q_z' is recommended else q<='Z'; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("SUFFIX","_z"): document.vhd(16): Warning 21031: tri-state ouput signal name "q" does not match to regular expression ".*_z". (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_nxt"): document.v(7): Warning 21035: register input signal name "datain" does not match to regular expression ".*_nxt". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity top_ety is port ( reset : in bit; clock : in bit; d: in bit; q: out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then q<='0'; elsif (clock'event and clock='1' ) then q<=d; --warning on 'd', 'd_nxt' is recommended end if; end process p1; end architecture arch;
document.vhd(16): Warning 21035: register input signal name "d" does not match to regular expression ".*_nxt". (Naming Convention)
21041 (Verilog) Parameter Name Case 21041 (VHDL) GENERIC Name Case
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: parameter "%s" should be named in %s case. (VHDL) <filename>(<line no.>): <severity> <rule no.>: GENERIC "%s" should be named in %s case. Configurable Parameter Rule group: Naming Convention; Argument type: (CASE_UPPER, CASE_LOWER); Argument description: If the argument is set to CASE_UPPER, the rule checks whether the string is in upper case. If the argument is set to CASE_LOWER, the rule checks whether the string is in lower case. Default value: "CASE_UPPER" for Verilog, "CASE_UPPER" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the parameters are all in upper (or lower) case. (VHDL) This rule checks whether the generics are all in upper (or lower) case. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 module test (clock, reset, control, y); input clock, reset, control; output [2:0] y; parameter st0 = 0; //warning on st0; ST0 is recommended reg [1:0] current, next; endmodule
nLint reports following if the argument value is ("CASE_UPPER"): document.v(5): Warning 21041: parameter "st0" should be named in CASE_UPPER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is generic (n: integer := 10; --warning on 'n', 'N' is recommended M: bit :='0' ); begin end top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports following if the argument value is ("CASE_UPPER"): document.vhd(2): Warning 21041: GENERIC "n" should be named in CASE_UPPER case. (Naming Convention)
21043 (Verilog) More than One Module Declared in a File 21043 (VHDL) More than One Primary Unit in a File
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: only one module can be declared in a file, modules: "%s". (VHDL) <filename>(<line no.>): <severity> <rule no.>: only one primary unit can be declared in a file, primary units: "%s". Configurable Parameter Rule group: Coding Style; Argument type: (CHECK_LOCALTOP_ONLY, CHECK_ALL_MODULE); Argument description: select CHECK_ALL_MODULE to check all modules in a file;select CHECK_LOCALTOP_ONLY to check only local top modules in a file; Default value: "CHECK_ALL_MODULE" for Verilog, "CHECK_ALL_MODULE" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether each source file contains only one module.If argument CHECK_ALL_MODULE is selected,all modules will be checked. While if argument CHECK_LOCALTOP_ONLY is selected,only local top modules will be checked, and all other modules will be ignored. Local top module means the first hierarchy module comparing with others in the same file. Under argument CHECK_LOCALTOP_ONLY,if more than one local top module is defined in a file,this rule will be violated; if more than one module is defined,but only one is local top module,this rule will not be violated. (VHDL) This rule checks whether each source file contains only one primary unit (package, entity, configuration). Example
(Verilog) ///////////////example : document.v//////////// 1 //only one local top module is defined in the file 2 //specify argument CHECK_LOCALTOP_ONLY, so 21043 does not report any warning 3 module testini; 4 wire a,b,c; 5 test u_test_0 (a,b,c); 6 endmodule 7 8 module test(a,b,c); 9 input a,b; 10 output c; 11 and and1 (c,a,b); 12 endmodule 13
4 5 6 7 8 9 10 11 12 13 14 15 16
entity EA is --warning on 'EA' end entity EA; architecture arch of EA is begin end architecture arch; entity top_ety is --warning on 'top_ety' end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports following if the argument value is ("CHECK_ALL_MODULE"): document.vhd(1): Warning 21043: only one primary unit can be declared in a file, primary units: "ea, top_ety, ...". (Coding Style)
21044 (Verilog) Module Name Different from File Name 21044 (VHDL) Primary Unit Name Different from File Name
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: module name "%s" should be same as file name. (VHDL) <filename>(<line no.>): <severity> <rule no.>: primary unit name "%s" should be same as file name. Configurable Parameter Rule group: Coding Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the module name is the same as the file name. This rule is associated with the rule 21043. If the original design violates 21043,this rule will be ignored and nLint only report rule 21043. (VHDL) This rule checks whether the file name is the same as the primary unit (entity, package) name . Example
(Verilog) ///////////////example : document.v//////////// 1 will 2 3 4 5 6 7 8 9 10 11 12 13 14 15 //in rs file, specify agrument CHECK_LOCALTOP_ONLY for rule 21043,so nLint //only check local top module //in current file, there is only one local top module is declared, //that is "testini", so 21043 is not violated and 21044 will report warning module testini; wire a,b,c; test u_test_0 (a,b,c); endmodule module test(a,b,c); input a,b; output c; and and1 (c,a,b); endmodule
nLint reports: document.v(6): Warning 21044: module name "testini" should be same as file name. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 -- File Name document.vhd entity top_ety is --warning on 'top_ety' end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports: document.vhd(2): Warning 21044: primary unit name "top_ety" should be same as file name. (Coding Style)
nLint reports following if the argument value is ("8","3"): ///////////////example : document.verilog//////////// 1 2 3 4 //File: document.verilog //the extension is too long module test(); endmodule
nLint reports following if the argument value is ("8","3"): document.verilog(1): Warning 21045: the length of file name "document.verilog" should not exceed 8.3 characters. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 --the file name document.vhd is satisfied entity top_ety is end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("8","3"): -------------------example : document123.vhdl------------1 2 -- File: document123.vhdl --do not use such filename. entity top_ety is
3 4 5 6 7
nLint reports following if the argument value is ("8","3"): document123.vhdl(1): Warning 21045: the length of file name "document123.vhdl" should not exceed 8.3 characters. (Naming Convention)
//warning, confusing with "tb1m" //no warning, although confusing with "ta1m" //but "ta1m" is signa, and "ta3m" is instance
function integer aa1; ; endfunction task aa2; //warning, confusing with "aa1" ; endtask always begin :ba1 end always begin :ba2 end endmodule module test1; endmodule
nLint reports following if the argument value is ("a1,a2,a3; b1,b2; c1,c2; o"): document.v(4): Warning 21047: signal name "ta2m" is confusing with "ta1m", and should not be used. (Naming Convention) document.v(5): Warning 21047: signal name "o" is confusing, and should not be used. (Naming Convention) document.v(8): Warning 21047: instance name "tb2m" is confusing with "tb1m", and should not be used. (Naming Convention) document.v(15): Warning 21047: procedure name "aa2" is confusing with "aa1", and should not be used. (Naming Convention) document.v(21): Warning 21047: block name "ba2" is confusing with "ba1", and should not be used. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is end entity top_ety; architecture arch of top_ety is begin p1: process is --warning on 'p1', using a meaningful name --like XXX_PROC begin wait; end process; end architecture arch;
nLint reports following if the argument value is ("SUFFIX","_PROC"): document.vhd(9): Warning 21049: process name "p1" does not match regular expression ".*_PROC". (Naming Convention)
nLint reports following if the argument value is ("INITIAL, ALWAYS, ALWAYS_COMB, ALWAYS_FF, ALWAYS_LATCH, GENERATE, IF"): document.v(4): Warning 21050: process should be named. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is end entity top_ety; architecture arch of top_ety is begin process --warning here( should name the process) begin wait; end process; end architecture arch;
nLint reports following if the argument value is (""): document.vhd(9): Warning 21050: process should be named. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","U_"): document.v(5): Warning 21051: module instance name "test_0" does not match to regular expression "U_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library IEEE; use IEEE.std_logic_1164.all; entity EA is end EA; architecture arch of EA is begin end arch; entity top_ety is end entity top_ety; architecture arch of top_ety is component EA end component EA; begin u: component EA; --warning on 'u', using 'u_EA_0' instead end architecture arch;
nLint reports following if the argument value is ("PREFIX","U_"): document.vhd(18): Warning 21051: module instance name "u" does not match to regular expression "U_.*". (Naming Convention)
nLint reports following if the argument value is ("PREFIX","gate_"): document.v(4): Warning 21053: gate or primitive instance name "and1" does not match to regular expression "gate_.*". (Naming Convention)
nLint reports: document.v(4): Warning 21055: instance name "test" should not be the same as the module name. (Naming Convention)
21057 Use the Same Name for All Clocks from Same Source
Message <filename>(<line no.>): <severity> <rule no.>: clock signal "%s" is not named same or similar with the name of clock source "%s". Configurable Parameter Rule group: Naming Convention; Argument type: (PREFIX, SUFFIX, SUB_STRING, REGEXPR); Argument description: select PREFIX to specify that the clock signal should be named with clock source name as prefix; select SUFFIX to specify that the clock signal should be named with clock source name as suffix; select SUB_STRING to specify that the clock signal should be named with clock source name as sub-string; Default value: "PREFIX" for Verilog, "PREFIX" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether any clock signal is not named the same or similar with its clock source. This rule will be only checked after clock domain is available. Only the resolved clock domain will be checked. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 module MyReg (cp, in, out); input cp, in; output out; reg out; always @ ( posedge cp ) begin out = in; end endmodule module test (clk, in, out); input clk, in; output out; MyReg i_reg ( clk, in, out ); endmodule
nLint reports following if the argument value is ("PREFIX"): document.v(2): Warning 21057: clock signal "test.i_reg.cp" is not named same or similar with the name of clock source "test.clk". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 library ieee; use ieee.std_logic_1164.all; entity top_ety is port(clock : in std_logic; reset : in std_logic; data_in : in std_logic; data_out : out std_logic ); end;
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
architecture arch of top_ety is signal clock_b : std_logic; -- warning here begin process (clock_b, reset) begin if (reset = '0' ) then data_out <= '0'; elsif ( clock_b'event and clock_b = '1' ) then data_out <= data_in; end if; end process; clock_b <= not(clock); end; -- rs: vhdl_val = SUFFIX
nLint reports: document.vhd(12): Warning 21057: clock signal "top_ety.clock_b" is not named same or similar with the name of clock source "top_ety.clock". (Naming Convention)
nLint reports following if the argument value is ("CHECK_FLOATING"): document.v(4): Error 22001: multiple drivers for signal "a" are detected. (DFT) document.v(5): Error 22001: multiple drivers for signal "z" are detected. (DFT)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is end entity top_ety; architecture signal s0: signal s1: signal s2: signal en: begin arch of top_ety is std_logic:='0'; std_logic:='0'; std_logic:='0'; --multiple driver detected on 's2' std_logic;
13 14 15 16 17 18 19 20 21 22 23 24 25 26
p1: process(s0,en) is begin if (en = '1') then s2<=s0; end if; end process p1; p2: process(s1,en) is begin if (en = '1') then s2<=s1; end if; end process p2; end architecture arch;
nLint reports following if the argument value is ("IGNORE_FLOATING"): document.vhd(10): Error 22001: multiple drivers for signal "s2" are detected. (DFT,Design Style)
nLint reports: document.v(3): Error 22002: three-state net "o" is not properly driven. (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library ieee; use ieee.std_logic_1164.all; entity top_ety is port(e : in std_logic; d1 : in std_logic; d2 : in std_logic; q : out std_logic); end top_ety; architecture arch of top_ety is begin q <= d2; process(e, d1) is begin if (e = '1') then q <= d1; else q <= 'Z'; end if; end process; end arch;
nLint reports: document.vhd(8): Error 22002: three-state net "q" is not properly driven. (DFT,Design Style)
nLint reports following if the argument value is ("LHS_EQ_RHS"): document.v(5): Error 22003: bit width of left-hand-side variable "a"(4) does not match that of right-hand-side variable "b"(3) in the assignment. (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is end entity top_ety; architecture arch of top_ety is signal A : bit_vector(1 downto 0); signal B : bit_vector(2 downto 0); begin process( A ) begin B <= A; -- warning here end process; end architecture arch;
nLint reports following if the argument value is ("VAR_GE_CON"): document.v(8): Error 22004: bit width of operand "a"(3) does not match that of operand "b"(4) in bitwise operation. (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library IEEE; use IEEE.STD_Logic_1164.all, IEEE.Numeric_STD.all; entity top_ety is port ( Bus1: in unsigned(5 downto 0) ); end top_ety; architecture arch of top_ety is signal Bus2: unsigned(23 downto 0); signal Bus12: unsigned(5 downto 0); begin PRC1: process (Bus1, Bus2) begin Bus12 <= Bus1 and Bus2; -- warning on "Bus1" and "Bus2" end process PRC1; end arch;
nLint reports following if the argument value is ("VAR_GE_CON"): document.vhd(16): Error 22004: bit width of operand "Bus1"(6) does not match that of operand "Bus2"(24) in bitwise operation. (Language Construct)
nLint reports following if the argument value is ("CONSTANT"): document1.v(8): Error 22005: significant bit of operand "7" lost due to mismatched width assignment or shift operation. (Simulation,Language Construct) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 module test (clk, y); input clk; output [7:0] y; reg [7:0] y; parameter a = 8'b00111101; always @(posedge clk) y = a << 3; //warning on "a" endmodule
nLint reports following if the argument value is ("CONSTANT"): document2.v(7): Error 22005: significant bit of operand "a" lost due to mismatched width assignment or shift operation. (Simulation,Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 entity top_ety is end top_ety; architecture arch of top_ety is
5 6 7 8 9 10 11 12
signal C : bit_vector(1 downto 0); begin process begin C <= 6; -- warning here end process; end arch;
nLint reports: document.v(5): Warning 22006: x/z/? used to extend the significant bits of constant "8'bx001". (Simulation,Language Construct)
nLint reports following if the argument value is ("INPUT,OUTPUT"): document.v(4): Warning 22007: port should not be connected to a constant "1". (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 library IEEE; use IEEE.std_logic_1164.all; entity Com is port (s1:in bit; s2: in bit; s3: out bit); end Com; architecture arch of Com is begin process begin s3 <= s1 & s2; end process; end arch; entity top_ety is end entity top_ety; architecture signal s1: signal s2: signal s3: arch of top_ety is bit:='0'; bit:='0'; bit:='0';
component Com is port (s1:in bit; s2: in bit; s3: out bit); end component Com; begin u_Com_0: component Com
29 30 31 32
port map (s1=>s1, s2=>'0', --warning on "0" as actual part s3=>s3); end architecture arch;
nLint reports following if the argument value is ("INPUT,OUTPUT"): document.vhd(30): Warning 22007: port should not be connected to a constant "0". (DFT,Design Style)
nLint reports: document.v(4): Warning 22008: the instance port is connected to an expression "(b1 + b2)". (DFT,Design Style)
nLint reports: document.v(11): Error 22009: non-zero bit(s) truncated by the size specified in literal "7'hFE". (Simulation,Language Construct)
nLint reports: document.v(16): Warning 22010: latch "top.s1.q"(document.v(16)) to latch "top.s2.q" should be enabled in different phase. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library ieee; use ieee.std_logic_1164.all; entity sub is port (latch, c: in std_logic; q : out std_logic); end sub; architecture arch of sub is begin Process (latch, c) begin if (latch = '1') then q <= c; end if; end Process;
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
end arch; library ieee; use ieee.std_logic_1164.all; entity top_ety is port (a3: out std_logic ); end top_ety; architecture arch of top_ety is component sub port (latch, c : in std_logic; q : out std_logic); end component; signal a1, a2, c : std_logic; signal tri, latch : std_logic_vector(1 downto 0); begin sub1 : sub port map (latch => latch(0), c => c, q => a2); sub2 : sub port map (latch => latch(0), c => a1, q => a3); a1 <= a2; end arch;
nLint reports: document.vhd(11): Warning 22010: latch "top_ety.sub1.q"(document.vhd(11)) to latch "top_ety.sub2.q" should be enabled in different phase. (Design Style)
nLint reports following if the argument value is ("SYNC"): document.v(5): Warning 22011: combinational loop is detected on signal "test.c". (Simulation,DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 entity com_T is port (a1 : in bit; a2 : out bit ); end entity com_T; architecture arch of com_T is begin a2<=a1; end architecture arch; use work.all; entity top_ety is port (s1 : in bit; s2 : out bit ); end entity top_ety; architecture arch of top_ety is signal x : bit; signal y : bit; component com_T is port (a1 : in bit; a2 : out bit );
27 28 29 30 31 32 33 34 35 36 37
end component com_T; begin u0: component com_T port map (a1=>x,a2=>y); process (s1) is begin x<=y; --warning on 'x->y->x' s2<=s1 and x; end process; end architecture arch;
nLint reports following if the argument value is ("SYNC"): document.vhd(30): Warning 22011: combinational loop is detected on signal "top_ety.x". (Simulation,DFT,Design Style)
22012 Bit Width Mismatch between Module Port and Instance Port
Message <filename>(<line no.>): <severity> <rule no.>: instant port size "%s"(%d) differs from module port declaration "%s"(%d). Configurable Parameter Rule group: Language Construct; Argument type: (VAR_EQ_CON, VAR_GE_CON); Argument description: The argument allows users to loosen the mismatch checking. Setting the argument to VAR_GE_CON allows bit width of module port to be greater or equal to instance port. Otherwise, default argument VAR_EQ_CON teats any bit width mismatch as a violation; Default value: "VAR_EQ_CON" for Verilog, "VAR_EQ_CON" for VHDL; Default severity : Level2 (Warning) Description This rule checks whether there is any mismatch of bit width between instance port and its connected module port. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 module Example7_16b_ff (q, ck, d); // synopsys template parameter w = 1; input ck; input [w-1:0] d; output [w-1:0] q; reg [w-1:0] q; always @(posedge ck) q <= d; endmodule // Example7_16b_ff module Example7_16b (r_head, r_head2, ck, c_head); output [3:0] r_head; output [3:0] r_head2; input ck; input [3:0] c_head; Example7_16b_ff #(3) reg_head ( .d(c_head), .ck(ck), .q(r_head)); Example7_16b_ff #(5) reg_head2 ( .d(c_head), .ck(ck), .q(r_head2)); endmodule // Example7_16b //warning
//warning
nLint reports following if the argument value is document.v(18): Warning 22012: instant port size port declaration "q"(3). (Language Construct) document.v(18): Warning 22012: instant port size port declaration "d"(3). (Language Construct) document.v(23): Warning 22012: instant port size port declaration "q"(5). (Language Construct) document.v(23): Warning 22012: instant port size port declaration "d"(5). (Language Construct)
("VAR_EQ_CON"): "r_head"(4) differs from module "c_head"(4) differs from module "r_head2"(4) differs from module "c_head"(4) differs from module
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 library ieee; use ieee.std_logic_1164.all; entity rom0 is generic (N : integer := 1); port (dout : out std_logic_vector(N downto 0)); end; architecture arch of rom0 is begin end; library ieee; use ieee.std_logic_1164.all; entity top_ety is end; architecture arch of top_ety is component rom0 generic (N : integer := 1); port( dout: out std_logic_vector(N downto 0)); end component; signal i_dff300_creg_l304_1_port : std_logic_vector(3 downto 0); begin i_rom0 : rom0 generic map (N => 2) port map (dout =>i_dff300_creg_l304_1_port); --warning i_rom1 : rom0 generic map (N => 4) port map (dout =>i_dff300_creg_l304_1_port); --warning end;
nLint reports following if the argument value is ("VAR_EQ_CON"): document.vhd(26): Warning 22012: instant port size "i_dff300_creg_l304_1_port"(4) differs from module port declaration "dout"(3). (Language Construct) document.vhd(28): Warning 22012: instant port size "i_dff300_creg_l304_1_port"(4) differs from module port declaration "dout"(5). (Language Construct)
nLint reports: document.v(16): Warning 22013: asynchronous loop detected on signal "test.count". (Simulation,DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 entity top_ety is port (clk : in bit; count : out integer); end entity top_ety; architecture arch of top_ety is signal i_rst: bit:='0'; signal c: integer:=0; begin p1 : process (i_rst, clk) begin if (i_rst = '1') then c <= 0; elsif (clk'event and clk = '1') then c <= c + 1;
16 17 18 19 20 21 22 23 24 25 26 27 28
end if; end process p1; p2: process ( c ) is begin if (c >= 10) then i_rst <= '1'; --warning on 'i_rst->c->i_rst' else i_rst <= '0'; end if; count<=c; end process; end architecture arch;
nLint reports: document.vhd(21): Warning 22013: asynchronous loop detected on signal "top_ety.c". (Simulation,DFT,Design Style)
nLint reports following if the argument value is ("FALSE"): document.v(9): Warning 22014: synchronous loop without set/reset detected on signal "test.count". (Simulation,DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is port (clk : in bit; count : out integer); end entity top_ety; architecture arch of top_ety is signal i_rst: bit:='0'; signal c: integer:=0; begin p1 : process (clk) begin if ( clk'event and clk = '1' ) then c <= c + 1; -- warning here end if; end process p1; count <= c;
18
nLint reports following if the argument value is ("FALSE"): document.vhd(13): Warning 22014: synchronous loop without set/reset detected on signal "top_ety.c". (Simulation,DFT,Design Style)
nLint reports: document.v(9): Warning 22015: zero bit(s) omitted in literal "2'b1". (Language Construct)
nLint reports: document.v(9): Warning 22016: apparent feedback detected on signal "test.c". (Simulation) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 module test (a, d); input a; output d; reg b, d; wire c; always @(a or c) begin
8 9 10 11 12 13 14 15
b = a; d = c; end assign c = a & b; endmodule //In above case, the change of 'c' will cause the always block be //evaluated again. Following is a way to fix the problem.
nLint reports: document1.v(9): Warning 22016: apparent feedback detected on signal "test.c". (Simulation) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test (a, d); input a; output d; wire b, d; wire c; assign b = a; assign d = c; assign c = a & b; endmodule //After modification, the change of 'c' will only cause the //assignment of 'd' to be evaluated again, which is expected.
nLint reports:
22017 (Verilog) Module with No Output 22017 (VHDL) Entity with No Output
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: no output found for module "%s". (VHDL) <filename>(<line no.>): <severity> <rule no.>: no output found for entity "%s". Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) Description (Verilog) This rule checks whether there are any modules without output ports. (VHDL) This rule checks whether there are any entities without output ports. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 module test (a, b, c); //no output for module test input a, b, c; endmodule
nLint reports: document.v(1): Warning 22017: no output found for module "test". (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is port (clk : in bit; reset : in bit); --warning here, no output port for --entity 'top_ety' end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports: document.vhd(1): Warning 22017: no output found for entity "top_ety". (Design Style)
nLint reports: document.sv(4): Warning 22018: logic '1' is used to extend the significant bits of constant "8'sb100". (Simulation,Language Construct) document.sv(9): Warning 22018: logic '1' is used to extend the significant bits of constant "8'so40". (Simulation,Language Construct) document.sv(13): Warning 22018: logic '1' is used to extend the significant bits of constant "8'sh8". (Simulation,Language Construct)
nLint reports: document.v(9): Error 22019: bit index "[2]" is out of the declared bus range for signal "a[2]". (Simulation,Synthesis,Language Construct)
nLint reports: document1.v(5): Warning 22020: multiple tri-states detected on signal "out". (DFT) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 //Ex2 module test1 (sel1, sel2, a, out); input sel1, sel2, a; output out; wire out,temp; assign out = sel1? temp: 1'bz; //the data source is 'a' assign out = sel2? a: 1'bz; //the data source is also 'a', no warning assign temp = a; endmodule
nLint reports: ///////////////example : document3.v//////////// 1 2 3 4 5 //Ex3 module test4 (sel1, a, b, out); input sel1, a, b; output out; wire out, tmp;
6 7 8 9 10 11
assign out = sel1? a: 1'bz; assign out = tmp? b: 1'bz; not (tmp, sel1); //the enable pin of 'sel1' and 'tmp' are //logically inverted, no warning. endmodule
nLint reports: ///////////////example : document4.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 of the 13 14 //Ex4 module test3 (sel1, sel2, a, b, TM, out); input sel1, sel2, a, b, TM; output out; wire tmp1, tmp2; not U_1(tmp1, TM); assign tmp2 = sel1 & tmp1; assign out = tmp2? a: 1'bz; assign out = sel2? b: 1'bz; endmodule //no warning, if we set TM as 1. the 'tmp2' becomes 0, thus one //driver will be high-impendence.
nLint reports:
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (sel1: in std_logic; sel2: in std_logic; a: in std_logic; b: in std_logic; q: out std_logic); --warning here end top_ety; architecture arch of top_ety is begin process(sel1, a) is begin if (sel1 = '1') then q <= a; else q <= 'Z'; end if; end process; process(sel2, b) is begin if (sel2 = '1') then q <= b; else q <= 'Z'; end if; end process; end arch;
nLint reports: document.vhd(9): Warning 22020: multiple tri-states detected on signal "q". (DFT)
nLint reports: document.v(8): Warning 22021: the operator precedence in the expression is suspicious; it is interpreted as "((a != b) & c)". (Coding Style) document.v(9): Warning 22021: the operator precedence in the expression is suspicious; it is interpreted as "((a << 2) | b)". (Coding Style) document.v(11): Warning 22021: the operator precedence in the expression is suspicious; it is interpreted as "(b << (2 + c))". (Coding Style) document.v(12): Warning 22021: the operator precedence in the expression is suspicious; it is interpreted as "((g + h) ? i : j)". (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity top_ety is port ( A : in bit_vector(3 downto 0); B : in bit_vector(3 downto 0); C : out integer; D : out bit_vector(3 downto 0) ); end top_ety; architecture arch of top_ety is begin process (A, B) begin if ( A /= (B or "1111") ) then -- good style C <= 5 + 2 ** 2; elsif ( (A or B) = "0000" ) then -- good style C <= 0; end if; D <= A and B sll 2; -- warning here;
20 21 22 23
-- compiler treat it as "A and (B sll 2)" end process; end arch;
nLint reports: document.vhd(19): Warning 22021: the operator precedence in the expression is suspicious; it is interpreted as "(A and (B sll 2))". (Coding Style)
nLint reports: document1.v(29): Warning 22022: suspicious usage of semicolon detected. (Language Construct) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 module initval; reg sel; reg [7:0] a,b,c; wire [7:0] y; initial begin $monitor($time,,,,,,,"sel=%d,a=%d,b=%d,c=%d,y=%d",sel, a, b, c, y);
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
a<=12; b<=13; c<=14; sel<=1; #200 $finish; end always # 20 sel = ~sel; test cc (sel,a,b,c,y); endmodule module test (sel,a,b,c,y); input sel; input [7:0] a,b,c; output [7:0] y; reg [7:0] y; reg [7:0] temp; always@( sel or a or b or c) begin temp = 0; if ( sel ) temp = b; else; //warning here temp = c; y = a+temp; end endmodule
nLint reports: document2.v(31): Warning 22022: suspicious usage of semicolon detected. (Language Construct)
Warning 22023: Only one statement is allowed per line. (Coding Warning 22023: Only one statement is allowed per line. (Coding Warning 22023: Only one statement is allowed per line. (Coding Warning 22023: Only one statement is allowed per line. (Coding
Style) document.sv(22): Warning 22023: Only one statement is allowed per line. (Coding Style) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test (a, inc_dec, sum); input a, inc_dec; output [7:0] sum; reg [7:0] sum; always @(a or inc_dec) begin: COMBINATIONAL_PROC if ( inc_dec == 0) sum = a + 1; else sum = a - 1; end //good coding style using separate line for each HDL statement endmodule
nLint reports:
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is end entity top_ety; architecture arch of top_ety is signal a,b : bit; begin a<='0'; b<='1'; --warning here end architecture arch;
nLint reports: document.vhd(7): Warning 22023: Only one statement is allowed per line. (Coding Style)
nLint reports: document.sv(5): Warning 22024: logic '0' is used to extend the significant bits of constant "8'b100". (Simulation,Language Construct) document.sv(6): Warning 22024: logic '0' is used to extend the significant bits of constant "8'sb011". (Simulation,Language Construct) document.sv(8): Warning 22024: logic '0' is used to extend the significant bits of constant "8'so10". (Simulation,Language Construct) document.sv(10): Warning 22024: logic '0' is used to extend the significant bits of constant "8'o40". (Simulation,Language Construct) document.sv(12): Warning 22024: logic '0' is used to extend the significant bits of constant "8'sh7". (Simulation,Language Construct) document.sv(14): Warning 22024: logic '0' is used to extend the significant bits of constant "8'h7". (Simulation,Language Construct) document.sv(15): Warning 22024: logic '0' is used to extend the significant bits of constant "8'h8". (Simulation,Language Construct)
initial begin $monitor($time,,,,,,,"sel=%d,a=%d,b=%d,c=%d,d=%d,e=%d,f=%d,g=%d",sel, a, b, c,d,e,f,g);//do not type a line so long. 8 a<=12; 9 b<=13; 10 c<=14; 11 e<=15; 12 f<=16; 13 g<=17; 14 sel<=1; 15 #200 $finish; 16 end 17 always 18 # 20 sel = ~sel; 19 endmodule
nLint reports following if the argument value is ("80"): document.v(7): Warning 22025: line length should not exceed 80 characters. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port (s1: in bit; s2: out bit; s3: inout bit; s4: buffer bit); end entity top_ety; architecture arch of top_ety is begin b1: block is signal s : bit; signal x : bit; begin
17 l1: postponed s<=transport '0' after 5 ns,'1' after 10 ns,'0' after 15 ns; --do not type a line so long. 18 l2: postponed s3<=reject 3 ns inertial '0','1' after 10 ns, '0' after 15 ns when s1='0' else --do not type a line so long. 19 '1','0' after 5 ns when s1='1' else 20 unaffected; 21 22 l3: postponed with s1 select 23 x<= transport '1' after 5 ns when '0', 24 '0' after 10 ns when '1', 25 '0' when others; 26 end block b1; 27 end architecture arch;
nLint reports following if the argument value is ("80"): document.vhd(17): Warning 22025: line length should not exceed 80 characters. (Coding Style) document.vhd(18): Warning 22025: line length should not exceed 80 characters. (Coding Style)
nLint reports: document.v(4): Warning 22026: zero bit(s) truncated by the size specified in literal "6'h11". (Simulation,Language Construct) document.v(5): Warning 22026: zero bit(s) truncated by the size specified in literal "6'hxx". (Simulation,Language Construct) document.v(6): Warning 22026: zero bit(s) truncated by the size specified in literal "6'hzz". (Simulation,Language Construct)
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
reg y, tmp1, tmp2, q, r; wire p; always @ (posedge clk) begin tmp1 = a & b; if ( tmp1 ) tmp2 <= c & d; y <= tmp1 | tmp2; //warning here end assign p = ~tmp2; always @(posedge clk or negedge rst_n) begin //warning here if(!rst_n) q <= 1'b0; else q <= d; end //warning here always @ (posedge clk) begin r <= a | b; end endmodule //warning here
nLint reports following if the argument value is ("2","FIRST_INDENT,BEGIN_INDENT,REPORT_ALL"): document1.v(11): Warning 22027: use 4 spaces for document1.v(16): Warning 22027: use 4 spaces for document1.v(21): Warning 22027: use 4 spaces for document1.v(23): Warning 22027: use 2 spaces for ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//Example2 module ao4 (clk, y, a, b, c, d); output y; //warning here if FIRST_INDENT is selected in the second argument input a, b, c, d; input clk; reg y, tmp1, tmp2; wire p; always @ (posedge clk) begin tmp1 = a & b; if ( tmp1 ) tmp2 <= c & d; y <= tmp1 | tmp2; end assign p = ~tmp2; endmodule
nLint reports following if the argument value is ("2","FIRST_INDENT"): document2.v(3): Warning 22027: use 2 spaces for indentation. (Coding Style) document2.v(4): Warning 22027: use 2 spaces for indentation. (Coding Style) document2.v(5): Warning 22027: use 2 spaces for indentation. (Coding Style) document2.v(6): Warning 22027: use 2 spaces for indentation. (Coding Style) document2.v(7): Warning 22027: use 2 spaces for indentation. (Coding Style) document2.v(9): Warning 22027: use 2 spaces for indentation. (Coding Style) document2.v(17): Warning 22027: use 2 spaces for indentation. (Coding Style) ///////////////example : document3.v//////////// 1 2 3 4 5 6 7 8 9 //Example3 module ao4 (clk, y, a, b, c, d); output y; //no warning if FIRST_INDENT not selected in the second argument input a, b, c, d; input clk; reg y, tmp1, tmp2; wire p; always @ (posedge clk)
10 11 12 13 14 15 16 17 18 19
begin //warning here if BEGIN_INDENT selected in the second argument tmp1 = a & b; if ( tmp1 ) tmp2 <= c & d; y <= tmp1 | tmp2; end assign p = ~tmp2; endmodule
nLint reports following if the argument value is ("2","BEGIN_INDENT"): document3.v(10): Warning 22027: use 2 spaces for indentation. (Coding Style) ///////////////example : document4.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 //Example4 module ao4 (clk, y, a, b, c, d); output y; input a, b, c, d; input clk; reg y, tmp1, tmp2; wire p; always @ (posedge clk) begin //no warning here even if //BEGIN_INDENT selected in the second argument tmp1 = a & b; if ( tmp1 ) //warning here since it should be aligned with last line tmp2 <= c & d; y <= tmp1 | tmp2; end assign p = ~tmp2; endmodule
nLint reports following if the argument value is ("2","BEGIN_INDENT"): document4.v(12): Warning 22027: use 2 spaces for indentation. (Coding Style) ///////////////example : document5.v//////////// 1 //Example5 2 //if select REPORT_ALL, nLint report violation based on "right line", not "last line" 3 //eg. when check line 3 4 module test (clk, rst_n, d, q); 5 output q; 6 input clk, rst_n, d; 7 reg q; 8 9 always @(posedge clk or negedge rst_n) //right line 10 begin //last line is a error line 11 if (!rst_n) 12 q <= 1'b0; 13 else 14 q <= d; 15 end 16 endmodule
nLint reports following if the argument value is document5.v(10): Warning 22027: use 0 spaces for document5.v(11): Warning 22027: use 2 spaces for document5.v(12): Warning 22027: use 4 spaces for document5.v(13): Warning 22027: use 2 spaces for document5.v(14): Warning 22027: use 4 spaces for document5.v(15): Warning 22027: use 0 spaces for
("2","REPORT_ALL"): indentation. (Coding indentation. (Coding indentation. (Coding indentation. (Coding indentation. (Coding indentation. (Coding
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
end top_ety; architecture arch of top_ety is begin p1: process is variable a : integer; variable b : integer; begin if (a>0) then b:=a; else b:=-a; end if; end process p1; --good coding style end arch;
nLint reports following if the argument value is ("CHECK_WHOLE"): document.v(7): Warning 22029: should not use TAB for indentation. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port (s1: in bit; s2: out bit; s3: inout bit; s4: buffer bit); end entity top_ety; architecture arch of top_ety is begin b1: block is signal s : bit; -- warning here, don't use TAB for indentation begin end block b1; end architecture arch;
nLint reports following if the argument value is ("CHECK_WHOLE"): document.vhd(14): Warning 22029: should not use TAB for indentation. (Coding Style)
nLint reports: document.v(4): Warning 22031: more than one port is declared in one line. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is --Good style declare one port per line, -- and every port followed by comment port ( reset : in bit; clock : in bit; --warning here q: out bit ); end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports: document.vhd(4): Warning 22031: more than one port is declared in one line. (Coding Style)
nLint reports: document.v(3): Warning 22032: comment is not found following port declaration. (Coding Style) document.v(5): Warning 22032: comment is not found following port declaration. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 --warning on line 4, 6 entity top_ety is --declare one port per line, every port followed by comment port ( reset : in bit; clock : in bit; --comment q: out bit ); end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports: document.vhd(4): Warning 22032: comment is not found following port declaration. (Coding Style) document.vhd(6): Warning 22032: comment is not found following port declaration. (Coding Style)
nLint reports following if the argument value is ("TRUE","INPUT, OUTPUT, INOUT, BUFFER, LINKAGE"):
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 entity top_ety is port (s1: in bit; s2: out bit; s3: inout bit; s4: buffer bit; s5: linkage bit; s6: buffer bit; -- warning here s7: inout bit; -- warning here s8: out bit; -- warning here s9: in bit); -- warning here end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports following if the argument value is ("TRUE","INPUT, OUTPUT, INOUT, BUFFER, LINKAGE"): document.vhd(3): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style)
document.vhd(4): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style) document.vhd(5): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style) document.vhd(6): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style) document.vhd(7): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style) document.vhd(8): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style) document.vhd(9): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style) document.vhd(10): Warning 22033: input, output and inout signals should be grouped and separated by blank line in port declarations. (Coding Style)
parameter ST0 = 0,ST1 = 1,ST2 = 2,ST3 = 3; reg[1:0] current, next; always@(control or current) begin case (current) ST0: begin y = 1; next = ST1; end ST1: begin y = 2; if (control) next = ST2; else next = ST3; end ST2: begin y = 3; next = ST3; end ST3: begin y = 4; next = ST0; end default: begin y = 1; next = ST0; end endcase end always @(posedge clock or posedge reset) begin if(reset) current = ST0; else current = next; end endmodule
nLint reports following if the argument value is ("INPUT, OUTPUT, INOUT, BUFFER, LINKAGE","CLOCK, RESET, SET, ENABLE, TE, CONTROL"): document.v(1): Warning 22035: ports should be declared in order of input, output, inout, buffer and linkage signal groups; and within each group, in order of clock, reset, set, enable, tri-enable and control signals. (Coding Style)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
entity top_ety is port (control: in bit; --warning here, the order of port --declaration should be clock, reset, --control, d1, d2, y d1 : in bit; d2 : in bit; clock: in bit; reset: in bit; y: out bit ); end entity top_ety; architecture arch of top_ety is begin p1 : process (reset, clock) begin if (reset = '1') then y <= '0'; elsif (clock'event and clock = '1') then if (control = '1') then y <= d1; else y <= d2; end if; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("INPUT, OUTPUT, INOUT, BUFFER, LINKAGE","CLOCK, RESET, SET, ENABLE, TE, CONTROL"): document.vhd(13): Warning 22035: ports should be declared in order of input, output, inout, buffer and linkage signal groups; and within each group, in order of clock, reset, set, enable, tri-enable and control signals. (Coding Style)
nLint reports following if the argument value is ("IGNORE_COMMENT"): document.v(6): Warning 22038: signals should be declared one per line with a comment at the end. (Coding Style) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 module test(clock, reset, count); input clock; //add comment here input reset; //add comment here output count;//add comment here // declare one port per line, every port followed by comment endmodule
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is end top_ety; architecture arch of top_ety is signal s0 : bit; signal s1,s2 : bit; --warning here begin end arch;
nLint reports following if the argument value is ("IGNORE_COMMENT"): document.vhd(6): Warning 22038: signals should be declared one per line with a comment at the end. (Coding Style) -------------------example : document2.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is --declare one port per port ( reset : in bit; clock : in bit; q: out bit ); end top_ety;
every port followed by comment comment here comment here comment here
nLint reports: document.v(6): Warning 22039: port instance order should be the same as port declaration order. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 library IEEE; use IEEE.std_logic_1164.all; entity EA is port (s1 : in bit; s2 : out bit ); end entity EA; architecture arch of EA is begin end architecture arch;
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
entity top_ety is end entity top_ety; architecture arch of top_ety is component EA is port (s1 : in bit; s2 : out bit ); end component EA; signal x,y : bit; begin u0: component EA port map (s2=>y,s1=>x); --warning here end architecture arch;
nLint reports: document.vhd(26): Warning 22039: port instance order should be the same as port declaration order. (Coding Style)
nLint reports following if the document.v(12): Warning 22041: name. (Coding Style) document.v(12): Warning 22041: name. (Coding Style) document.v(12): Warning 22041: explicit name. (Coding Style) document.v(12): Warning 22041: name. (Coding Style) document.v(12): Warning 22041: explicit name. (Coding Style)
argument value is ("IGNORE_ANSI_PORT"): port "in1" should be declared by using explicit port "in2" should be declared by using explicit port "carry_in" should be declared by using port "sum" should be declared by using explicit port "carry_out" should be declared by using
nLint reports following if the argument value is document.v(5): Warning 22043: port "y" should be document.v(5): Warning 22043: port "b" should be document.v(5): Warning 22043: port "a" should be document.v(5): Warning 22043: port "sel1" should Style)
name. (Coding Style) name. (Coding Style) name. (Coding Style) by name. (Coding
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library IEEE; use IEEE.std_logic_1164.all; entity EA is port (s1 : in bit; s2 : out bit ); end entity EA; architecture arch of EA is begin end architecture arch; entity top_ety is end entity top_ety;
17 18 19 20 21 22 23 24 25 26 27
architecture arch of top_ety is component EA is port (s1 : in bit; s2 : out bit ); end component EA; signal x,y : bit; begin u0: component EA port map (x,s2=>y); --warning on 'x' end architecture arch;
nLint reports following if the argument value is ("MODULE"): document.vhd(26): Warning 22043: port "x" should be associated by name. (Coding Style)
22044 (Verilog) Use Explicit Mapping for Parameters 22044 (VHDL) Use Explicit Mapping for Generic
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: parameter "%s" should be mapped by name. (VHDL) <filename>(<line no.>): <severity> <rule no.>: generic "%s" should be mapped by name. Configurable Parameter Rule group: Coding Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether the name association, rather than the positional association, is used on the parameter association. Example
(Verilog) ///////////////example : document.v2k//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module sub (i, o); parameter width = 1; input i; output o; assign o = i; endmodule module top (i, o); parameter width = 2; input [1:0] i; output [1:0] o; sub #(width) i_sub(.i(i), .o(o)); endmodule
nLint reports: document.v2k(12): Warning 22044: parameter "width" should be mapped by name. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity ram_dp is generic (addr_bits :integer); end ram_dp; architecture arch of ram_dp is begin end; entity top_ety is end; architecture arch of top_ety is component ram_dp generic (addr_bits :integer); end component; begin RAM0: end;
nLint reports: document.vhd(18): Warning 22044: generic "15" should be mapped by name. (Coding Style)
nLint reports: document.sv(4): Warning 22045: use localparam instead of parameter to declare "NOT_OK" in module or interface "simple". (Design Style) document.sv(7): Warning 22045: use localparam instead of parameter to declare "NOT_OK" in module or interface "test". (Design Style)
nLint reports following if the argument value is ("ENTITY,ARCHITECTURE"): document.v(2): Warning 22049: literal numbers should not be used in specifying a range (in object "q"). (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end entity top_ety; architecture arch of top_ety is type array1 is array (8 downto 1) of bit; -- warning on '8 downto 1' type array2 is array (natural range<>) of bit; signal s1 : array1; signal s2 : array2(32 downto 1); --warning on '32 downto 1' begin end architecture arch;
nLint reports following if the argument value is ("ENTITY,ARCHITECTURE"): document.vhd(5): Warning 22049: constant numbers should not be used in specifying a range (in object "array1"). (Coding Style) document.vhd(8): Warning 22049: constant numbers should not be used in specifying a range (in object "s2"). (Coding Style)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
output q; wire reset,clk,d,reset1; reg q; not (reset1,reset); always @(posedge clk or negedge reset1) begin if (reset1) q = 0; else q = d; end endmodule module test3(clk,reset,q,d); input clk,reset,d; output q; wire reset,clk,d,reset1,reset2; reg q; not (reset1,reset); not (reset2,reset1); always @(posedge clk or negedge reset2) begin if (reset2) q = 0; else q = d; end endmodule
nLint reports following if the argument value is ("PASS_THROUGH_BUFFER_ASSIGNMENT, PASS_THROUGH_EVEN_INVERTERS"): document.v(35): Warning 22051: reset signal should not be driven by logic which is not in reset_gen module (reset: "reset1" (document.v(37)); driving logic output: "reset1"). (Clock)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
output q; wire reset,clk,d,clk1; reg q; not (clk1,clk); always @(negedge clk1 or posedge reset) begin if (reset) q = 0; else q = d; end endmodule module test3(clk,reset,q,d); input clk,reset,d; output q; wire reset,clk,d,clk1,clk2; reg q; not (clk1,clk); not (clk2,clk1); always @(negedge clk2 or posedge reset) begin if (reset) q = 0; else q = d; end endmodule
nLint reports following if the argument value is ("PASS_THROUGH_BUFFER_ASSIGNMENT, PASS_THROUGH_EVEN_INVERTERS"): document.v(35): Warning 22052: clock signal should not be driven by logic which is not in clock_gen module (clock: "clk1" (document.v(36)); driving logic output: "clk1"). (Clock)
nLint reports: document.v(8): Warning 22053: clock signal "clk_en" (document.v(10) is driven by a combinational logic (output: "clk_en"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 entity top_ety is port ( rst : in bit; a : in bit; b : in bit; d : in integer; count : out integer); end top_ety; architecture arch of top_ety is signal clk : bit; begin clk <= a and b; --clk is output of gate p1 : process (rst, clk) begin if (rst='1') then count<=0; elsif (clk'event and clk='1') then --clk is used as clock signal count<=d; end if; end process p1; end arch;
nLint reports: document.vhd(13): Warning 22053: clock signal "clk" (document.vhd(19) is driven by a combinational logic (output: "clk"). (DFT,Design Style)
nLint reports: document1.v(8): Warning 22054: clock signal should not be driven (gated) by inverted logic (clock: "clk_i" (document1.v(11)); inverted logic output: "clk_i"). (DFT,Design Style) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 module top (q, clk, reset, d); output q; input clk, reset, d; reg q; wire clk, reset, d; wire clk_i;
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
inv U_buf_1(clk_i, clk); //warning on "clk_i", clk_i is drived //by an invertor always @( posedge clk_i or negedge reset ) if ( ~reset ) q <= 1'b0; else q <= d; endmodule module inv ( b, a); output b; inout a; reg b; always @(a) begin b = ~a; end endmodule
nLint reports: document2.v(23): Warning 22054: clock signal should not be driven (gated) by inverted logic (clock: "clk_i" (document2.v(11)); inverted logic output: "b"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 entity top_ety is port ( rst : in bit; a : in bit; d : in integer; count : out integer); end top_ety; architecture arch of top_ety is signal clk : bit; begin clk <= not a;--clk is output of invertor p1 : process (rst, clk) begin if (rst='1') then count<=0; elsif (clk'event and clk='1') then --clk is used as clock signal count<=d; end if; end process p1; end arch;
nLint reports: document.vhd(12): Warning 22054: clock signal should not be driven (gated) by inverted logic (clock: "clk" (document.vhd(18)); inverted logic output: "clk"). (DFT,Design Style)
nLint reports: document.v(8): Warning 22055: clock signal should not be buffered manually (clock: "clk_i" (document.v(11)); buffer logic output: "clk_i"). (DFT)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 library ieee; use ieee.std_logic_1164.all; library buf; use buf.all; entity top_ety is port (clock : in std_logic; rst : in std_logic; d : in integer; count : out integer); end top_ety; architecture arch of top_ety is signal clk : std_logic; component BUF1 is port (a : in std_logic; b : out std_logic); end component; begin
21 22 23 24 25 26 27 28 29 30 31 32
--assumed that BUF1 is buffer cell u_BUF1 : component BUF1 port map( a=>clock, b=>clk ); p1 : process (rst, clk) begin if (rst='1') then count<=0; elsif (clk'event and clk='1') then count<=d; end if; end process p1; end arch;
nLint reports: document.vhd(22): Warning 22055: clock signal should not be buffered manually (clock: "clk" (document.vhd(28)); buffer logic output: "clk"). (DFT)
nLint reports following if the argument value is ("BOTH"): document.v(8): Warning 22056: reset signal should not be driven by combinational logic (reset: "rst_en" (document.v(11)); combinational logic output: "rst_en"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is port ( reset : in bit; clock : in bit; d : in bit; q : out bit ); end entity top_ety; architecture arch of top_ety is signal rst : bit; begin p0 : process (clock,reset) begin rst<= clock and reset; --warning on 'rst' end process p0; p1: process (rst,clock) is
18 19 20 21 22 23 24 25
begin if (rst='1') then q<='0'; elsif (clock'event and clock='1') then q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(14): Warning 22056: reset signal should not be driven by combinational logic (reset: "rst" (document.vhd(19)); combinational logic output: "rst"). (DFT,Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(8): Warning 22057: set signal should not be driven by combinational logic (set: "set_en" (document.v(11)); combinational logic output: "set_en"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is port ( set : in bit; clock : in bit; d : in bit; q : out bit ); end entity top_ety; architecture arch of top_ety is signal st : bit; begin p0 : process (clock,set) begin st<= clock and set; --warning on 'st' end process p0; p1: process (st,clock) is
18 19 20 21 22 23 24 25
begin if (st='1') then q<='1'; elsif (clock'event and clock='1') then q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(14): Warning 22057: set signal should not be driven by combinational logic (set: "st" (document.vhd(19)); combinational logic output: "st"). (DFT,Design Style)
nLint reports: document.v(11): Warning 22058: the set/reset signal should not be driven by a path with potential glitch (set/reset:"rst_en"; path:"rst_en" (document.v(8))). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 entity top_ety is port ( reset : in bit; clock : in bit; d : in bit; q : out bit ); end entity top_ety; architecture arch of top_ety is signal rst : bit; begin p0 : process (clock,reset) begin rst<= clock and reset; --warning on 'rst' end process p0; p1: process (rst,clock) is begin if (rst='1') then q<='0'; elsif (clock'event and clock='1') then q<=d; end if;
24 25
nLint reports: document.vhd(19): Warning 22058: the set/reset signal should not be driven by a path with potential glitch (set/reset:"rst"; path:"rst" (document.vhd(14))). (DFT,Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(9): Warning 22059: set signal should not be driven by sequential logic (set: "c[3]" (document.v(14)); sequential logic output: "c[3]"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is port ( set : in bit; clock : in bit; d : in bit; q : out bit ); end entity top_ety; architecture arch of top_ety is signal st : bit; begin p0 : process (set,clock) begin if (clock'event and clock='1') then
15 16 17 18 19 20 21 22 23 24 25 26 27 28
st<=set;
--warning on 'st', 'st' is an output of sequential --logic and used as set signal in below logic
end if; end process p0; p1 : process (st,clock) is begin if (st='1') then --'st' used as set signal q<='1'; elsif (clock'event and clock='1') then q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(15): Warning 22059: set signal should not be driven by sequential logic (set: "st" (document.vhd(22)); sequential logic output: "st"). (DFT,Design Style)
nLint reports following document.sv(3): Warning current module. (Design document.sv(5): Warning current module. (Design document.sv(7): Warning current module. (Design
argument value is ("CHECK_TYPE_DETAIL"): object "INT" is declared but not used in the object "field" is declared but not used in the object "stu" is declared but not used in the
nLint reports following if the argument value is ("CHECK_TYPE_DETAIL"): document.v(2): Warning 22061: object "NotUseReg" is declared but not used in the current module. (Design Style) document.v(3): Warning 22061: object "pa" is declared but not used in the current module. (Design Style) ///////////////example : document2.v//////////// 1 2 3 module top; `include "document2.h"
4 5 6 7 8 9 10 11 12 13
wire [7:0] r1; assign r1 = P1; endmodule module test(); `include "document2.h" wire [7:0] r2; assign r2 = P2; endmodule
nLint reports following if the argument value is ("CHECK_TYPE_DETAIL"): document2.h(3): Warning 22061: object "P3" is declared but not used in the module "top" within file "document2.v"(1). (Design Style) document2.h(3): Warning 22061: object "P3" is declared but not used in the module "test" within file "document2.v"(8). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is end entity top_ety; architecture arch of top_ety is constant c : integer :=10; --warning on 'c' signal s : bit; --warning on 's' shared variable v : integer; --warning on 'v' procedure proc is begin null; end procedure proc; begin end architecture arch; --warning on 'proc'
nLint reports following if the argument value document.vhd(5): Warning 22061: object "c" is module. (Design Style) document.vhd(6): Warning 22061: object "s" is module. (Design Style) document.vhd(7): Warning 22061: object "v" is module. (Design Style) document.vhd(9): Warning 22061: object "proc" current module. (Design Style)
is ("CHECK_TYPE_DETAIL"): declared but not used in the current declared but not used in the current declared but not used in the current is declared but not used in the
nLint reports: document.v(10): Warning 22063: FSM is not implemented using two-process coding. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is port ( reset : in bit; clock : in bit; s: out integer ); end entity top_ety;
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
architecture arch of top_ety is type state_T is (a,b,c,d); begin p1: process (clock,reset) is --warning here, FSM is inferred --in one process variable v : state_T :=a; begin if (reset='1') then s<=0; v:=a; elsif (clock'event and clock='1') then case (v) is when a=> s<=1; v:=b; when b=> s<=2; v:=c; when c=> s<=3; v:=d; when others => s<=0; v:=a; end case; end if; end process p1; end architecture arch;
nLint reports: document.vhd(11): Warning 22063: FSM is not implemented using two-process coding. (Design Style)
22067 (Verilog) FSM and Non-FSM Logic in the Same Module 22067 (VHDL) FSM and Non-FSM Logic in the Same Architecture
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: FSM logic and non-FSM "%s" logic should be put in separate modules. (VHDL) <filename>(<line no.>): <severity> <rule no.>: FSM logic and non-FSM "%s" logic should be put in separate architectures. Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether FSM logic and non-FSM logic are placed in separate modules. The output signal of the non-FSM logic is reported here to represent the non-FSM logic. (VHDL) This rule checks whether FSM logic and non-FSM logic are placed in separate architectures. The output signal of the non-FSM logic is reported here to represent the non-FSM logic. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 module test (y, q, clock, reset, control, datain); input clock, reset, control, datain; output [2:0] y; reg [2:0] y; output q; reg q; parameter ST0 = 0,ST1 = 1,ST2 = 2,ST3 = 3; reg[1:0] current, next; always @(control or current) begin case (current) 0: begin y = 1; next = 1; end 1: begin y = 2; if (control) next = 2; else next = 3; end 2: begin y = 3; next = 3; end 3: begin y = 4; next = 0; end default: begin y = 1; next = 0; end endcase end always @(posedge clock or posedge reset) begin if (reset) current = 0; else current = next; end always @(posedge clock) //warning here, a FSM independent logic
35 36 37
nLint reports: document.v(36): Warning 22067: FSM logic and non-FSM "q" logic should be put in separate modules. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 entity top_ety is port ( reset : in bit; clock : in bit; data : in bit; q : out bit; y : out bit ); end entity top_ety; architecture arch of top_ety is type state_T is (a,b,c,d); begin p1: process (clock,reset) is variable v : state_T :=a; begin if (reset='1') then v:=a; q<='0'; elsif (clock'event and clock='1') then case (v) is when a=> v:=b; when b=> v:=c; when c=> v:=d; when others => v:=a; end case; if (v=a) then q<='0'; else q<='1'; end if; end if; end process p1; p2 : process( clock, reset ) --warning here, a FSM independent --logic is inferred in the same --architecture begin if ( reset = '1' ) then y <= '0'; elsif ( clock'event and clock = '1' ) then y <= data; end if; end process p2; end architecture arch;
nLint reports: document.vhd(43): Warning 22067: FSM logic and non-FSM "y" logic should be put in separate architectures. (Design Style)
nLint reports: document.v(33): Error 22075: nested edge-triggered constructs "posedge clock" should not be used. (Synthesis)
//warning here
nLint reports: document.v(39): Warning 22077: edge-triggered construct "posedge clock" should not be used in task "multiply". (Synthesis)
nLint reports following if the argument value is ("IGNORE_PARAMETER"): document.v(9): Warning 22079: conditional expression "(3 >= 0)" is always true, or implied to be always true from context. (Simulation) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module test (out, in1, in2); output [7:0] out; input [7:0] in1, in2; reg [7:0] out; always @( if (in1 out = else out = end endmodule in1 or in2 ) begin != 0) in1; (in1 && in2) ? in1&in2 : in1|in2;
document2.v(10): Warning 22079: conditional expression "(in1 && in2)" is always false, or implied to be always false from context. (Simulation)
(VHDL) -------------------example : document.vhd------------1 entity top_ety is 2 end top_ety; 3 4 architecture arch of top_ety is 5 constant A : boolean := true; 6 begin 7 if ( A ) then --warning here 8 C <= '1'; 9 elsif ( false ) then --warning here 10 C <= '0'; 11 end if; 12 13 while ( A ) loop --warning here 14 C <= '1'; 15 end loop; 16 17 for A in 0 to 1 loop --no warning because A is not constant 18 Var := Var + A; 19 end loop; 20 21 case A is --warning here 22 when '1' => C <= '1'; 23 when '0' => C <= '0'; 24 end case; 25 26 while ( 3 > 1 ) loop --warning here 27 C <= '1'; 28 end loop; 29 30 end arch; -------------------example : document1.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 -- nLint testcase for warning 22079 -library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is port( Clock : in bit; C : out bit ); end entity top_ety; architecture arch of top_ety is constant A : boolean := true; begin process( Clock ) begin if ( A ) then C <= '1'; elsif ( not A ) then C <= '0'; end if; end process; end arch;
nLint reports following if the argument value is ("IGNORE_PARAMETER"): document1.vhd(18): Warning 22079: conditional expression "a" yields a constant value. (Simulation) document1.vhd(20): Warning 22079: conditional expression "( not A)" yields a constant value. (Simulation) -------------------example : document2.vhd------------1 2 -- nLint testcase for warning 22079 --
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is port( Clock : in bit; C : out bit ); end entity top_ety; architecture arch of top_ety is constant A : boolean := true; begin process( Clock ) begin while ( A ) loop C <= '1'; end loop; end process; end arch;
nLint reports following if the argument value is ("IGNORE_PARAMETER"): document2.vhd(18): Warning 22079: conditional expression "a" yields a constant value. (Simulation) -------------------example : document3.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 -- nLint testcase for warning 22079 -library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is port( Clock : in bit; C : out integer ); end entity top_ety; architecture arch of top_ety is constant A : integer := 5; begin process( Clock ) variable Var : integer := 0; begin for A in 0 to 1 loop --no warning becase this A is not constant A Var := Var + A; end loop; C <= Var; end process; end arch;
nLint reports following if the argument value is ("IGNORE_PARAMETER"): -------------------example : document4.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 -- nLint testcase for warning 22079 -library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is port( Clock : in bit; C : out bit ); end entity top_ety; architecture arch of top_ety is constant A : bit := '1'; begin process( Clock ) begin case A is
19 20 21 22 23
when '1' => C <= '1'; when '0' => C <= '0'; end case; end process; end architecture arch;
nLint reports following if the argument value is ("IGNORE_PARAMETER"): document4.vhd(19): Warning 22079: conditional expression "1" yields a constant value. (Simulation) document4.vhd(20): Warning 22079: conditional expression "0" yields a constant value. (Simulation) -------------------example : document5.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 -- nLint testcase for warning 22079 -library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is port( Clock : in bit; C : out bit ); end entity top_ety; architecture arch of top_ety is constant A : boolean := true; begin process( Clock ) begin while ( 3 > 1 ) loop C <= '1'; end loop; end process; end arch;
nLint reports following if the argument value is ("IGNORE_PARAMETER"): document5.vhd(18): Warning 22079: conditional expression "(3 > 1)" yields a constant value. (Simulation)
nLint reports following if the argument value is ("INPUT,OUTPUT,INOUT"): document.v(4): Warning 22082: port "b" is not connected. (Simulation) document.v(5): Warning 22082: port "b" is not connected. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 entity EA is port ( r1: in bit; r2: out bit ); end EA; architecture arch of EA is begin end arch; entity top_ety is port ( s1: in bit; s2: out bit ); end top_ety; architecture arch of top_ety is component EA is port ( r1: in bit; r2: out bit );
22 23 24 25 26
end component EA; begin u0: component EA port map (r1=>s1); --warning 22082 on 'r2' u1: component EA port map (r1=>s1, r2=>open); --warning 22279 on 'r2' end arch;
nLint reports following if the argument value is ("INPUT,OUTPUT,INOUT"): document.vhd(24): Warning 22082: port "r2" is not connected. (Simulation)
22083 (Verilog) Parameter Bit-width Too Long 22083 (VHDL) Generic Bit-width Too Long
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the bit width of parameter "%s" should not exceed %d. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the bit width of generic "%s" should not exceed %d. Configurable Parameter Rule group: Simulation, Synthesis, Language Construct; Argument type: integer; Argument description: specify the maximum bit width of parameter value; Default value: "32" for Verilog, "32" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the bit width of the parameter exceeds 'length'. (VHDL) This rule checks whether the bit width of the generic exceeds 'length'. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 module test; parameter TW=33'b100000000000000000000000000000000; //warning here endmodule
nLint reports following if the argument value is ("32"): document.v(2): Warning 22083: the bit width of parameter "TW" should not exceed 32. (Simulation,Synthesis,Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is generic ( g1: integer; g2: bit_vector :="01010101001010100110101010101010101" --warning on 'g2' ); end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports following if the argument value is ("32"): document.vhd(4): Warning 22083: the bit width of generic "g2" should not exceed 32. (Simulation,Synthesis,Language Construct)
nLint reports: document.v(9): Warning 22085: function "decode2_4" does not return a value in every conditional branch. (Simulation,Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is end top_ety; architecture arch of top_ety is function ADD( A : integer; B : integer ) return integer is begin if ( A > 0 and B > 0 ) then return A + B; end if; -- if without else branch end ADD; begin end arch;
nLint reports: document.vhd(5): Warning 22085: function "ADD" does not return a value in every conditional branch. (Simulation,Language Construct)
nLint reports: document.v(8): Error 22089: Vector "b" is used in a single-bit logical operation. (Simulation,Language Construct) document.v(8): Error 22089: Vector "a" is used in a single-bit logical operation. (Simulation,Language Construct) document.v(10): Error 22089: Vector "b" is used in a single-bit logical operation. (Simulation,Language Construct) document.v(10): Error 22089: Vector "a" is used in a single-bit logical operation. (Simulation,Language Construct)
nLint reports: document.v(8): Warning 22091: condition expression is wider than single-bit. (Simulation,Language Construct)
//warning here
nLint reports: document.v(8): Warning 22097: function call "multiply(a, b)" should not be used in procedural continuous assignment. (Design Style)
nLint reports: document.v(10): Warning 22098: function "multiply" should not be used in deassign statement. (Language Construct)
nLint reports: document.v(5): Warning 22101: bit range is specified for parameter "a[0]". (Language Construct)
nLint reports: document.v(9): Warning 22103: the value of case label "16" exceeds the range of the case variable "state". (Language Construct)
nLint reports following if the argument value is ("VAR_GE_CON"): document.v(8): Warning 22104: width of operand "(a + b)"(3) does not match that of operand "(c + d)"(4) in logic comparison operation. (Language Construct) document.v(11): Warning 22104: width of operand "(a + b)"(3) does not match that of operand "(c + d)"(4) in logic comparison operation. (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 library IEEE; use IEEE.STD_Logic_1164.all,IEEE.Numeric_STD.all; entity top_ety is port(
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
A : in bit_vector(1 downto 0); B : in bit_vector(2 downto 0); C : out bit ); end entity top_ety; architecture arch of top_ety is begin process( A, B ) begin if (A=B) then -- warning here C <= '1'; elsif (A/=B) then -- warning here C <= '0'; end if; end process; end architecture arch;
nLint reports following if the argument value is ("VAR_GE_CON"): document.vhd(16): Warning 22104: width of operand "A"(2) does not match that of operand "B"(3) in logic comparison operation. (Language Construct) document.vhd(18): Warning 22104: width of operand "A"(2) does not match that of operand "B"(3) in logic comparison operation. (Language Construct)
22105 (Verilog) Different Bits of Vector Driven in Different Blocks 22105 (VHDL) Different Bits of Vector Driven in Different Concurrent Statements
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: different bits of signal "%s" and "%s" should not be driven in different blocks (at line %d). (VHDL) <filename>(<line no.>): <severity> <rule no.>: different bits of signal "%s" should not be driven in different concurrent statements (at line %d). Configurable Parameter Rule group: Design Style; Argument type: (CHECK_PORT_INST, CHECK_CONT_ASSIGN, CHECK_UNPACKED); Argument description: select CHECK_PORT_INST means to check the rule for the signal connected to portInst; select CHECK_CONT_ASSIGN means to check the rule for the signal in continuous assignment; select CHECK_UNPACKED means to check the rule for unpacked signal, while packed signal is always checked; Default value: "" for Verilog, "" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether different bits of a signal are driven in different blocks. (VHDL) This rule checks whether different bits of a signal are driven in different concurrent statement. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test (a, b, c); input a, b; output [2:0] c; reg [2:0] c; initial c[2] = 1; always@(a) c[0]=a; always@(b) c[1]=b;
//warning here //warning here, "c[1]" and "c[0]" are used //in different always blocks
endmodule
nLint reports following if the argument value is (""): document.v(9): Warning 22105: different bits of signal "c[0]" and "c[1]" should not be driven in different blocks (at line 11). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 entity top_ety is end entity top_ety; architecture arch of top_ety is
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
type array1 is array (1 to 8) of bit; signal s1 : array1; signal a, b: bit; begin p1 : process (a) is begin s1(1)<=a; end process p1; p2 : process (b) is begin s1(2)<=b; --warning here, "s1[1]" and "s1[2]" are used --in different processes end process p2; end architecture arch;
nLint reports following if the argument value is (""): document.vhd(11): Warning 22105: different bits of signal "s1" should not be driven in different concurrent statements (at line 16). (Design Style)
= = = =
nLint reports following if the argument value is ("VAR_GE_CON"): document.v(12): Warning 22106: width of "a[1:0]"(2) does not match that of "3'b100"(3) in the comparison of case statement. (Language Construct)
nLint reports: document.v(13): Warning 22107: case label "ST0" is redundant. (Coding Style)
nLint reports: document.v(11): Warning 22108: the "else" clause should be explicitly associated with the proper "if" clause at line 8. (Coding Style)
nLint reports: document.v(8): Warning 22109: 'or' (rather than |, ||) should be used in event expression "(clk | rst)". (Simulation,Language Construct) document.v(17): Warning 22109: 'or' (rather than |, ||) should be used in event expression "(clk || set)". (Simulation,Language Construct)
nLint reports: document.v(8): Error 22112: the for-loop never iterates because expression "(i < 4)" is always false. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity top_ety is port (Clock : in bit; Data : in integer); end top_ety; architecture arch of top_ety is begin process (Clock) variable V : integer; begin loop --warning here V := Data + 1; end loop; loop --no warning here V := Data + 1; exit; end loop; end process; end arch;
nLint reports: document.v(8): Warning 22115: repeat expression "4'b0x10" evaluates to X or Z, causing it to repeat zero or unknown times. (Simulation)
nLint reports following if the argument value is ("BOTH"): document.v(11): Warning 22117: "Asynchronous" reset "reset" is detected. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d: in std_logic; q: out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then --warning on 'reset' q<='0'; elsif (rising_edge(clock)) then q<=d; end if; end process p1;
22
nLint reports following if the argument value is ("BOTH"): document.vhd(16): Warning 22117: "Asynchronous" reset "reset" is detected. (Design Style)
nLint reports: document.v(5): Warning 22118: Do not describe flip-flop "FOUT1" with asynchronous reset/set and flip-flop "FOUT2" without asynchronous reset/set in the same always construct. (Design Style)
nLint reports: document.v(6): Warning 22119: logic expression "(clk1 | clk2)" is used in the sensitivity list. (Synthesis,Language Construct)
22120 (Verilog) Latch should Not Coexist with Other Logic in a Module
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: latch "%s" should not be mixed with combinational logics or other latches in the module "%s". Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether only one latch exists in a module at the RTL level. If any latch co-exists with other logic in the same module, or if there are multiple latches in a module, a violation will be reported. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module example(Q,G,DATA,Q1,G1,DATA1); output Q,Q1; input G,DATA,G1,DATA1; reg Q, Q1; always @(G or DATA1) if(G) Q <= DATA1; always @(G1 or DATA1) if(G1) Q1 = DATA1; else Q1 = 1'b0; endmodule //report 22120
nLint reports: document.v(6): Warning 22120: latch "Q" should not be mixed with combinational logics or other latches in the module "example". (Design Style)
nLint reports: document.v(6): Warning 22121: duplicate signal "clk" found in sensitivity list. (Synthesis,Language Construct)
22122 (Verilog) Tri-state Buffer should Not Coexist with Other Logic in a Module
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: tri-state buffer "%s" should not be mixed with other combinational logics or other tri-state buffers in the module "%s". Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether only one tri-state buffer exists in a module at RTL level. If any tri-state buffers co-exist with other logics in the same module, or if there are multiple tri-state buffers in a module, a violation will be reported. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module TriState(y,en,data,Q,G,DATA); output y,Q; input en,data,G,DATA; reg y,Q; always @(en or data) //warning 22122 if(en) y = data; else y = 1'bz; always @(G or DATA) if(G) Q <= DATA; endmodule
nLint reports: document.v(7): Warning 22122: tri-state buffer "y" should not be mixed with other combinational logics or other tri-state buffers in the module "TriState". (Design Style)
nLint reports: document.v(6): Warning 22123: asynchronous reset signal "reset" should be specified only by negedge. (Design Style)
nLint reports: document.v(22): Warning 22124: fan-out logic of tri-state "tri_out1"(21) should be in a separate module. (DFT) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 module top; wire a,b,c,f,g; test u1 (a,b,c); test1 u2 (c,f,g); endmodule module test(a,b,c); input a,b; output c; wire a,b,c; assign c = b ? a : 1'bz; endmodule module test1(d,f,g); input d,f; output g; wire d,e,f,g; buf (e,d); and (g,e,f); endmodule
nLint reports: document1.v(19): Warning 22124: fan-out logic of tri-state "c"(11) should be in a separate module. (DFT)
nLint reports: document.v(15): Warning 22125: bit range should not be used on non-vector object "N[1]". (Language Construct) document.v(17): Warning 22125: bit range should not be used on non-vector object "N[0]". (Language Construct) document.v(18): Warning 22125: bit range should not be used on non-vector object "T[0]". (Language Construct)
nLint reports: document.v(6): Warning 22126: logic in enable condition of tri-state "tri_out1"(5) should be in a separate module. (DFT)
nLint reports: document.v(7): Warning 22127: clock signal "clock2" (document.v(9)) is used as a data input ("clock2"). (DFT)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock, clock1 : in std_logic; d : in std_logic; q : out std_logic; s : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then q<='0'; elsif (rising_edge(clock)) then --warning here, 'clock' is --used as clock signal q<=d; end if; end process p1; p2: process (clock1) is begin if (rising_edge(clock1)) then s<=clock; --'clock' is used as data signal end if;
30 31
nLint reports: document.vhd(28): Warning 22127: clock signal "clock" (document.vhd(19)) is used as a data input ("clock"). (DFT)
nLint reports: document.v(8): Warning 22128: clock signal feeds transitively to macro(clock: "clk" (document.v(5)); macro: "clk"). (DFT) document.v(20): Warning 22128: clock signal feeds transitively to macro(clock: "clk" (document.v(21)); macro: "clk"). (DFT) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 //example 1 module test; wire clk, d; reg y; always @(posedge clk) begin y <= d; end test1 u1 (clk); //warning here
9 10 11 12 13 14 15 16
endmodule `celldefine module test1(in); input in; wire in; endmodule `endcelldefine
nLint reports: document1.v(8): Warning 22128: clock signal feeds transitively to macro(clock: "clk" (document1.v(5)); macro: "clk"). (DFT) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 //example 2 module test; wire clk, z1, z2, d; reg y; B2I u1 (.A(clk), .Z1(z1), .Z2(z2)); //B2I is MACRO, warning here always @(posedge clk) begin y <= d; end endmodule
nLint reports: document2.v(5): Warning 22128: clock signal feeds transitively to macro(clock: "clk" (document2.v(6)); macro: "clk"). (DFT)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is end entity top_ety; architecture arch of top_ety is component B2I is port ( A : in std_logic; Z1: out bit; z2: out bit); end component B2I; signal clk: std_logic; signal q: bit; signal d: bit; signal z11,z21: bit; begin p1: process (clk) is begin if (rising_edge(clk)) then q<=d; end if; end process p1; u0: component B2I port map (A=>clk, Z1=>z11, Z2=>z21); --warning here end architecture arch;
nLint reports: document.vhd(25): Warning 22128: clock signal feeds transitively to macro(clock: "clk" (document.vhd(21)); macro: "clk"). (DFT)
nLint reports: document.v(19): Warning 22129: clock signal "clock" (document.v(10)) is used as a reset signal ("clock"). (DFT)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( clock : in std_logic; clock2 : in std_logic; d : in std_logic; q : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock) is begin if (rising_edge(clock)) then --'clock' is used as clock q<=d; end if;
19 20 21 22 23 24 25 26 27 28 29 30 31
end process p1; p2: process (clock2) is begin if (rising_edge(clock2)) then if (clock='1') then --warning on 'clock', used as reset q<='0'; else q<=not d; end if; end if; end process p2; end architecture arch;
nLint reports: document.vhd(24): Warning 22129: clock signal "clock" (document.vhd(16)) is used as a reset signal ("clock"). (DFT)
nLint reports: document.v(20): Warning 22130: clock signal "clock" (document.v(12)) feeds the output signal ("clk_out") directly or indirectly. (DFT,Clock)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( clock : in std_logic; d : in std_logic; q : out std_logic; clk_out : out std_logic ); end top_ety; architecture arch of top_ety is begin p1: process (clock) is begin if (rising_edge(clock)) then --'clock' is used as clock q<=d; end if; end process;
20 21 22 23 24 25 26
p2: process (clock) is begin clk_out <= clock; --//warning here; end process; end arch;
nLint reports: document.vhd(23): Warning 22130: clock signal "clock" (document.vhd(16)) feeds the output signal ("clk_out") directly or indirectly. (DFT,Clock)
nLint reports: document.v(8): Warning 22131: clock signal should not be driven by sequential logic (clock: "qc" (document.v(10)); sequential logic output: "qc"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : inout std_logic ); end entity top_ety; architecture arch of top_ety is signal s : std_logic; begin p1: process (clock) is begin if (rising_edge(clock)) then
18 19 20 21 22 23 24 25 26 27 28 29 30
s<=d; -- 's' is output of register,warning on 's' end if; end process p1; p2: process (reset,s) is begin if (reset='1') then q<='0'; elsif (rising_edge(s)) then --'s' used as clock here q<=not q; end if; end process p2; end architecture arch;
nLint reports: document.vhd(18): Warning 22131: clock signal should not be driven by sequential logic (clock: "s" (document.vhd(26)); sequential logic output: "s"). (DFT,Design Style)
nLint reports: document.v(1): Warning 22132: clock source "test.clk" should not trigger flipflops on both rising and falling edges. (DFT)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 entity top_ety is port (clk : in bit; d : in bit; q : out bit); end top_ety; architecture arch of top_ety is signal q1 : bit; begin process (clk) begin if (clk'event and clk = '1') then q1 <= d; end if; end process; process (clk) begin if (clk'event and clk = '0') then q <= q1; end if; end process; end arch;
nLint reports: document.vhd(2): Warning 22132: clock source "top_ety.clk" should not trigger
nLint reports: document.v(13): Warning 22133: reconverged clock "test.d1" found. (Clock) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 //2. come from same source node, but from different path module test; wire a,b,c,d,d1,f; reg y; always @(posedge a) y=d; and (b,a,f); and (c,a,f); and (d1,b,c); //warning here always @(posedge d1) y=d; always @(negedge d1) y=d; endmodule
nLint reports: document1.v(9): Warning 22133: reconverged clock "test.d1" found. (Clock)
nLint reports: document.v(7): Warning 22134: clock signal feeds transitively to floating gate (clock: "clk" (document.v(6)); floating gate output: "clk"). (DFT) document.v(8): Warning 22134: clock signal feeds transitively to floating gate (clock: "clk" (document.v(6)); floating gate output: "n1"). (DFT)
nLint reports: document.v(7): Error 22139: constant "c" is used as event control. (Simulation,Language Construct)
nLint reports: document.v(1): Warning 22149: input port "a" and output port "c" should not be connected directly. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is port ( x : in integer; --warning on 'x', is directly connected to --output 'y' y : out integer ); end entity top_ety; architecture arch of top_ety is begin y<=x; end architecture arch;
nLint reports: document.vhd(2): Warning 22149: input port "x" and output port "y" should not be connected directly. (Design Style)
nLint reports: document.v(7): Error 22151: an assignment is given to an input signal "a[2]". (Simulation,Language Construct)
nLint reports: document.v(7): Information 22152: output signal "d" should not be referenced inside the module. (Design Style)
nLint reports: document.v(1): Warning 22153: more than one top module detected, top modules: "initval, test, ...". (Design Style)
nLint reports following if the argument value is (""): document.v(6): Warning 22155: empty block is detected. (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 entity top_ety is end top_ety; architecture arch of top_ety is procedure Proc ( D : in bit; Q : out bit ) is --warning on 'procedure' begin end procedure; begin BLK1 : block --warning on 'block' begin end block BLK1; end arch;
nLint reports following if the argument value is (""): document.vhd(5): Warning 22155: empty block is detected. (Language Construct) document.vhd(10): Warning 22155: empty block is detected. (Language Construct)
nLint reports: document.v(5): Warning 22157: empty process is detected. (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is port (Clock : in bit; Reset : in bit); end top_ety; architecture arch of top_ety is begin process( Clock , Reset ) --warning on 'process' begin end process; end arch;
nLint reports: document.vhd(8): Warning 22157: empty process is detected. (Language Construct)
nLint reports: document.v(11): Warning 22159: delay value "a" is not a constant. (Design Style) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 10 `timescale 1ns/100ps module test(in1, in2, out1, out2, out3); input in1, in2; output out1, out2, out3; integer i; assign #(0.987) out1= in1& in2; assign #(1'bz) out2 = in1 & in2; //warning, delay has x or z assign #(i) out3 = in1 & in2; //warning, delay is not a constant endmodule
nLint reports: document1.v(8): Warning 22159: delay value "1'bz" is not a constant. (Design Style) document1.v(9): Warning 22159: delay value "i" is not a constant. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is port (Clock : in bit; A : in bit; S : out bit ); end top_ety; architecture arch of top_ety is signal Time_Dly : time := 20 ns;
10 11 12 13 14 15 16 17 18 19
begin process (Clock) begin if (Clock'event and Clock = '1') then S <= A after Time_Dly; --warning on "Time_Dly", --delay value is not constant else end if; end process; end arch;
nLint reports: document.vhd(14): Warning 22159: delay value "time_dly" is not a constant. (Design Style)
nLint reports following if the argument value is ("CHECK_ALL"): document.v(8): Warning 22161: wire "f1" should be explicitly declared. (Coding Style) document.v(9): Warning 22161: wire "f2" should be explicitly declared. (Coding Style) ///////////////example : document2.v2k//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 module top(clk, a, b, Din); input clk; input [3:0] a, b, Din; genvar k; generate for (k = 0; k<4; k = k+1) begin: GEN_FF sub inst_DFF (.D(Din[k]),.Q(Qout[k]),.CK(clk) ); end endgenerate assign out = a + b; endmodule //no warning on "out"
//warning on "Qout"
module sub(input CK, input D, reg Q; always @(posedge CK) begin Q <= D; end endmodule
output Q);
document2.v2k(8): Warning 22161: wire "Qout" should be explicitly declared. (Coding Style)
nLint reports: document.v(5): Warning 22165: signal "q" is driven by a constant. (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : inout std_logic ); end entity top_ety; architecture arch of top_ety is begin p2: process (reset,clock) is begin if ( reset = '1' ) then q <= '0'; --warning on "q", data input is constant "0" and "1" elsif ( rising_edge(clock) ) then q<='1'; end if; end process p2; end architecture arch;
nLint reports: document.vhd(17): Warning 22165: signal "q" is driven by a constant. (Language Construct)
nLint reports: document.v(1): Information 22167: bi-directional port "f2" declared. (Design Style) document.v(1): Information 22167: bi-directional port "f1" declared. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : out std_logic; q : inout std_logic --warning on "q" ); end entity top_ety; architecture arch of top_ety is begin end architecture arch;
nLint reports: document.vhd(8): Information 22167: bi-directional port "q" declared. (Design Style)
nLint reports: document.v(8): Warning 22168: a bidirectional signal "rst"(3) is connected to a unidirectional port. (Design Style)
nLint reports: document.v(10): Error 22169: bit(s) of a function's return value "funtest[7]" are not assigned with a value. (Simulation,Language Construct)
(VHDL)
nLint reports: document.v(21): Warning 22175: asynchronous reset should not be used as synchronous reset (asynchronous reset: "reset" (document.v(13)); synchronous reset: "reset"). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is port ( reset : in bit; clock : in bit; d : in bit; x : out bit; y : out bit ); end entity top_ety; architecture arch of top_ety is
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
begin p1 : process (reset,clock) is begin if (reset='1') then -- warning here, asynchronous "reset" x<='0'; elsif (clock'event and clock='1') then x<=d; end if; end process p1; p2 : process (clock) is begin if (clock'event and clock='1') then if (reset='1') then -- synchronous "reset" here y<='0'; else y<=d; end if; end if; end process p2; end architecture arch;
nLint reports: document.vhd(24): Warning 22175: asynchronous reset should not be used as synchronous reset (asynchronous reset: "reset" (document.vhd(14)); synchronous reset: "reset"). (Design Style)
nLint reports: document.v(23): Warning 22176: asynchronous set should not be used as synchronous set (asynchronous set: "preset" (document.v(12)); synchronous set: "preset"). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is port ( set : in bit; clock : in bit; d : in bit; x : out bit; y : out bit ); end entity top_ety;
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
architecture arch of top_ety is begin p1 : process (set,clock) is begin if (set='1') then -- warning here, asynchronous "set" x<='1'; elsif (clock'event and clock='1') then x<=d; end if; end process p1; p2 : process (clock) is begin if (clock'event and clock='1') then if (set='1') then -- synchronous "set" here y<='1'; else y<=d; end if; end if; end process p2; end architecture arch;
nLint reports: document.vhd(24): Warning 22176: asynchronous set should not be used as synchronous set (asynchronous set: "set" (document.vhd(14)); synchronous set: "set"). (Design Style)
nLint reports: document.v(10): Error 22177: signal "c" is assigned by both blocking and nonblocking assignments (at line 8). (Synthesis)
nLint reports: document.v(14): Error 22179: signal "f1" in the sensitivity list is assigned within the same block. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is port( A : inout bit; Clock : in bit; D : out bit ); end top_ety; architecture arch of top_ety is begin process(A, Clock ) --A is sensitive signal begin if (Clock = '1' ) then D <= A; else A <= '1'; --warning on 'A', assigned end if; end process; end arch;
nLint reports: document.vhd(14): Error 22179: signal "A" in the sensitivity list is assigned within the same block. (Simulation)
nLint reports: document.v(16): Warning 22181: more than one clock signal detected in the module, clocks: "clock2 (16), clock3 (24), clock1 (8)". (DFT,Design Style)
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
clock1 : in bit; clock2 : in bit; d : in bit; x : out bit; y : out bit ); end entity top_ety; architecture arch of top_ety is begin p1 : process (reset,clock1) is begin if (reset='1') then x<='1'; elsif (clock1'event and clock1='1') then --warning here, clock --signal "clock1" x<=d; end if; end process p1; p2 : process (reset,clock2) is begin if (reset='1') then y<='1'; elsif (clock2'event and clock2='1') then --another clock --signal "clock2" y<=d; end if; end process p2; end architecture arch;
nLint reports: document.vhd(17): Warning 22181: more than one clock signal detected in the architecture, clocks: "clock1 (17), clock2 (27)". (DFT,Design Style)
nLint reports: document.v(11): Warning 22187: delay expression "-5" should not be negative. (Simulation,Language Construct) document.v(13): Warning 22187: delay expression "DELAY" should not be negative. (Simulation,Language Construct) document.v(14): Warning 22187: delay expression "-3" should not be negative. (Simulation,Language Construct)
nLint reports: document.v(12): Warning 22193: recursive function or task call "funtemp(sig, (n 1))" detected. (Synthesis) document.v(20): Warning 22193: recursive function or task call "nmulti(s, m)" detected. (Synthesis)
nLint reports following if the argument value is ("1000"): document.sv(5): Warning 22194: function call stack exceeds maximum depth 1000. (Synthesis)
nLint reports: document.v(7): Warning 22195: signal "out[0]" should not be assigned to itself. (Simulation) document.v(8): Warning 22195: signal "out[1]" should not be assigned to itself. (Simulation) document.v(9): Warning 22195: signal "out[2]" should not be assigned to itself. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is end top_ety; architecture arch of top_ety is signal Self : bit := '1'; begin Self <= Self; --warning here Self <= not Self; end arch;
nLint reports: document.vhd(7): Warning 22195: signal "Self" should not be assigned to itself. (Simulation)
nLint reports: document.v(7): Warning 22199: reduction operation should not be performed on single-bit signal "a". (Language Construct)
22201 Write Enable Signals for Memories should be Disabled in the Test Mode
Message <filename>(<line no.>): <severity> <rule no.>: write enable signal "%s" for memories should be disabled in the test mode. Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description Write enable signals for memories should be disabled in the test mode. If user specifies following command line option or defines preference setting in GUI mode, this rule will be checked if it is not disabled in rule setting. -we_mem <signal>=<value> Here the <value> means as the value the <signal> will be active. This rule is used to check under testing mode the <signal> should be inactive. The testing mode case can be specified by -vs port_name=value It is said that if the constant set by "-vs" which can make the signal to be the value different with the value set by "-we_mem", there is no violation. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 //in command line, when specify: //-we_mem test.WE_mem=1 -vs test.test_mode=0 //nLint will detect that test.WE_mem can not be resolved as 0. //So the memory write enable signal test.WE_mem is not disabled //by test.test_mode. module test(test_mode, WE, WE_mem); input test_mode; input WE; output WE_mem; assign WE_mem = test_mode | WE; //code inferred to memory operation //... endmodule
nLint reports: document.v(10): Warning 22201: write enable signal "test.WE_mem" for memories should be disabled in the test mode. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -----in command line, when specify: -we_mem top_ety.WE_mem=1 -vs top_ety.test_mode=0 nLint will detect that top_ety.WE_mem can not be resolved as 0. So the memory write enable signal top_ety.WE_mem is not disabled by top_ety.test_mode.
entity top_ety is port (test_mode : in bit; WE : in bit; WE_mem : out bit); end top_ety; architecture arch of top_ety is begin WE_mem <= test_mode or WE;
16
end;
nLint reports: document.vhd(10): Warning 22201: write enable signal "top_ety.WE_mem" for memories should be disabled in the test mode. (Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(20): Warning 22203: reset signal should not be used as data (reset: "reset" (document.v(13)); data: "reset"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic;
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
q : out std_logic ); end top_ety; architecture arch of top_ety is signal rst : std_logic; begin p1: process (clock,reset) is begin if (reset='1') then -- "reset" is reset signal q<='0'; elsif (rising_edge(clock)) then q<=d; end if; end process p1; p2: process (clock) is begin if (rising_edge(clock)) then q<=reset; --"reset" is used as data input end if; end process p2; end arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(27): Warning 22203: reset signal should not be used as data (reset: "reset" (document.vhd(17)); data: "reset"). (DFT,Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(18): Warning 22204: reset signal should not feed into primary output (reset: "reset" (document.v(12)); output signal: "y"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic; s : out std_logic );
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then q<='0'; elsif (rising_edge(clock)) then q<=d; end if; end process p1; p2: process (reset) is begin s<=reset; --"reset" feed into primary output end process p2; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(26): Warning 22204: reset signal should not feed into primary output (reset: "reset" (document.vhd(17)); output signal: "s"). (DFT,Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(9): Warning 22205: reset signal should not be driven by sequential logic (reset: "c" (document.v(13)); sequential logic output: "c"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic); end entity top_ety; architecture arch of top_ety is signal s : std_logic; begin p1: process (clock,reset) is
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
begin if (rising_edge(clock)) then s<=reset; --warning here, dff output "s" end if; end process p1; p2: process (clock,s) is begin if (s='1') then --"s" used as reset signal q<='0'; elsif (rising_edge(clock)) then q<=d; end if; end process p2; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(17): Warning 22205: reset signal should not be driven by sequential logic (reset: "s" (document.vhd(23)); sequential logic output: "s"). (DFT,Design Style)
nLint reports: document.v(8): Warning 22207: number of bits to shift ("num") should be a constant. (Synthesis)
nLint reports following if the argument value is ("IGNORE_ADDR"): document.v(9): Warning 22209: index variable "num" is too small to address all bits in the signal "a". (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is end top_ety; architecture arch of top_ety is subtype Int3_0 is integer range 3 downto 0; subtype Int7_0 is integer range 7 downto 0; signal A : bit_vector(7 downto 0); signal B : bit; begin process variable Index : Int3_0; begin B <= A(Index); --warning here wait; end process; end arch;
nLint reports following if the argument value is ("IGNORE_ADDR"): document.vhd(13): Warning 22209: index variable "Index" is too small to address all bits in the signal "A". (Language Construct)
nLint reports: document.v(9): Warning 22210: the value of the index variable "num" exceeds the declared range value of the signal "a[num]". (Language Construct)
nLint reports: document.v(9): Error 22211: signal "d" is stuck at logic 1. (Synthesis) document.v(10): Error 22211: signal "e" is stuck at logic 1. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end entity top_ety; architecture arch of top_ety is signal s : bit; signal x : bit; signal y : bit; begin s<='1'; --warning here y<=x xnor x; --warning here end architecture arch;
nLint reports: document.vhd(9): Error 22211: signal "s" is stuck at logic 1. (Synthesis) document.vhd(10): Error 22211: signal "y" is stuck at logic 1. (Synthesis)
nLint reports: document.v(8): Error 22213: signal "d" is stuck at logic 0. (Synthesis) document.v(9): Error 22213: signal "e" is stuck at logic 0. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end entity top_ety; architecture arch of top_ety is signal s : bit; signal x : bit; signal y : bit; begin s<='0'; --warning here y<=x and (not x); --warning here end architecture arch;
nLint reports: document.vhd(9): Error 22213: signal "s" is stuck at logic 0. (Synthesis) document.vhd(10): Error 22213: signal "y" is stuck at logic 0. (Synthesis)
nLint reports: document.v(7): Error 22217: event "full" is never triggered. (Simulation)
nLint reports: document.sv(8): Error 22218: X/Z/? is detected in casex expression "1'b0, 1'b?, 1'b1". (Synthesis) document.sv(17): Error 22218: Z/? is detected in casez expression "(en ? 1'b1 : 1'bz)". (Synthesis)
nLint reports: document.v(10): Error 22219: case label "1'bz" contains x, z or ?. (Language Construct) document.v(11): Error 22219: case label "1'bx" contains x, z or ?. (Language Construct)
nLint reports: document.v(11): Warning 22220: X detected in casez label "1'bx" (should use casex). (Language Construct)
nLint reports: document.v(13): Warning 22221: high active reset should not be used as low active reset (high active reset: "reset" (document.v(20)); low active reset: "reset"). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is port ( reset : in bit; clock : in bit; d : in bit; q : out bit; s : out bit ); end entity top_ety; architecture arch of top_ety is begin p1 : process (reset, clock) begin if (reset='1') then --active high
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
q<='0'; elsif (clock'event and clock='1') then q<=d; end if; end process p1; p2 : process (reset, clock) begin if (reset='0') then --active low s<='0'; elsif (clock'event and clock='1') then s<=d; end if; end process p2; end architecture arch;
nLint reports: document.vhd(23): Warning 22221: high active reset should not be used as low active reset (high active reset: "reset" (document.vhd(14)); low active reset: "reset"). (Design Style)
nLint reports: document.v(23): Warning 22223: high active set should not be used as low active set (high active set: "preset" (document.v(11)); low active set: "preset"). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is port ( set : in bit; clock : in bit; d : in bit; q : out bit; s : out bit ); end entity top_ety;
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
architecture arch of top_ety is begin p1 : process (set, clock) begin if (set='1') then --active high q<='1'; elsif (clock'event and clock='1') then q<=d; end if; end process p1; p2 : process (set, clock) begin if (set='0') then --active low s<='1'; elsif (clock'event and clock='1') then s<=d; end if; end process p2; end architecture arch;
nLint reports: document.vhd(23): Warning 22223: high active set should not be used as low active set (high active set: "set" (document.vhd(14)); low active set: "set"). (Design Style)
nLint reports following if the argument value is ("TRUE"): document.v(19): Error 22225: clock signal is used on both rising edge ("clock" (document.v(11)) and falling edge ("clock"). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 entity top_ety is port ( reset : in bit; clock : in bit; d : in bit; q : out bit;
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
s : out bit ); end entity top_ety; architecture arch of top_ety is begin p1 : process (reset, clock) begin if (reset='1') then q<='0'; elsif (clock'event and clock='1') then --rising edge clock q<=d; end if; end process p1; p2 : process (reset, clock) begin if (reset='1') then s<='0'; elsif (clock'event and clock='0') then --falling edge clock, mixed s<=d; end if; end process p2; end architecture arch;
nLint reports following if the argument value is ("TRUE"): document.vhd(25): Error 22225: clock signal is used on both rising edge ("clock" (document.vhd(16)) and falling edge ("clock"). (Design Style)
always @(posedge clock2) y2 = set;//"set" is used as data input, warning on "set" endmodule
nLint reports following if the argument value is ("BOTH"): document.v(13): Warning 22227: set signal should not be used as data (set: "set" (document.v(7)); data: "set"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( set : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic; s : out std_logic ); end entity top_ety; architecture arch of top_ety is signal rst : std_logic;
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
begin p1: process (clock,set) is begin if (set='1') then --"set" is used as set signal q<='1'; elsif (rising_edge(clock)) then q<=d; end if; end process p1; p2: process (clock) is begin if (rising_edge(clock)) then q<=set; -- "set" is used as data input end if; end process p2; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(28): Warning 22227: set signal should not be used as data (set: "set" (document.vhd(18)); data: "set"). (DFT,Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(19): Warning 22228: set signal should not feed into primary output (set: "set" (document.v(13)); output signal: "y"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( set : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic;
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
s : out std_logic ); end entity top_ety; architecture arch of top_ety is signal rst : std_logic; begin p1: process (clock,set) is begin if (set='1') then --"set" is used as set signal q<='1'; elsif (rising_edge(clock)) then q<=d; end if; end process p1; p2: process (rst) is begin if (rst='1') then s<='0'; else s<=set; --"set" feeds into primary output, warning on "set" end if; end process p2; end architecture arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(28): Warning 22228: set signal should not feed into primary output (set: "set" (document.vhd(18)); output signal: "s"). (DFT,Design Style)
nLint reports: document.v(10): Warning 22229: clock signal "clock2" (document.v(6)) is used as a control signal ("clock2"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( set : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic; s : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,set) is begin if (set='1') then q<='1'; elsif (rising_edge(clock)) then --"clock" is used as clock q<=d; end if; end process p1; p2: process (clock) is begin if (clock='1') then --"clock" is used as control input,
27 28 29 30 31
--warning on "clock" s<=d; end if; end process p2; end architecture arch;
nLint reports:
nLint reports: document.v(14): Warning 22231: clock signal "clk_1" (document.v(7)) is used as a set signal ("clk_1"). (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( set : in std_logic; clk_1 : in std_logic; clk_2 : in std_logic; d1 : in std_logic; d2 : in std_logic; q1 : out std_logic; q2 : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clk_1,set) is begin if (set = '1') then q1 <= '1'; elsif (rising_edge(clk_1)) then --"clk_1" is used as clock signal q1 <= d1;
23 24 25 26 27 28 29 30 31 32 33 34 35
end if; end process p1; p2: process (clk_1, clk_2) is begin if (clk_1='1') then --warning here, "clk_1" is also used --as set signal q2 <= '1'; elsif (rising_edge(clk_2)) then q2 <= d2; end if; end process p2; end architecture arch;
nLint reports: document.vhd(28): Warning 22231: clock signal "clk_1" (document.vhd(21)) is used as a set signal ("clk_1"). (DFT,Design Style)
always @( posedge clk_1 or posedge enable ) if ( enable ) //warning here, "enable" is also used as //set signal q2 <= 1'b1; else q2 <= d2; endmodule
nLint reports: document.v(14): Warning 22233: reset signal should not be used as set (reset: "enable" (document.v(8)); set: "enable"). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic; s : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock, reset) is begin if (reset='1') then --"reset" is used as reset signal q <= '0'; elsif (rising_edge(clock)) then
20 21 22 23 24 25 26 27 28 29 30 31 32 33
q <= d; end if; end process p1; p2: process (reset) is begin if (reset = '1') then --warning here, "reset" is also used --as set signal s <= '1'; elsif (rising_edge(clock)) then s <= not d; end if; end process p2; end architecture arch;
nLint reports: document.vhd(26): Warning 22233: reset signal should not be used as set (reset: "reset" (document.vhd(17)); set: "reset"). (Design Style)
Here a special
nLint reports: document1.v(7): Error 22235: all bits in signal "sig" are shifted out. (Simulation) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 //Here a special case: module test; reg clk; reg q; initial begin $monitor( "%t : q=%b", $time, q); q = 0;
9 10 11 12 13 14 15 16 17 18 19 20 21
clk = 0; #1 clk = 1; #5 $finish; end always @ (posedge clk) begin if ( ( ( 1'b1 << 1 ) > 2'b01 ) | 1'b0 ) q <= 1; end endmodule
//The simulation result is: q will be set to '1' after #1. //It is conflict with standard. nLint will follow industry tool.
nLint reports:
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is signal S1 : bit_vector(1 downto 0) := "11"; signal S2 : bit_vector(1 downto 0); constant N : integer := 3; begin S2 <= S1 sll N; --warning here, all bits of S1 is shifted out end arch;
nLint reports: document.vhd(9): Error 22235: all bits in signal "S1" are shifted out. (Simulation)
22239 (Verilog) Non-constant Case Label 22239 (VHDL) Non-constant Select Label
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: case label "%s" is not a constant. (VHDL) <filename>(<line no.>): <severity> <rule no.>: select label "%s" is not a constant. Configurable Parameter Rule group: Synthesis; Argument type: (CHECK_CONSTCASEEXPR, IGNORE_CONSTCASEEXPR); Argument description: The argument allows users to ignore the rule checking for case statements whose case expression is a constant. Select CHECK_CONSTCASEEXPR to enable the checking for case statements with constant case expression. Select IGNORE_CONSTCASEEXPR to ignore the checking for case statements with constant case expression; Default value: "IGNORE_CONSTCASEEXPR" for Verilog, "IGNORE_CONSTCASEEXPR" for VHDL; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; Description (Verilog) This rule checks whether any non-constant case labels are used in case statements. (VHDL) This rule checks whether any non-constant select labels are used in case statements. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test (out, sel, tmp, data); output out; input [2:0] sel, data; input [1:0] tmp; reg out; always @(sel or data or tmp) casex (sel) // Synopsys full_case 3'bx0: out = data[0]; 3'b01: out = data[1]; tmp: out = data[2]; //warning default: out = 0; endcase endmodule
nLint reports following if the argument value is ("IGNORE_CONSTCASEEXPR"): document.v(11): Warning 22239: case label "tmp" is not a constant. (Synthesis) ///////////////example : document_1.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module smp(zo,sel); input[3:0] sel; output[3:0] zo; reg [3:0] zo;
zo zo zo zo zo
= = = = =
16 17 18
endmodule
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 entity top_ety is end top_ety; architecture arch of top_ety is type FSM is ( start, run, stop ); signal n_dout : bit; shared variable aa : FSM := stop; shared variable bb : FSM := start; begin with bb select n_dout <= '1' when start | run, '0' when aa; --warning here end arch;
nLint reports following if the argument value is ("IGNORE_CONSTCASEEXPR"): document.vhd(12): Warning 22239: select label "aa" is not a constant. (Synthesis)
nLint reports: document.v(15): Warning 22243: default label is not the last label in the case statement. (Simulation,Language Construct)
nLint reports: document.v(6): Warning 22246: delay should not be used on the right-hand side of non-blocking assignment in sequential always blocks. (Coding Style)
nLint reports following if the argument value is ("IGNORE_DEPEND"): document.v(10): Warning 22247: delay should not be used in a non-blocking assignment. (Simulation,Synthesis) document.v(13): Warning 22247: delay should not be used in a non-blocking assignment. (Simulation,Synthesis)
22249 (Verilog) Variables with Different Bit Widths Used in Conditional Assignment Branches
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the bit widths of the conditional assignment operands "%s"(%d) and "%s"(%d) are different. Configurable Parameter Rule group: Language Construct; Argument type: (VAR_EQ_CON, VAR_GE_CON) (ORIG_MUL_WIDTH, EXPAND_MUL_WIDTH); Argument description: The first argument determines whether to report warning if the width of variable is larger than that of constant. Select VAR_EQ_CON to specify that the width of variable expression must be equal to the width of constant expression; select VAR_GE_CON to specify that the width of variable expression must be larger than or equal to the width of constant expression. The second argument determines how to calculate the bit width of the multiplication result. Select ORIG_MUL_WIDTH to specify that the bit width of multiplication follows LRM; select EXPAND_MUL_WIDTH to specify that the bit width of multiplication is the sum of two operators' bit width, and the carry bits from addition/subtraction are also counted in. Besides, the integer constant's bit width is optimized; Default value: "VAR_GE_CON","ORIG_MUL_WIDTH" for Verilog; Default severity : Level3 (Error) Description (Verilog) This rule checks whether operands in conditional assignment are of the same size. The checking won't be done if both operands are constants. If one operand is a constant and the other operand is a variable, the checking is done according to the argument setting. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 module test (a, b, c, d); input b; input [2:0] c; input [3:0] d; output [3:0] a; reg [3:0] a; assign a = b ? c[2:1] : d[3:0]; //warning endmodule
nLint reports following if the argument value is ("VAR_GE_CON","ORIG_MUL_WIDTH"): document.v(8): Error 22249: the bit widths of the conditional assignment operands "c[2:1]"(2) and "d[3:0]"(4) are different. (Language Construct) ///////////////example : document2.v2k//////////// 1 2 3 4 5 6 7 8 9 10 11 module mult(a,b,test, prod1, prod2, prod3, prod4); input [9:0] a; input [7:0] b; input test; output [24:0] prod1, prod2, prod3, prod4; assign prod1 assign prod2 assign prod3 assign prod4 endmodule [19:0] [19:0] [19:0] [19:0] = = = = test test test test ? ? ? ? a a a 0 : : : : (2'b0 * {2'b0, b[7:0]}); (b[1:0] * b[7:0]); b + 1; (a[9:2]*b[7:0]);
"EXPAND_MUL_WIDTH"): document2.v2k(7): Error 22249: the bit widths of the conditional assignment operands "a"(10) and "(2'b0 *..."(12) are different. (Language Construct) document2.v2k(9): Error 22249: the bit widths of the conditional assignment operands "a"(10) and "(b + 1)"(9) are different. (Language Construct)
nLint reports: document.v(7): Warning 22251: integer "i" is used in concatenation. (Language Construct)
nLint reports: document.v(3): Warning 22252: multiple concatenation "21'b1" is used. (Design Style) document.v(5): Warning 22252: multiple concatenation "21'b1" is used. (Design Style)
nLint reports: document.v2k(3): Warning 22254: confusing self-determined expressions should not be used. (Design Style)
nLint reports following if the argument value is ("BOTH","CHECK_VOIDFUNC"): document.v(15): Warning 22255: function/task "shift" refers to a non-local variable "out". (Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end top_ety; architecture arch of top_ety signal S : bit; procedure ABC ( signal A : signal B : begin B <= A and S; --warning end ABC; begin is in bit; out bit ) is here
12
end arch;
nLint reports following if the argument value is ("BOTH","CHECK_VOIDFUNC"): document.vhd(9): Warning 22255: function/task "ABC" refers to a non-local variable "S". (Language Construct)
nLint reports: document.v(16): Warning 22259: loop variable "index" should be an integer. (Language Construct)
51 52 53 54 55 56
Warning 22261: tri-state "out" should not be inferred in a non-top Style) Warning 22261: tri-state "out" should not be inferred in a non-top Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 library IEEE; use IEEE.std_logic_1164.all; entity EA is port ( en : in std_logic; d : in std_logic; q : out std_logic ); end entity EA; architecture arch of EA is begin p1: process (en, d) is begin if (en = '1') then q <= d; else q <='Z'; --a tri-state inferred, "EA" is not top --architecture, warning here end if; end process p1; end architecture arch; library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic ); end entity top_ety; architecture arch of top_ety is component EA is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic ); end component EA; begin u0 : component EA port map (reset=>reset, clock=>clock, d=>d , q=>q); end architecture arch;
nLint reports: document.vhd(16): Warning 22261: tri-state "q" should not be inferred in a non-top module. (Design Style)
nLint reports: document.v(1): Warning 22263: null port is used in the module definition. (Design Style)
assign a = b + c; endmodule
nLint reports following if the argument value is ("VAR_GE_CON"): document.v(6): Error 22265: bit width of left-hand-side operand "b"(8) does not match the right-hand-side operand "c"(2) in addition or subtraction operation. (Language Construct)
assign a = b + c; endmodule
nLint reports following if the argument value is ("IGNORE_INCRDECR"): document.v(6): Warning 22267: possible loss of carry or borrow in addition or subtraction left operand "b" and right operand "c". (Language Construct) ///////////////example : document_1.v//////////// 1 2 3 4 module test; wire [7:0] a; assign a = a + 1; endmodule
assign a = b * c; endmodule
nLint reports: document.v(6): Warning 22268: possible loss value between left operand "b" and right operand "c" in multiplication. (Language Construct)
nLint reports following if the argument value is ("SYNC","1" ): document.v(8): Warning 22269: the number of combinational logic between register "test.test:Always2#Always0:8:9:Reg" and register "test.test:Always3#Always1:14:15:Reg" (document.v(14)) is 2 (should not exceed 1). (Simulation,DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 entity top_ety is port (clk : in bit; a : in bit; R : out bit); end top_ety;
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
architecture arch of top_ety is signal c, d, e, R1 : bit; begin process(clk) begin if (clk'event and clk='1') then R1 <= a; end if; end process; c <= R1; d <= c; process(clk) begin if (clk'event and clk='1') then R <= d; end if; end process; end arch;
nLint reports following if the argument value is ("SYNC","1" ): document.vhd(10): Warning 22269: the number of combinational logic between register "top_ety.top_ety(arch):Process0#line__10:10:15:Reg" and register "top_ety.top_ety(arch):Process3#line__20:20:25:Reg" (document.vhd(20)) is 2 (should not exceed 1). (Simulation,DFT,Design Style)
nLint reports following if the argument value is ("10"): document.v(5): Warning 22271: snake path detected between register "top.a_dff.dff:Always0#Always0:5:6:Reg" and register "top.c_dff.dff:Always0#Always0:5:6:Reg"(document.v(5)), and the number of comb logic between the two regs is 3(should not exceed 1). (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 library ieee; use ieee.std_logic_1164.all; entity dff is port (clk, i : in std_logic; o : out std_logic); end dff;
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
architecture arch of dff is begin Process(clk) begin if (clk'event and clk = '1') then o <= i; end if; end Process; end arch; library ieee; use ieee.std_logic_1164.all; entity comb is port (i1, i2 : in std_logic; o : out std_logic); end comb; architecture arch of comb is begin o <= i1 and i2; end arch; library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk, i : in std_logic; o : out std_logic); end top_ety; architecture arch of top_ety is component dff port (clk, i : in std_logic; o : out std_logic); end component; component comb port (i1, i2 : in std_logic; o : out std_logic); end component; signal a1, a2, b1, b2, c1, c2, d : std_logic; begin a_dff : dff port map ( a_comb : comb port map b_comb : comb port map c_comb : comb port map c_dff : dff port map ( end arch;
clk => clk, ( i1 => a1, ( i1 => b1, ( i1 => c1, clk => clk,
nLint reports following if the argument value is ("10"): document.vhd(11): Warning 22271: snake path detected between register "top_ety.a_dff.dff(arch):Process0#line__11:11:16:Reg" and register "top_ety.c_dff.dff(arch):Process0#line__11:11:16:Reg"(document.vhd(11)), and the number of comb logic between the two regs is 3(should not exceed 1). (Simulation)
nLint reports: document.v(2): Error 22273: registers clocked by "test.clk" (with clock source "test.clk") should be separated with registers clocked by "test.clk" (clock source "test.clk") in different module. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 entity top_ety is port (clk : in bit; i : in bit; o1 : out bit; o2 : out bit); end top_ety; architecture arch of top_ety is begin process (clk,i) begin if (clk'event and clk = '1') then o1 <= i; end if; end process; process (clk,i) begin if (clk'event and clk = '0') then o2 <= i; end if; end process; end arch;
nLint reports: document.vhd(2): Error 22273: registers clocked by "top_ety.clk" (with clock source "top_ety.clk") should be separated with registers clocked by "top_ety.clk" (clock source "top_ety.clk") in different module. (Design Style)
nLint reports: document.v(5): Error 22275: the clock generate circuit should be separated in different module. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 entity top_ety is end top_ety; architecture arch of top_ety is signal clk, c1, c2 : bit; signal d, q : bit; begin clk <= c1 and c2; process(clk, d) begin if (clk'event and clk = '1') then q <= d; end if; end process; end arch;
nLint reports: document.vhd(11): Error 22275: the clock generate circuit should be separated in different module. (Design Style)
nLint reports: document.v(14): Error 22277: the reset generate circuit should be separated in different module. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; entity top_ety is port ( data : inout std_logic_vector(7 downto 0); error_in : in std_logic; C1 : in std_logic; reset : in std_logic ); end top_ety; architecture arch signal n_din10 signal clk_en1 signal dout01 begin of top_ety is : std_logic_vector(7 downto 0); : std_logic; : std_logic;
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
dout01 <= error_in and clk_en1; process (C1, dout01, data) begin if (dout01 = '1' or dout01 = 'H') then n_din10 <= "00000000"; elsif (dout01 = '0' or dout01 = 'L') then if (C1 = '1' or C1 = 'H') then n_din10 <= data; end if; else n_din10 <= (others => 'X'); end if; end process; end arch;
nLint reports: document.vhd(24): Error 22277: the reset generate circuit should be separated in different module. (Design Style)
nLint reports following if the argument value is ("INPUT,OUTPUT,INOUT"): document.v(3): Warning 22279: port "b" is deliberately not connected. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 entity EA is port ( r1: in bit; r2: out bit ); end EA; architecture arch of EA is begin end arch; entity top_ety is port ( s1: in bit; s2: out bit ); end top_ety; architecture arch of top_ety is component EA is port ( r1: in bit; r2: out bit );
22 23 24 25 26
end component; begin u0: component EA port map (r1=>s1); --warning 22082 on 'r2' u1: component EA port map (r1=>s1, r2=>open); --warning 22279 on 'r2' end arch;
nLint reports following if the argument value is ("INPUT,OUTPUT,INOUT"): document.vhd(25): Warning 22279: port "r2" is deliberately not connected. (Simulation)
nLint reports following if the argument value is ("INPUT,OUTPUT,INOUT"): document.v(3): Warning 22281: gate port "b" is not connected. (Simulation) document.v(4): Warning 22281: gate port "b" is not connected. (Simulation)
nLint reports following if the argument value is ("INPUT,OUTPUT,INOUT"): document.v(3): Warning 22283: gate port "b" is deliberately not connected. (Simulation)
22301 (Verilog) Zero Implicitly Filled to Higher Bits of LHS Variable in Assignment
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: zero is implicitly assigned to higher %d bits of left-hand-side variable "%s"(%d), and the remaining bits are exactly assigned with the right-hand-side expression "%s"(%d) in the assignment. Configurable Parameter Rule group: Language Construct; Argument type: (IGNORE_CONST_RHS, CHECK_CONST_RHS) (ORIG_MUL_WIDTH, EXPAND_MUL_WIDTH); Argument description: The first argument determines whether to check constant RHS. Select CHECK_CONST_RHS to specify that the rule 22301 should be checked if RHS is a constant expression, and the bit width of integer constant is optimized; select IGNORE_CONST_RHS to specify that the rule 22301 doesn't need to be checked if RHS is a constant expression. The second argument determines how to calculate the bit width of the multiplication result. Select ORIG_MUL_WIDTH to specify that the bit width of multiplication follows LRM; select EXPAND_MUL_WIDTH to specify that the bit width of multiplication is the sum of two operators' bit width, and the carry bits from addition/subtraction are also counted in. Besides, the integer constant's bit width is optimized; Default value: "IGNORE_CONST_RHS","ORIG_MUL_WIDTH" for Verilog; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether zero is implicitly assigned to the left-hand-side (LHS) variable in an assignment. If the bit width of the LHS variable is larger than the right-hand-side (RHS) expression, including carry bits or borrow bits, the extra bits of the LHS variable are implicitly assigned with '0', which is an unexpected behavior. This rule doesn't need to be checked if the RHS expression is a signed expression since tools will automatically extend the signed bits to match the target width. Example
(Verilog) ///////////////example : document.v2k//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 module test1(a, b, c, d, e, out1, out2, out3, out4, out5, out6, out7); input [1:0] a, b; input signed [1:0] c, d; input [1:0] e; output [7:0] out1, out2, out3, out4, out5, out6, out7; assign assign assign assign out1 out2 out3 out4 = = = = a * b; {2'b0,a} * {2'b0,b}; {2'b01,a} * {2'b10,b}; a; //warning, //warning, //warning, //warning, 8 8 8 8 bits bits bits bits V.S. V.S. V.S. V.S. 4 4 7 2 bits bits bits bits
//no warning on signed expression //no warning on signed expression //warning, 8 bits V.S. 3 bits
nLint reports following if the argument value is ("IGNORE_CONST_RHS","ORIG_MUL_WIDTH"): document.v2k(8): Warning 22301: zero is implicitly assigned to higher 4 bits of left-hand-side variable "out1"(8), and the remaining bits are exactly assigned with the right-hand-side expression "(a * b)"(4) in the assignment. (Language Construct)
document.v2k(9): Warning 22301: zero is implicitly assigned to higher 4 bits of left-hand-side variable "out2"(8), and the remaining bits are exactly assigned with the right-hand-side expression "(2'b0, a * 2'b0, b)"(4) in the assignment. (Language Construct) document.v2k(10): Warning 22301: zero is implicitly assigned to higher 1 bits of left-hand-side variable "out3"(8), and the remaining bits are exactly assigned with the right-hand-side expression "(2'b01, a * 2'b10, b)"(7) in the assignment. (Language Construct) document.v2k(11): Warning 22301: zero is implicitly assigned to higher 6 bits of left-hand-side variable "out4"(8), and the remaining bits are exactly assigned with the right-hand-side expression "a"(2) in the assignment. (Language Construct) document.v2k(15): Warning 22301: zero is implicitly assigned to higher 5 bits of left-hand-side variable "out7"(8), and the remaining bits are exactly assigned with the right-hand-side expression "(c + e)"(3) in the assignment. (Language Construct) ///////////////example : document2.v2k//////////// 1 2 3 4 5 6 module test(a, b); output [3:0] a; output [33:0] b; assign a = 3'b110; endmodule //no warning if select argument "IGNORE_CONST_RHS"
nLint reports following if the argument value is ( IGNORE_CONST_RHS ): ///////////////example : document3.v2k//////////// 1 2 3 4 5 6 7 module test(a, b); output [3:0] a; output [33:0] b; assign a = 3'b110; assign b = 2; endmodule //warning if select argument "CHECK_CONST_RHS" //no warning on signed expression
nLint reports following if the argument value is ( CHECK_CONST_RHS ): document3.v2k(5): Warning 22301: zero is implicitly assigned to higher 1 bits of left-hand-side variable "a"(4), and the remaining bits are exactly assigned with the right-hand-side expression "3'b110"(3) in the assignment. (Language Construct) ///////////////example : document4.v2k//////////// 1 2 3 4 5 6 7 8 9 10 11 12 module mult(a, b, prod1, prod2, prod3, prod4); input input output assign assign assign assign endmodule [9:0] [7:0] [17:0] a; b; prod1, prod2, prod3, prod4;
prod1 = {2'b0, a[9:2]} * b; prod2 = {1'd1, a[7:0]} * b; prod3[7:0] = {4'b0, a[9:8]} * a[1:0]; prod4[4:0] = (a[0]+1) * {1'b0, b[1]};
nLint reports following if the argument value is ( "CHECK_CONST_RHS", "EXPAND_MUL_WIDTH"): document4.v2k(8): Warning 22301: zero is implicitly assigned to higher 1 bits of left-hand-side variable "prod2"(18), and the remaining bits are exactly assigned with the right-hand-side expression "(1'd1, a[7:0] * b)"(17) in the assignment. (Language Construct) document4.v2k(10): Warning 22301: zero is implicitly assigned to higher 1 bits of left-hand-side variable "prod4[4:0]"(5), and the remaining bits are exactly assigned with the right-hand-side expression "((a[0] + 1) * 1'b0, b[1])"(4) in the assignment. (Language Construct)
nLint reports following if the argument value is ("LHS_GE_RHS","VAR_EQ_CON"): document.sv(5): Error 22303: bit width of left-hand side variable "var1[0]"(1) does not match that of right-hand side variable "2"(2) in the assignment. (Language Construct) document.sv(11): Error 22303: bit width of left-hand side variable "var3_S.a"(1) does not match that of right-hand side variable "2"(2) in the assignment. (Language Construct) ///////////////example : document1.sv//////////// 1 2 3 /* rule 22303 */ module test;
4 5 bit [31:0] h; 6 bit [15:0] i; 7 bit [31:0] j; 8 9 int a1 [2:0] = {h, i, j}; // warning on a1[1] if the argument value is ("LHS_EQ_RHS","VAR_EQ_CON") 10 logic [1:0] a2 [2:0] = {1'b1, 2'b0, 3'b1}; // warning on a2[2] and a2[0] if the argument value is ("LHS_EQ_RHS","VAR_EQ_CON") 11 12 endmodule
nLint reports following if the argument value is ( "LHS_EQ_RHS", "VAR_EQ_CON"): document1.sv(9): Error 22303: bit width of left-hand side variable "a1[1]"(32) does not match that of right-hand side variable "i"(16) in the assignment. (Language Construct) document1.sv(10): Error 22303: bit width of left-hand side variable "a2[2]"(2) does not match that of right-hand side variable "1'b1"(1) in the assignment. (Language Construct) document1.sv(10): Error 22303: bit width of left-hand side variable "a2[0]"(2) does not match that of right-hand side variable "3'b1"(3) in the assignment. (Language Construct) ///////////////example : document2.sv//////////// 1 /* rule 22303 */ 2 3 module test; 4 5 bit [31:0] h; 6 bit [15:0] i; 7 bit [31:0] j; 8 9 int a1 [2:0] = {h, i, j}; // warning on a1[1] if the argument value is ("LHS_EQ_RHS","VAR_GE_CON") 10 logic [1:0] a2 [2:0] = {1'b1, 2'b0, 3'b1}; // warning on a2[0] if the argument value is ("LHS_EQ_RHS","VAR_GE_CON") 11 12 endmodule
nLint reports following if the argument value is ( "LHS_EQ_RHS", "VAR_GE_CON"): document2.sv(9): Error 22303: bit width of left-hand side variable "a1[1]"(32) does not match that of right-hand side variable "i"(16) in the assignment. (Language Construct) document2.sv(10): Error 22303: bit width of left-hand side variable "a2[0]"(2) does not match that of right-hand side variable "3'b1"(3) in the assignment. (Language Construct)
nLint reports: document.v(4): Warning 22306: variable "d1"(64), because it bits over 32. (Coding Style) document.v(7): Warning 22306: variable "d2"(64), because it bits over 32. (Coding Style)
literal constant "'bz" should not be assigned to may result in ambiguous extension of significant literal constant "'bx" should not be assigned to may result in ambiguous extension of significant
nLint reports following if the argument value is ("IGNORE_IN_COMB"): document.v(7): Warning 23001: bit range of sensitive signal "reset[1]" should not be used in sensitivity list. (Synthesis,Design Style) document.v(7): Warning 23001: bit range of sensitive signal "clock[0]" should not be used in sensitivity list. (Synthesis,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is port ( Clock : in bit_vector(1 downto 0); Reset : in bit_vector(1 downto 0); D : in bit; Q : out bit ); end top_ety; architecture arch of top_ety is begin process( Clock(1), Reset(1) ) --warning here begin if ( Reset(1) = '1' ) then Q <= '0'; elsif ( Clock(1)'event and Clock(1) = '1' ) then
15 16 17 18
nLint reports following if the argument value is ("IGNORE_IN_COMB"): document.vhd(10): Warning 23001: bit range of sensitive signal "Reset(1)" should not be used in sensitivity list. (Synthesis,Design Style) document.vhd(10): Warning 23001: bit range of sensitive signal "Clock(1)" should not be used in sensitivity list. (Synthesis,Design Style)
23002 (Verilog) Inferred Storage Not in Library 23002 (VHDL) Inferred Storage
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: %s inferred on signal "%s" not in library. (VHDL) <filename>(<line no.>): <severity> <rule no.>: %s inferred on signal "%s". Configurable Parameter Rule group: Synthesis; Argument type: (REGISTER, LATCH, MEMORY, COUNTER); Argument description: This is a multiple selection argument. Select REGISTERto check register inferred; select LATCH to check latch inferred; select MEMORY to specify to check memory inferred; select COUNTER to check counter inferred Default value: "REGISTER,LATCH,MEMORY,COUNTER" for Verilog, "REGISTER,LATCH,MEMORY,COUNTER" for VHDL; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (Verilog) This rule checks and reports violations on all inferred storages not in library. Any code in -y/-v files or embraced by `celldefine, `endcelldefine will be treated as legal to this rule. (VHDL) This rule checks and reports violations on all inferred storages. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 module test (clk, d, q); input clk, d; output q; reg q; always @(posedge clk) q = d; // register inferred not in library endmodule
nLint reports following if the argument value is ("REGISTER,LATCH,MEMORY,COUNTER"): document.v(7): Warning 23002: register inferred on signal "q" not in library. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is
15 16 17 18 19 20 21 22
begin if (reset='1') then q<='0'; elsif (clock'event and clock='1') then q<=d; -- a asynchronous register inferred end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("REGISTER,LATCH,MEMORY,COUNTER"): document.vhd(17): Warning 23002: register inferred on signal "q". (Synthesis)
nLint reports following if the argument value is ("FALSE"): document.v(7): Warning 23003: latch is inferred on signal "c". (Synthesis) ///////////////example : document.sv//////////// 1 2 3 4 5 6 7 8 9 10 11 //the argument is specified FALSE module test(input d,clk, output reg q1, q2); always_latch begin if(clk) //this latch not be flagged q1 <= d; end always begin if(clk) q2 <= d; //this latch flagged end endmodule
nLint reports following if the argument value is ("FALSE"): document.sv(8): Warning 23003: latch is inferred on signal "q2". (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( reset : in std_logic; clock : in std_logic; d : in std_logic; q : out std_logic );
10 11 12 13 14 15 16 17 18 19 20 21 22
end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset='1') then q<='0'; elsif (clock='1') then q<=d; -- a latch inferred, warning on "q" end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("FALSE"): document.vhd(18): Warning 23003: latch is inferred on signal "q". (Synthesis)
nLint reports: document.v(8): Warning 23004: mux inferred on signal "q". (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 entity top_ety is port ( en : in bit; d1 : in bit; d2 : in bit; q : out bit); end top_ety; architecture arch of top_ety is begin p1: process (en, d1, d2) is begin if (en = '1') then q <= d1; else q<=d2; --a mux "q" inferred, warning here end if; end process p1; end architecture arch;
nLint reports: document.vhd(13): Warning 23004: mux inferred on signal "q". (Synthesis)
nLint reports: document.v(8): Warning 23005: tri-state logic is inferred on signal "c". (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port ( en : in std_logic; d : in std_logic; q : out std_logic ); end entity top_ety; architecture arch of top_ety is begin p1: process (en, d) is begin if (en = '1') then q <= d; else q<='Z'; --a tri-state "q" inferred, warning here end if; end process p1; end architecture arch;
nLint reports: document.vhd(16): Warning 23005: tri-state logic is inferred on signal "q". (Synthesis)
nLint reports: document.v(6): Information 23006: not all possible values of the case expression are covered but a default clause exists. (Language Construct)
nLint reports following if the argument value is ("IGNORE_IN_SEQ","FOLLOW_FULL_CASE_DIRECTIVE"): document.v(7): Warning 23007: not all possible values of the case expression are covered by the case items. (Language Construct) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test (in,out,clk); input [1:0] in; input clk; output out; reg out; always @(posedge clk) begin case(in) //synopsys full_case 2'b00: out=0; 2'b01: out=1; 2'b10: out=0; endcase end endmodule
IGNORE_FULL_CASE_DIRECTIVE): document2.v(8): Warning 23007: not all possible values of the case expression are covered by the case items. (Language Construct)
nLint reports following if the argument value is ("IGNORE_IN_SEQ"): document.v(12): Warning 23008: all cases are covered but no default label found. (Simulation,Synthesis)
nLint reports: document.v(13): Warning 23009: default branch is unreachable because case alternatives have covered all the possibilities of case expression. (Coding Style)
23010 (Verilog) Incomplete Case Expression with Default Clause and Synopsys 'full_case' Directive
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: not all possible values of the case expression are covered in a full case but a default clause exists. Configurable Parameter Rule group: Language Construct; Argument type: none; Default severity : Level1 (Information) This rule is turned OFF by default; Description (Verilog) This rule checks whether all possible values of a case expression are covered in a case where a default clause and "synopsys full_case" directive exists. The default clause should be used to catch x or z. If the rule is violated, the missing case labels would be caught by the default clause as well. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test; wire [1:0] a; reg b; always @(a) casez (a[1:0]) // synopsys full_case 2'b00: b = 1'b1; 2'b01: b = 1'b0; 2'b10: b = 1'bx; default: b = 1'bz; //2'b11 is not covered but default exists. endcase endmodule
nLint reports: document.v(7): Information 23010: not all possible values of the case expression are covered in a full case but a default clause exists. (Language Construct)
nLint reports: document.v(5): Error 23011: signal "b" should be included in the sensitivity list. (Simulation,Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 2 3 4 5 6 7 ex1: process(A) --warning here, "B" should be put in sensitivity list C = A and B; ex2: package mmm is type my_record is record a : bit; b: integer; end record; end mmm; use work.mmm.all; entity rec is port ( s : in my_record; s1 : out my_record ); end rec; architecture arch of rec is begin p1 : process (s.a) is --warning here, "s.b" should be put in --sensitivity list begin s1 <= s; end process p1; end arch;-------------------example : document1.vhd------------entity top_ety is end top_ety; architecture arch of top_ety is signal A, B, C : bit; begin process (A) --warning here, "B" should be put in sensitivity list
8 9 10 11
nLint reports: document1.vhd(9): Error 23011: signal "B" should be included in the sensitivity list. (Simulation,Synthesis) -------------------example : document2.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 package mmm is type my_record is record a : bit; b: integer; end record; end mmm; use work.mmm.all; entity top_ety is port ( s : in my_record; s1 : out my_record ); end top_ety; architecture arch of top_ety is begin p1 : process (s.a) is --warning here, "s.b" should be put in --sensitivity list begin s1 <= s; end process p1; end arch;
nLint reports: document2.vhd(20): Error 23011: signal "s.b" should be included in the sensitivity list. (Simulation,Synthesis)
nLint reports following if the argument value is ("BOTH","IGNORE_PART_SEL"): document.v(6): Warning 23013: signal "in3" should not be included in the sensitivity list. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ex1: process(A,B,C) --warning here, "C" is not a sensitive signal D <= A and B; ex2: package mmm is type my_record is record a : bit; b: integer; end record; end mmm; use work.mmm.all; entity rec is port ( s : in my_record; s1 : out my_record ); end rec; architecture arch of rec is begin p1 : process (s) is --warning here, "s.b" is not a --sensitive signal
22 23 24 25 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
begin s1.a <= s.a; end process p1; end arch;-------------------example : document1.vhd------------entity top_ety is port ( A : in bit; B : in bit; C : in bit; D : out bit ); end top_ety; architecture arch of top_ety is begin process(A,B,C) --warning here, "C" is not a sensitive signal begin D <= A and B; end process; end arch;
nLint reports following if the argument value is ("BOTH","IGNORE_PART_SEL"): document1.vhd(11): Warning 23013: signal "C" should not be included in the sensitivity list. (Simulation) -------------------example : document2.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 package mmm is type my_record is record a : bit; b: integer; end record; end mmm; use work.mmm.all; entity top_ety is port ( s : in my_record; s1 : out my_record ); end top_ety; architecture arch of top_ety is begin p1 : process (s) is -- "s.b" is not used here --warning here if set argument "CHECK_PART_SEL" --no warning if set argument "IGNORE_PART_SEL" begin s1.a <= s.a; end process p1; end arch;
nLint reports following if the argument value is ("BOTH","CHECK_PART_SEL"): document2.vhd(17): Warning 23013: signal "s.b" should not be included in the sensitivity list. (Simulation)
nLint reports following if the argument value is ("BLOCKING","TEMP_ASSIGN,REG_INFER_ASSIGN"): document.v(7): Error 23015: BLOCKING assignment is used in an edge triggered block. (Synthesis) document.v(10): Error 23015: BLOCKING assignment is used in an edge triggered block. (Synthesis) document.v(11): Error 23015: BLOCKING assignment is used in an edge triggered block. (Synthesis) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 module test; reg clock; reg a,b,c; always @(posedge clock) begin a = b; c = a; //choose BLOCKING, IGNORE_DEPEND; //block assignment in edge-trigger block will cause //mismatch between pre-synthesis and //post-synthesis simulation end
13
endmodule
nLint reports following if the argument value is ("BLOCKING", "IGNORE_DEPEND"): document1.v(7): Error 23015: BLOCKING assignment is used in an edge triggered block. (Synthesis) document1.v(8): Error 23015: BLOCKING assignment is used in an edge triggered block. (Synthesis) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 module test; reg clock; reg a,b,c; always @(posedge clock) begin a = b; //warning here c = a; //choose BLOCKING, CHECK_DEPEND; //no warning here end endmodule
nLint reports following if the argument value is ("BLOCKING", "CHECK_DEPEND"): document2.v(7): Error 23015: BLOCKING assignment is used in an edge triggered block. (Synthesis)
nLint reports following if the argument value is ("NONBLOCKING","FALSE"): document.v(7): Error 23016: NONBLOCKING assignment is used in a combinational block. (Synthesis) document.v(10): Error 23016: NONBLOCKING assignment is used in a combinational block. (Synthesis) document.v(11): Error 23016: NONBLOCKING assignment is used in a combinational block. (Synthesis) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 10 11 module test; reg in; reg a,o; always @(in) begin a <= in; o <= a; //choose NONBLOCKING, IGNORE_DEPEND; //non-block assignment in combinational block will //cause mismatch between pre-synthesis and //post-synthesis simulation end
12
endmodule
nLint reports following if the argument value is ("NONBLOCKING", "IGNORE_DEPEND"): document1.v(6): Error 23016: NONBLOCKING assignment is used in a combinational block. (Synthesis) document1.v(7): Error 23016: NONBLOCKING assignment is used in a combinational block. (Synthesis) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 module test; reg in; reg a,o; always @(in) begin a <= in; //warning o <= a; //choose NONBLOCKING, CHECK_DEPEND; //no warning end endmodule
nLint reports following if the argument value is ("NONBLOCKING", "CHECK_DEPEND"): document2.v(6): Error 23016: NONBLOCKING assignment is used in a combinational block. (Synthesis)
nLint reports: document.v(9): Warning 23017: conditions in this if statement are not orderdependent; use case statement instead. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 entity top_ety is port ( Sel : in bit_vector(1 downto 0); Din : in bit_vector(3 downto 0); Qout : out bit ); end top_ety; architecture arch of top_ety is begin process (Sel) begin if ( Sel = "00" ) then Qout <= Din(0); elsif ( Sel = "01" ) then Qout <= Din(1); elsif ( Sel = "10" ) then
17 18 19 20 21 22
Qout <= Din(2); else Qout <= Din(3); end if; end process; end arch;
nLint reports: document.vhd(12): Warning 23017: conditions in this if statement are not orderdependent; use case statement instead. (Synthesis)
nLint reports following if the argument value is ("NON_LEAF",""): document.v(15): Warning 23021: primitive gate "U_and" found in non_leaf module. (Synthesis) document.v(30): Warning 23021: primitive gate "and1" found in non_leaf module. (Synthesis)
nLint reports: document.v(10): Warning 23025: bit index or range "[s]" should be a constant for signal "in[s]". (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is end top_ety; architecture arch of top_ety is signal clk : bit; signal in_s : bit_vector(2 downto 0); signal out_s : bit_vector(2 downto 0); begin process( clk ) variable index_v : integer := 1; begin out_s(index_v) <= in_s(index_v); --warning here for index_v in 0 to 2 loop out_s(index_v) <= in_s(index_v); --no warning here end loop; end process; end arch;
nLint reports: document.vhd(12): Warning 23025: bit index or range "(index_v)" should be a constant for signal "in_s(index_v)". (Synthesis) document.vhd(12): Warning 23025: bit index or range "(index_v)" should be a constant for signal "out_s(index_v)". (Synthesis)
nLint reports: document.v(5): Warning 23026: loop variable not the same in all parts. (Synthesis)
nLint reports following if the argument value is ("IGNORE_SUBPROG"): document.v(11): Warning 23027: loop count should be a constant. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 entity Reg is port ( Clk : in bit; D : in bit; Q : out bit ); end Reg; architecture RTL_Reg of Reg is begin process( Clk ) begin if ( Clk'event and Clk = '1' ) then Q <= D; end if; end process; end RTL_Reg; entity top_ety is port ( Clk : in bit; Sig : inout bit_vector( 7 downto 0 );
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Qout: out bit_vector( 7 downto 0 ) ); end top_ety; architecture arch of top_ety is component Reg port ( Clk : in bit; D : in bit; Q : out bit ); end component; signal End_v : integer := 7; begin process begin for Index_v in 0 to End_v loop Sig(Index_v) <= '1' ; end loop; wait; end process;
--warning here
Gen_Lbl: for Index_v in 0 to End_v generate U_all: Reg port map( Clk => Clk, D => Sig(Index_v), Q => Qout(Index_v) ); end generate Gen_Lbl; end arch;
--warning here
nLint reports following if the argument value is ("IGNORE_SUBPROG"): document.vhd(36): Warning 23027: loop count should be a constant. (Synthesis) document.vhd(42): Warning 23027: loop count should be a constant. (Synthesis)
nLint reports: document.v(16): Warning 23028: memory "macroram[addr]" is written (at line 16) and read (at line 15) at same time. (Simulation,Language Construct)
nLint reports: document.v(8): Warning 23029: signal "y1" should not be assigned and referenced with the same conditions in different sequential blocks (at line 13). (Simulation,Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 entity top_ety is port (Clk : in bit; A : in bit; B : in bit); end top_ety; architecture rtl of top_ety is subtype AType is bit; shared variable Y1, Y2: AType; begin process(Clk) begin if ( Clk'event and Clk = '1' ) then Y1 := A; --"Y1" is assigned when "Clk" rising end if; end process; process(Clk)
19 20 21 22 23 24 25 26 27 28 29
begin if ( Clk'event and Clk = '1' ) then if ( Y1 = '1' ) then --"Y1" is referenced when "Clk" rising, -- Only shared variable will violate this Y2 := B; else Y2 := '0'; end if; end if; end process; end rtl;
nLint reports: document.vhd(14): Warning 23029: signal "Y1" should not be assigned and referenced with the same conditions in different sequential blocks (at line 21). (Simulation,Language Construct)
always @( sel or a ) if ( sel ) d2 = ~a; else d2 = ~d1; // "d1" referenced under @(a) when (!sel) endmodule
nLint reports: document.v(11): Warning 23030: signal "d1" should not be assigned and referenced under same condition in different combinational blocks (at line 17). (Simulation,Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity top_ety is port (A : in bit; B : in bit); end top_ety; architecture rtl of top_ety is subtype AType is bit; shared variable Y1, Y2: AType; begin process(A, B) begin Y1 := A; --"Y1" assigned end process; process(A, B) begin if ( Y1 = '1' ) then --"Y1" referenced, warning here Y2 := B; else
20 21 22 23
nLint reports: document.vhd(12): Warning 23030: signal "Y1" should not be assigned and referenced under same condition in different combinational blocks (at line 17). (Simulation,Language Construct)
23031 (Verilog) Z or X Used in Conditional Expression 23031 (VHDL) Meta-logic Value in Conditional Expression
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: conditional expression "%s" contains z or x. (VHDL) <filename>(<line no.>): <severity> <rule no.>: conditional expression "%s" contains meta-logic value. Configurable Parameter Rule group: Language Construct, Synthesis; Argument type: (CHECK_CASEEQ, IGNORE_CASEEQ); Argument description: Select CHECK_CASEEQ to enable checking for case expressions and case labels. Select IGNORE_CASEEQ to disable checking for case expressions and case labels; Default value: "IGNORE_CASEEQ" for Verilog, "IGNORE_CASEEQ" for VHDL; Default severity : Level3 (Error) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; Description (Verilog) This rule checks whether 'x' or 'z' is used in any conditional expressions. The conditional expression with x or z is not synthesizable and it is treated as FALSE during simulation. (VHDL) This rule checks whether there are any meta-logic values used in conditional expressions. The conditional expression with meta-logic values causes mismatches between pre-synthesis and post-synthesis simulation results. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 module test (dataout, s, datain); parameter WIDTH = 4; output dataout; input s; input [WIDTH-1:0] datain; reg dataout; always @(s or datain) begin if (s == 'bz) //warning dataout = datain[0]; else if (s == 'bx) //warning dataout = datain[1]; else if (s == 'b0) dataout = datain[2]; else dataout = datain[3]; end endmodule
nLint reports following if the argument value is ("IGNORE_CASEEQ"): document.v(10): Error 23031: conditional expression "(s == 'bz)" contains z or x. (Synthesis,Language Construct) document.v(13): Error 23031: conditional expression "(s == 'bx)" contains z or x. (Synthesis,Language Construct)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library IEEE; use IEEE.STD_Logic_1164.all, IEEE.Numeric_STD.all; entity top_ety is end top_ety; architecture arch of top_ety is signal S1 : std_logic; signal S2 : unsigned( 2 downto 0 ); begin process (S1, S2) variable V : integer := 10; begin if (S1 = 'X') then --warning here V := 0; elsif (S2(2) = 'Z') then --warning here V := 1; else V := 111; end if; end process; end arch;
nLint reports following if the argument value is ("IGNORE_CASEEQ"): document.vhd(14): Error 23031: conditional expression "X" contains meta-logic value. (Synthesis,Language Construct) document.vhd(16): Error 23031: conditional expression "Z" contains meta-logic value. (Synthesis,Language Construct)
nLint reports following if the argument value is ("CONSTANT"): document.v(7): Warning 23033: divisor "b" of division or modulo operation should be a constant which is power of 2. (Synthesis)
nLint reports: document.v(7): Warning 23034: dividend "a" of division or modulo operation should be a constant. (Synthesis)
nLint reports: document.v(11): Warning 23035: loop variable "i" should not be modified inside the for loop. (Synthesis,Design Style)
23037 (Verilog) Blocking and Non-blocking Statements in the Same Always Block
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: both blocking and non-blocking assignments (at line %d) are used in the same always block. Configurable Parameter Rule group: Synthesis, Design Style; Argument type: none; Default severity : Level2 (Warning) Description (Verilog) This rule checks whether there is an always block containing both blocking and nonblocking statements. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 module test (clk, rst, count, carry); input clk, rst; output [3:0] count; output carry; reg [3:0] count; reg carry; always @(posedge clk or posedge rst) begin if (~rst) begin count <= 0; carry = 0; //blocking end else if (count == 'b1111) begin carry = carry + 1; count <= 0; //non-blocking end else count = count +1; end endmodule
nLint reports: document.v(13): Warning 23037: both blocking and non-blocking assignments (at line 12) are used in the same always block. (Synthesis,Design Style)
nLint reports: document.v(11): Warning 23039: while statement should not be used because it is not synthesizable. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is port (Clk : in bit; D : out bit_vector( 4 downto 0 ) ); end top_ety; architecture arch of top_ety is signal S : bit_vector(4 downto 0) := "10101"; begin process (Clk) variable A : integer := 0; begin while A <= 5 loop --warning here D(A) <= S(A); A := A + 1; end loop; end process; end arch;
nLint reports:
document.vhd(12): Warning 23039: while statement should not be used because it is not synthesizable. (Synthesis)
nLint reports following if the argument value is ("CLOCK,RESET,SET,LATCH_ENABLE,TRI_ENABLE"): document.v(8): Warning 23042: bit select "rst[1]" should not be used as "reset". (Synthesis,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity top_ety is port ( reset : in bit_vector(1 downto 0); clock : in bit; d : in bit; q : out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (clock,reset) is begin if (reset(0)='1') then --reset signal "reset(0)" is bit select q<='0'; elsif (clock'event and clock='1') then q<=d; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("CLOCK,RESET,SET,LATCH_ENABLE,TRI_ENABLE"): document.vhd(13): Warning 23042: bit select "reset(0)" should not be used as "reset". (Synthesis,Design Style)
nLint reports following if the argument value is ("CLOCK,RESET,SET,LATCH_ENABLE,TRI_ENABLE"): document.v(8): Warning 23043: bus signal "rst" should not be used as "reset". (Synthesis,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 entity top_ety is port ( reset : in bit; clock : in bit_vector(3 downto 0); d : in bit; q : out bit ); end entity top_ety; architecture arch of top_ety is begin p1: process (reset,clock) is begin if (reset='1') then q<='0'; elsif (clock'event and clock="1111") then q<=d; end if; end process p1;
19
nLint reports following if the argument value is ("CLOCK,RESET,SET,LATCH_ENABLE,TRI_ENABLE"): document.vhd(15): Warning 23043: bus signal "clock" should not be used as "clock". (Synthesis,Design Style)
nLint reports following if the argument value is ("LATCH_ENABLE,TRI_ENABLE"): document.v(6): Warning 23044: "tri-state enable" port should not be connect to an expression "((a & b) | c)". (Synthesis,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 library ieee; use ieee.std_logic_1164.all; entity top_ety is end; architecture arch of top_ety is signal data : std_logic_vector(7 downto 0); signal output_en : std_logic; signal output_xs : std_logic; begin data <= "11111111" WHEN (output_en = '1') AND (output_xs ='0')ELSE "XXXXXXXX" WHEN (output_en = '0') AND (output_xs = '1') ELSE "ZZZZZZZZ"; -- warning end;
nLint reports following if the argument value is ("LATCH_ENABLE,TRI_ENABLE"): document.vhd(12): Warning 23044: "tri-state enable" port should not be connect to an expression "GEN4_data". (Synthesis,Design Style)
nLint reports: document.v(2): Warning 23045: time variable "timer" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(2): Warning 23047: real variable "real_b" should not be used because it is not synthesizable. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is end entity top_ety; architecture arch of top_ety is signal s : real; --warning here begin end architecture arch;
nLint reports: document.vhd(5): Warning 23047: real variable "s" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(2): Warning 23049: realtime variable "rt" should not be used because it is not synthesizable. (Synthesis)
//no warning
nLint reports: document.sv(3): Warning 23050: unpacked union should not be used because it is not synthesizable. (Synthesis) document.sv(8): Warning 23050: unpacked union should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(2): Warning 23051: event "event_a" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(4): Warning 23053: UDP instance "u_test_0" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(2): Warning 23055: specify block should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(3): Warning 23057: initial block should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(2): Warning 23059: task "multiply" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(1): Warning 23061: UDP declaration should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(1): Warning 23065: macromodule "test" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(3): Warning 23069: function with integer return value is not synthesizable. (Synthesis)
nLint reports: document.v(22): Warning 23071: function returning real type value should not be used because it is not synthesizable. (Synthesis)
4 5 6 7 8 9
function func1 (v : real) return real is --warning here begin return v; end function func1; begin end;
nLint reports: document.vhd(4): Warning 23071: function returning real type value should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(2): synthesizable. document.v(3): synthesizable. document.v(4): synthesizable. document.v(5): synthesizable. document.v(6): synthesizable. document.v(7): synthesizable. document.v(8): synthesizable.
Warning 23073: (Synthesis) Warning 23073: (Synthesis) Warning 23073: (Synthesis) Warning 23073: (Synthesis) Warning 23073: (Synthesis) Warning 23073: (Synthesis) Warning 23073: (Synthesis)
net "tri1_t" should not be used because it is not net "tri0_t" should not be used because it is not net "supply0_t" should not be used because it is not net "supply1_t" should not be used because it is not net "triand_t" should not be used because it is not net "trior_t" should not be used because it is not net "trireg_t" should not be used because it is not
nLint reports: document.v(23): Warning 23077: defparam "top.m1.size" should not be used because it is not synthesizable. (Synthesis) document.v(24): Warning 23077: defparam "top.m1.delay" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(3): Warning 23079: memory " mem" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(5): Warning 23083: drive strength "(large)" should not be used because it is not synthesizable. (Synthesis) document.v(6): Warning 23083: drive strength "(pull0, strong1)" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(10): Warning 23087: repeat statement should not be used because it is not synthesizable. (Synthesis) document.v(16): Warning 23087: repeat statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(7): Warning 23089: delay control "10" is ignored by synthesis. (Synthesis)
nLint reports: document.v(7): Warning 23091: event control "data" in unsuitable place is not synthesizable. (Synthesis)
nLint reports: document.v(7): Warning 23095: wait statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(9): Warning 23097: event enable statement should not be used because it is not synthesizable. (Synthesis) document.v(11): Warning 23097: event enable statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(7): Warning 23099: fork statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(8): Warning 23101: task call statement "multiply(a, b, y);" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(29): Warning 23103: system task call "$finish;" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(11): Warning 23105: disable statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(10): Warning 23107: force statement should not be used because it is not synthesizable. (Synthesis) document.v(11): Warning 23107: force statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(12): Warning 23109: release statement should not be used because it is not synthesizable. (Synthesis) document.v(13): Warning 23109: release statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(12): Warning 23115: string "are equal." should not be used because it is not synthesizable. (Synthesis) document.v(17): Warning 23115: string "are not equal." should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(6): Warning 23117: real number "1.5" should not be used because it is not synthesizable. (Synthesis) document.v(7): Warning 23117: real number "1.2" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(6): Warning 23119: hierarchical reference "test1.c" should not be used because it is not synthesizable. (Synthesis)
nLint reports following if the argument value is ("BOTH"): document.v(23): Error 23121: register "q" should have a set or reset signal. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 library ieee; use ieee.std_logic_1164.all; entity com is port ( Q : out std_ulogic;
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
D : in std_ulogic; Clk : in std_ulogic ); end com; architecture RTL of com is begin process( Clk ) begin if (Clk'event and Clk = '1') then Q <= D; end if; end process; end RTL; library ieee; use ieee.std_logic_1164.all; entity top_ety is port ( Q : inout std_ulogic; Cout : out std_ulogic; Clock : in std_ulogic; Reset : in std_ulogic ); end top_ety; architecture arch of top_ety is component com is port ( Q : out std_ulogic; D : in std_ulogic; Clock : in std_ulogic ); end component; signal D : std_ulogic; begin U1: com port map ( Q, D, Clock ); process( Reset, Q ) begin if (Reset = '0') then Cout <= '0'; else Cout <= Q; end if; end process; end arch;
nLint reports following if the argument value is ("BOTH"): document.vhd(14): Error 23121: register "Q" should have a set or reset signal. (Design Style)
nLint reports following if the argument value is ("IGNORE_NOTFULL"): document.v(11): Error 23122: register "counter" should be assigned in data clause. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 library ieee; use ieee.std_logic_1164.all; entity com is port ( Q : out std_ulogic; D : in std_ulogic; Clk : in std_ulogic ); end com; architecture arch of com is begin
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
process( Clk ) begin if Clk'event and Clk = '1' then Q <= D; end if; end process; end arch; library ieee; use ieee.std_logic_1164.all; use work.all; entity top_ety is port ( Din : in std_ulogic; Cout : out std_ulogic; Reset : in std_ulogic; Clock : in std_ulogic ); end top_ety; architecture arch of top_ety is component com is port ( Q : out std_ulogic; D : in std_ulogic; Clock : in std_ulogic ); end component; begin U1: com port map ( Cout, Din, Clock ); process begin wait until clock'event and clock = '1'; if Reset = '1' then Cout <= '0'; --warning here --elsif (rising_edge(Clock)) then -- Cout <= Din; end if; end process; end arch;
nLint reports following if the argument value is ("IGNORE_NOTFULL"): document.vhd(42): Error 23122: register "Cout" should be assigned in data clause. (Design Style)
nLint reports following if the argument value is ("BOTH","IGNORE_MULTI_CHOICE"): document.v(10): Warning 23123: the value of case label "3'bx01" overlaps with the value of case label "3'b101"(at line 8). (Simulation,Synthesis)
(VHDL)
nLint reports: document.v(12): Warning 23125: procedural continuous assign statement should not be used because it is not synthesizable. (Simulation,Synthesis)
nLint reports: document.v(12): Warning 23127: deassign statement should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.v(8): Warning 23129: operators "===" and "!==" should not be used because they are not synthesizable. (Synthesis)
nLint reports following if the argument value is ("IGNORE_DEFAULT"): document.v(5): Warning 23131: operation on X/Z or directly assigned by X/Z should not be used because it will result in simulation mismatch. (Simulation) document.v(6): Warning 23131: operation on X/Z or directly assigned by X/Z should not be used because it will result in simulation mismatch. (Simulation)
nLint reports: document.v(7): Warning 23133: redundant asynchronous signal "set" is specified in the sensitivity list. (Synthesis) document.v(14): Warning 23133: redundant asynchronous signal "rst2" is specified in the sensitivity list. (Synthesis)
nLint reports: document.v(7): Warning 23135: polarity of asynchronous signal "rst" should not be different in condition "rst" and sensitivity list "negedge rst". (Synthesis)
23137 (Verilog) Both Edge and Non-edge Expressions in the Sensitivity List
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: edge and non-edge expressions are mixed in the sensitivity list. Configurable Parameter Rule group: Synthesis; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; Description (Verilog) This rule checks whether a sensitivity list contains both edge and non-edge expressions. This coding style is not synthesizable. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 module test (clk, rst, d, q); input clk, rst; input d; output q; reg q; always @( posedge clk or rst ) //warning if( rst ) q <= 1'b0; else q <= d; endmodule
nLint reports: document.v(7): Warning 23137: edge and non-edge expressions are mixed in the sensitivity list. (Synthesis)
test1 u1 (b,c,d); endmodule module test1 (b,c,d); input b; input c; output d; assign d = c; endmodule
nLint reports: document.v(2): Information 23401: floating net "top.b" detected. (ERC) document.v(3): Information 23401: floating net "top.c" detected. (ERC)
nLint reports: document.v(1): Warning 23405: primary output pin "test.c" floating through wire "test.c[7:2]". (ERC) document.v(1): Warning 23405: primary output pin "test.c" floating through wire "test.c[0]". (ERC) document.v(12): Warning 23405: input pin "I" ("a") of "cell test1.n1" floating through wire "test1.a". (ERC)
nLint reports: document.v(4): Warning 23407: input pin "in" ("in1") of "cell top.u1" partial floating through wire "top.u2.a". (ERC) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 module test(d); input d; wire c,d,e; test1 u1 (c); test2 u2 (c); and (e,c,d); endmodule module test1(a); output a; wire a; endmodule module test2(b); output b; wire b; endmodule
nLint reports:
nLint reports: document.v(1): Warning 23409: primary input pin "test.a" floating through wire "test.a". (ERC) document.v(5): Warning 23409: output pin "O0" ("b") of "cell test.n1" floating through wire "test.b". (ERC)
nLint reports: document.v(2): Warning 24001: a VHDL reserved word should not be used as object name "in". (HDL Translation) document.v(3): Warning 24001: a VHDL reserved word should not be used as object name "out". (HDL Translation)
nLint reports: document.vhd(5): Warning 24003: a Verilog reserved word should not be used as object name "always". (HDL Translation) document.vhd(6): Warning 24003: a Verilog reserved word should not be used as object name "assign". (HDL Translation)
"weak0", "weak1", "while", "wildcard", "wire", "with", "within", "wor", "xnor", "xor". Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module test(); wire d,g,int; parameter alias = 1; modport new(d,g); endmodule module modport(d,g); input d; wire d; output g; reg g; always g = d; endmodule
nLint reports: document.v(2): Warning 24005: SystemVerilog reserved identifier in a Verilog design. (HDL Translation) document.v(3): Warning 24005: SystemVerilog reserved identifier in a Verilog design. (HDL Translation) document.v(4): Warning 24005: SystemVerilog reserved identifier in a Verilog design. (HDL Translation) document.v(7): Warning 24005: SystemVerilog reserved identifier in a Verilog design. (HDL Translation)
word "int" is used as an word "alias" is used as an word "new" is used as an word "modport" is used as an
nLint reports following document.sv(4): Warning distinguished by letter document.sv(6): Warning distinguished by letter
if the argument value is ("CHECK_ALL"): 24007: naming for "Valid" and "VAlid"(at line 3) is only case. (HDL Translation) 24007: naming for "valid" and "VALID"(at line 6) is only case. (HDL Translation)
///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module test; reg VALID; function f_myfunc; input a; begin reg Valid; end endfunction always begin:b1 reg VAlid; end Test u_Test(); Test u_TEST(); //warning
14 15 16
nLint reports following if the argument value is ("CHECK_ALL"): document.v(1): Warning 24007: naming for "test" and "Test"(at line 15) is only distinguished by letter case. (HDL Translation) document.v(10): Warning 24007: naming for "VAlid" and "VALID"(at line 2) is only distinguished by letter case. (HDL Translation) document.v(13): Warning 24007: naming for "u_TEST" and "u_Test"(at line 12) is only distinguished by letter case. (HDL Translation) ///////////////example : document1.sv//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 module top(); wire a; //No warning if select argument "CHECK_SAME_TYPE_ONLY" sub A(); wire b; reg B; sub sub C(); c(); //Warning
//Warning
always begin : Top //Warning end endmodule module sub(); endmodule module TOP(); endmodule //Warning
nLint reports following if the argument value is ( CHECK_SAME_TYPE_ONLY): document1.sv(6): Warning 24007: naming for "B" and "b"(at line 5) is only distinguished by letter case. (HDL Translation) document1.sv(9): Warning 24007: naming for "c" and "C"(at line 8) is only distinguished by letter case. (HDL Translation) document1.sv(11): Warning 24007: naming for "Top" and "top"(at line 1) is only distinguished by letter case. (HDL Translation) document1.sv(18): Warning 24007: naming for "TOP" and "top"(at line 1) is only distinguished by letter case. (HDL Translation)
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
reg [7:0] temp; always @( sel or a or b or c) begin: testb reg [7:0] y; //"y" in scope "testb", //duplicate with up-scope, warning temp = 0; if ( sel ) temp = b; else temp = c; y = a+temp; end endmodule
nLint reports: document.v(10): Warning 24009: object "y" should not share the same name with another object in the outer scope (at line 5). (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 entity top_ety is end entity top_ety; architecture arch of top_ety is shared variable v : integer; begin process is variable v : integer; --warning on "v" which is named --the same with "arch.v" begin wait; end process; end architecture arch;
nLint reports: document.vhd(8): Warning 24009: object "v" should not share the same name with another object in the outer scope (at line 5). (Coding Style)
nLint reports: document.v(1): Warning 24011: `include compiler directive should not be used. (Language Construct,HDL Translation)
nLint reports following if the argument value is ("IFDEF,IFNDEF"): document.v(2): Warning 24013: "`ifdef" conditional compiler directive should not be used. (Language Construct,HDL Translation)
nLint reports following if the argument value is ("synopsys,translate_off,translate_on,parallel_case,full_case,state_vector,enum,te mplate,dc_script_begin, dc_script_end,map_to_module,return_port_name,sync_set_reset,async_set_reset,async_ set_reset_local,sync_set_reset_local, async_set_reset_local_all,sync_set_reset_local_all,one_hot,one_cold"): document.v(1): Warning 24015: unknown synopsys directive "// synopsys aaa warning here" should not be used. (Language Construct)
nLint reports following if the argument value is ("synopsys,translate_off,translate_on,parallel_case,full_case,state_vector,enum,te mplate,dc_script_begin, dc_script_end,map_to_module,return_port_name,sync_set_reset,async_set_reset,async_ set_reset_local,sync_set_reset_local, async_set_reset_local_all,sync_set_reset_local_all,one_hot,one_cold"): document.vhd(1): Warning 24015: unknown synopsys directive "--synopsys aaa" should not be used. (Language Construct)
nLint reports: document.v(5): Warning 24017: synopsys template directive should be used before parameter "y". (Synthesis)
nLint reports: document.v(3): Warning 24019: should not be used. (Language document.v(4): Warning 24019: should not be used. (Language
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end top_ety; architecture arch of top_ety is begin -- synopsys dc_script_begin -- set_dont_touch find(cell) -- set_dont_touch find(net) -- synopsys dc_script_end end arch; -- warning on the two lines between "scrip_begin" and "script_end"
nLint reports: document.vhd(7): Warning 24019: dc_shell commands "-should not be used. (Language Construct) document.vhd(8): Warning 24019: dc_shell commands "-should not be used. (Language Construct)
//warning here
nLint reports following if the argument value is ("CHECK_PART_SEL,IGNORE_INITIALVALUE,CHECK_TOP_SIGNAL"): document.v(5): Error 25001: signal "e" has no driver. (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is end top_ety; architecture arch of top_ety is signal x : bit; --warning on "x", which has never been driven signal y : bit; begin process (x) begin y<=x; end process; end arch;
nLint reports following if the argument value is ("CHECK_TOP_SIGNAL,CHECK_THROUGH_HIERARCHY"): document.v(5): Warning 25003: signal "e" has no load. (DFT,Design Style) document.v(6): Warning 25003: signal "d" has no load. (DFT,Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is end entity top_ety; architecture arch of top_ety is signal x : bit; signal y : bit; --warning on "y", which has no load begin process ( x ) is begin y<=x; end process; end architecture arch;
nLint reports following if the argument value is ("CHECK_TOP_SIGNAL,CHECK_THROUGH_HIERARCHY"): document.vhd(5): Warning 25003: signal "x" has no load. (DFT,Design Style)
nLint reports following if the argument value is ("BOTH"): document.v(2): Error 25005: signal "a" has never been referenced. (Design Style) document.v(2): Error 25005: signal "c" has never been assigned. (Design Style)
25007 (Verilog) Signal has been Assigned in More than One Block
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: signal "%s" has been assigned in more than one block. Configurable Parameter Rule group: Design Style; Argument type: (TRI, TRI1, TRI0, TRIAND, TRIOR, TRIREG); Argument description: select TRI to specify that multiple assignment to a tri net is allowed; select TRI1 to specify that multiple assignment to a tri1 net is allowed; select TRI0 to specify that multiple assignment to a tri0 net is allowed; select TRIAND to specify that multiple assignment to a triand net is allowed; select TRIOR to specify that multiple assignment to a trior net is allowed; select TRIREG to specify that multiple assignment to a trireg net is allowed; Default value: "" for Verilog; Default severity : Level3 (Error) This rule is turned OFF by default; Description (Verilog) This rule checks whether any signals are assigned in more than one block. "Assign" means a signal is assigned a value in one of the following situations: through a continuous assignment; through a procedural assignment in an initial or always block; by connection to an input port of this module; or by connection to an output port of an instance in this module. If a signal is connected to an inout port of this module and is assigned once using any of the above situations, this rule is not violated; if a signal is connected to an inout port of an instance in this module and is assigned once using any of the above situations, this rule is violated. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 module test; reg a, b, c; initial begin a=b; end initial begin a=c; //"a" has been assigned in more than one block, warning end endmodule
nLint reports following if the argument value is (""): document.v(2): Error 25007: signal "a" has been assigned in more than one block. (Design Style) ///////////////example : document1.v//////////// 1 2 3 4 5 6 7 8 9 /* rule 25007 */ module test(); tri1 bus; wire en1, en2, sig1, sig2; bus = en1 ? sig1 : 1'bz; bus = en2 ? sig2 : 1'bz;
nLint reports following if the argument value is ("TRI1"): ///////////////example : document2.v//////////// 1 module top(GND); 2 inout GND; 3 assign GND = 0; changed its value 4 endmodule
nLint reports following if the argument value is (""): ///////////////example : document3.v//////////// 1 module top; 2 wire GND; 3 assign GND = 0; 4 sub U_sub_1 (.GND(GND)); "inout" port instance 5 "U_sub_1" 6 endmodule 7 8 module sub (GND); 9 inout GND; 10 assign GND = 0; 11 endmodule
//warning because GND is connected to an //and maybe changed its value in instance
nLint reports following if the argument value is (""): document3.v(2): Error 25007: signal "GND" has been assigned in more than one block. (Design Style)
nLint reports following if the argument value is ("5","CLOCK,RESET,SET,LATCH_ENABLE,TRI_ENABLE" ): document.v(2): Warning 25009: the fan-out number of signal "d" is 6 whereas the limitation is 5. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is port (reset : in bit; clk : in bit; d: in bit; q: out bit); end top_ety; architecture arch of top_ety is signal s1,s2,s3,s4,s5 : bit; signal s: bit; -- warning here, FanOut=4 begin p1: process (reset,clk) is begin if (reset='1') then
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
s<='0'; elsif (clk'event and clk='1') then s<=d; end if; end process p1; p2: process(s) is begin s1<=s; s2<=s; s3<=s; s4<=s; s5<=s; q<=s1 and s2 and s3 and s4 and s5; end process p2; end arch;
nLint reports following if the argument value is ("4","CLOCK,RESET,SET,LATCH_ENABLE,TRI_ENABLE" ): document.vhd(10): Warning 25009: the fan-out number of signal "s" is 5 whereas the limitation is 4. (Design Style)
nLint reports following if the argument value is ("3"): document.v(4): Warning 25011: 4 end points detected in the transitive fan out of input "a", which should not exceed 3. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk, a : in std_logic; r1, r2, r3, r4 : out std_logic); end top_ety; architecture arch of top_ety is begin Process (clk) begin if (clk'event and clk = '1') then r1 <= a; end if; end Process; Process (clk)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
begin if (clk'event and clk = '1') then r2 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then r3 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then r4 <= a; end if; end Process; end arch;
nLint reports following if the argument value is ("3"): document.vhd(5): Warning 25011: 4 end points detected in the transitive fan out of input "a", which should not exceed 3. (Design Style)
nLint reports following if the argument value is ("3"): document.v(4): Warning 25013: 4 start points detected in the transitive fan in of output "out", which should not exceed 3. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk, a : in std_logic; r1, r2, r3, r4, o : inout std_logic); end top_ety; architecture arch of top_ety is begin Process (clk) begin if (clk'event and clk = '1') then r1 <= a; end if; end Process;
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
Process (clk) begin if (clk'event and clk = '1') then r2 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then r3 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then r4 <= a; end if; end Process; o <= r1 and r2 and r3 and r4; end arch;
nLint reports following if the argument value is ("3"): document.vhd(6): Warning 25013: 4 start points detected in the transitive fan in of output "o", which should not exceed 3. (Design Style)
nLint reports: document.v(1): Warning 25015: the output "out2" is not registered. (Design Style) document.v(1): Warning 25015: the output "out1" is not registered. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk, a : in std_logic; r1, r2, r3, r4, out1, out2 : inout std_logic); end top_ety; architecture arch of top_ety is begin Process (clk) begin if (clk'event and clk = '1') then r1 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
r2 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then r3 <= a; end if; end Process; Process (clk) begin if (clk'event and clk = '1') then r4 <= a; end if; end Process; out1 <= r1 and r2 and r3 and r4; out2 <= a; end arch;
nLint reports: document.vhd(6): Warning 25015: the output "out2" is not registered. (Design Style) document.vhd(6): Warning 25015: the output "out1" is not registered. (Design Style)
nLint reports: document.v(1): Warning 25016: direct path from primary input pin "k[0]" to primary output pin "c" (document.v(1)) without flip-flops is not allowed. (Design Style) document.v(1): Warning 25016: direct path from primary input pin "b" to primary output pin "c" (document.v(1)) without flip-flops is not allowed. (Design Style) document.v(1): Warning 25016: direct path from primary input pin "a" to primary output pin "c" (document.v(1)) without flip-flops is not allowed. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is port ( x1, x2 : in integer; --warning on "y" and "x1", "x2" y : out integer); end entity top_ety; architecture arch of top_ety is begin y<=x1+x2; end architecture arch;
nLint reports: document.vhd(2): Warning 25016: direct path from primary output pin "y" (document.vhd(3)) without flip-flops is document.vhd(2): Warning 25016: direct path from primary output pin "y" (document.vhd(3)) without flip-flops is
input pin "x2" to primary not allowed. (Design Style) input pin "x1" to primary not allowed. (Design Style)
nLint reports: document.v(1): Warning 25017: duplicated name "k" detected on port "A". (Design Style) document.v(1): Warning 25017: duplicated name "a" detected on port "A". (Design Style)
cts attributes for the example: dbDefineSyncPin (geGetEditCell) "U2" '(("CP" "nonInvertRise" 0)) dbDefineSyncPin (geGetEditCell) "u_sub1/U5" '(("CP" "InvertRise" 0)) dbDefineSyncPin (geGetEditCell) "u_sub1/U7" '(("Q" "InvertRise" 0)) //issue violation dbDefineIgnorePin (geGetEditCell) "U3" '("Z") //issue violation dbDefineIgnorePin (geGetEditCell) "u_sub1/U6" '("B")
nLint reports: document.v(9): Warning 25019: sync/ignore pin attribute should not be set on output "top.NULL". (CTS) document.v(19): Warning 25019: sync/ignore pin attribute should not be set on output "top.u_sub1.dout2". (CTS)
25021 (Verilog) CTS "ignore pin" Attribute Set for All Fan-out Logics of an Instance
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: all the fan-out logic of instance "%s" is set as ignore pin attribute. Configurable Parameter Rule group: CTS; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether all the fan-out logic of an instance is set as ignore pin attribute. It is recommended to set ignore pin attribute to the inputs of the violated instance. The checking passes through hierarchies and assignments. The pin attribute can only be set on a primitive gate instance. It can not be set on a hierarchy instance. The related command line option are: -cts: specify the pin attribute file name. -cts_spt: specify the hierarchy delimiter "." or "/". -cts_top: specify the user-defined top for CTS rules. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test; wire a,b,c,d,e,f,g,h,i,j,k,l,m; IV U1(.A(a),.Z(b)); FD2 U2(.CP(b), .D(), .Q(c), .QN()); FD2 U3(.CP(d), .D(), .Q(e), .QN(f)); FD2 U4(.CP(e), .D(), .Q(g), .QN()); FD2 U5(.CP(f), .D(), .Q(h), .QN()); FD2 U6(.CP(), .D(i), .Q(j), .QN(k)); FD2 U7(.CP(), .D(j), .Q(l), .QN()); FD2 U8(.CP(), .D(k), .Q(m), .QN()); endmodule //warning here
//warning here
cts attributes for the example: dbDefineIgnorePin (geGetEditCell) dbDefineIgnorePin (geGetEditCell) dbDefineIgnorePin (geGetEditCell) dbDefineIgnorePin (geGetEditCell)
nLint reports: document.v(3): Warning 25021: all the fan-out logic of instance "test.U1" is set as ignore pin attribute. (CTS) document.v(10): Warning 25021: all the fan-out logic of instance "test.U6" is set as ignore pin attribute. (CTS)
nLint reports following if the argument value is ("1024"): document.v(2): Warning 26001: no dimension in "mem" should be more than 1024. (Language Construct)
nLint reports: document.v(10): Warning 26003: signal "temp" is assigned but not deassigned. (Language Construct)
nLint reports: document.v(8): Warning 26005: supply type wire "vcc1" should not be assigned. (Language Construct) document.v(9): Warning 26005: supply type wire "ground1" should not be assigned. (Language Construct) document.v(13): Warning 26005: supply type wire "ground2" should not be assigned. (Language Construct) document.v(14): Warning 26005: supply type wire "vcc2" should not be assigned. (Language Construct)
nLint reports: document.v(10): Warning 26007: signal "temp" is deassigned but not assigned. (Language Construct)
nLint reports: document.v(8): Error 26009: event type "e" should not be used with posedge or negedge. (Language Construct) document.v(15): Error 26009: event type "e" should not be used with posedge or negedge. (Language Construct)
nLint reports: document.v(12): Warning 26011: signal "d" is forced but not released. (Language Construct) document.v(14): Warning 26011: signal "e" is forced but not released. (Language Construct)
nLint reports: document.v(12): Warning 26013: signal "d" is released but not forced. (Language Construct) document.v(13): Warning 26013: signal "e" is released but not forced. (Language Construct)
nLint reports following if the argument value is ("8096"): document.v(2): Warning 26015: total bits in "mem" should be less than 8096. (Language Construct)
nLint reports: document.vhd(35): Warning 27001: keywords "port" and "map" should be kept in the same line. (Coding Style)
27003 (Verilog) Event Control or Delay Statement Not Found in All Branches 27003 (VHDL) WAIT Statement Not Found in All Branches
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: event control statement or delay is lost in some possible branches of always, it may cause simulation time hangs. (VHDL) <filename>(<line no.>): <severity> <rule no.>: WAIT statement is lost in some possible branches of process, it may cause simulation time hangs. Configurable Parameter Rule group: Simulation; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether all the branches( complete ) have a control under event control statement or delay. (VHDL) This rule checks whether all the branches( complete ) have a control under WAIT statement. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module test (sel,a,b,s); input sel, a, b; output s; reg s; always begin if ( sel == 0 ) begin s <= a; @( sel or a ); end else //warning here, there is no event control //statement in this branch s <= b; end endmodule
nLint reports: document.v(6): Warning 27003: event control statement or delay is lost in some possible branches of always, it may cause simulation time hangs. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is end top_ety; architecture arch of top_ety is signal S : Bit; begin BadProcess_Lbl : process begin if S = '0' then
10 11 12 13 14 15 16
S <= '1'; wait for 10 ns; end if; -- Note : if S = '1' then process loops forever, -and time does not advance. end process BadProcess_Lbl; end arch;
nLint reports: document.vhd(7): Warning 27003: WAIT statement is lost in some possible branches of process, it may cause simulation time hangs. (Simulation)
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(2): Warning 27007: keyword "END" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 --design project has three files -- system.vhd (right) -- cpu.vhdl (wrong should be named as cpu.vhd) -- alu.Vhd (wrong should be named as alu.vhd)
nLint reports: document.vhd(2): Warning 27027: identifier "integer" is predefined in the standard packages and should not be redefined. (Coding Style)
nLint reports following if the argument value is ("GND[a-z]*; VSS[0-9]*"): document.v(3): Warning 27028: identifier "VSS10" is a user reserved word and should not be redefined. (Coding Style) document.v(4): Warning 27028: identifier "GNDa" is a user reserved word and should not be redefined. (Coding Style) document.v(4): Warning 27028: identifier "GND" is a user reserved word and should not be redefined. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is end top_ety; architecture arch of top_ety is signal inte : bit; --warning here begin end arch;
nLint reports following if the argument value is ("inte"): document.vhd(5): Warning 27028: identifier "inte" is a user reserved word and should not be redefined. (Coding Style)
nLint reports: document.vhd(2): Warning 27029: entity name "top_ety" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(6): Warning 27031: architecture name "arch" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(11): Warning 27033: configuration name "CONF_test" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(2): Warning 27035: package name "PKG" should be specified in the END statement. (Coding Style)
27037 (VHDL) Missing Package Name in the END Statement of Package Body
Message (VHDL) <filename>(<line no.>): <severity> <rule no.>: package body name "%s" should be specified in the END statement. Configurable Parameter Rule group: Coding Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (VHDL) This rule checks whether there is any package body having no package name specified in the END statement. Example
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 package PKG is end PKG; package body PKG is end; --warning here: the package body "PKG" should be specified here! entity top_ety is end top_ety; architecture arch of top_ety is begin end arch;
nLint reports: document.vhd(5): Warning 27037: package body name "PKG" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(4): Warning 27039: sub-program name "Proc1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(8): Warning 27041: block label "B1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(9): Warning 27043: process label "p1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(7): Warning 27044: generate statement label "g1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(10): Warning 27045: if statement label "l1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(12): Warning 27047: case statement label "l1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(10): Warning 27049: loop statement label "l1" should be specified in the END statement. (Coding Style)
nLint reports: document.vhd(6): Warning 27051: component name "Com_T" should be specified in the END statement. (Coding Style)
nLint reports following if the argument value is ("10"): document.v(15): Warning 27055: the lines of a source file should not exceed 10 lines. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 library ieee; use ieee.std_logic_1164.all; entity top_ety is port ( Clk : in std_logic; Rst : in std_logic; Din : in std_logic; Qout : out std_logic ); end top_ety; architecture arch of top_ety is begin process (Rst, Clk) begin if (Rst = '1') then Qout <= '0'; elsif (Clk'event and Clk = '1') then Qout <= Din; end if; end process;
21 22 23
end arch; --warning if the number of lines exceed the number of argument
nLint reports following if the argument value is ("10" ): document.vhd(23): Warning 27055: the lines of a source file should not exceed 10 lines. (Coding Style)
nLint reports following if the argument value is ("CASE_UPPER"): document.vhd(5): Warning 27063: the number literal "1.0e8" should use CASE_UPPER case. (Naming Convention)
27069 (VHDL) User-defined Logic Type and its Subtype Not Recommended
Message (VHDL) <filename>(<line no.>): <severity> <rule no.>: type declaration "%s" should be removed. Use pre-defined standard logic type instead. Configurable Parameter Rule group: Coding Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (VHDL) This rule checks whether type declarations are re-definition of pre-defined standard logic type. Example
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 entity top_ety is end; architecture arch of top_ety is type mystd_ulogic IS ( 'U', -- Uninitialized 'X', -- Forcing Unknown '0', -- Forcing 0 '1', -- Forcing 1 'Z', -- High Impedance 'W', -- Weak Unknown 'L', -- Weak 0 'H', -- Weak 1 '-' -- Don't care ); begin end;
nLint reports: document.vhd(6): Warning 27069: type declaration "mystd_ulogic" should be removed. Use pre-defined standard logic type instead. (Coding Style)
nLint reports: document.vhd(2): Warning 27071: bit or bit_vector type should "pin". Use std_ulogic instead. (Simulation,Coding Style) document.vhd(3): Warning 27071: bit or bit_vector type should "pout". Use std_ulogic instead. (Simulation,Coding Style) document.vhd(5): Warning 27071: bit or bit_vector type should "s1". Use std_ulogic instead. (Simulation,Coding Style) document.vhd(9): Warning 27071: bit or bit_vector type should "s2". Use std_ulogic instead. (Simulation,Coding Style)
not be used object not be used object not be used object not be used object
nLint reports: document.vhd(3): Warning 27077: enumeration literal used in range "black to blue". (Coding Style)
nLint reports: document.vhd(6): Warning 27081: std_ulogic_vector on object "p" should be replaced with SIGNED or UNSIGNED type. (Synthesis,Coding Style) document.vhd(10): Warning 27081: std_ulogic_vector on object "s1" should be replaced with SIGNED or UNSIGNED type. (Synthesis,Coding Style)
nLint reports following if the argument value is ("RESOLVED"): document.vhd(5): Warning 27083: the object "p" should be declared as RESOLVED type. (Synthesis,Coding Style) document.vhd(10): Warning 27083: the object "s" should be declared as RESOLVED type. (Synthesis,Coding Style)
nLint reports: document.vhd(5): Warning 27085: type "array1" is constrained array type. Please use unconstrained range definition in type declarations, and constrained range definition in subtype declarations. (Coding Style)
nLint reports: document.vhd(9): Warning 27093: Should not use NEXT statement in a loop statement(at line 8). (Coding Style)
nLint reports: document.vhd(9): Warning 27095: Should not use EXIT statement in a loop statement(at line 8). (Coding Style)
nLint reports: document.vhd(18): Warning 27099: the whole record object "s" is used in the sensitivity list. Use elements instead. (Simulation,Coding Style)
27101 (VHDL) Function Returning Dynamically Allocated Memory may Lead to Memory Leak
Message (VHDL) <filename>(<line no.>): <severity> <rule no.>: function returning access type may lead to memory leaks. Configurable Parameter Rule group: Simulation, Coding Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (VHDL) This rule checks whether there is any access object returned by a function, which may lead to memory leak. Example
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 entity top_ety is end top_ety; architecture arch of top_ety is type my_access is access integer; function func1 return my_access is --warning here, the function return type "my_access" is an --access type variable v: my_access; begin return new integer; end function func1; begin end arch;
nLint reports: document.vhd(6): Warning 27101: function returning access type may lead to memory leaks. (Simulation,Coding Style)
nLint reports following if the argument value is ("DELAYED,STABLE,QUIET,TRANSACTION"): document.vhd(10): Warning 27105: use of attribute "stable" will degrade the simulation performance. (Simulation,Coding Style)
nLint reports: document.vhd(7): Warning 27107: WAIT statement should be used as the first statement in a process that has no sensitivity list. (Synthesis,Coding Style)
nLint reports: document.vhd(9): Warning 27109: attribute "TRANSACTION" should not be used on sensitive signal "s2" in a wait statement (only event attribute is allowed). (Simulation,Coding Style)
nLint reports: document.vhd(12): Warning 27111: should use rising_edge() or falling_edge() function. (Simulation,Coding Style)
nLint reports: document.vhd(3): Warning 27115: integer's subtype with range constraint on object "s" should be used. (Simulation,Coding Style) document.vhd(6): Warning 27115: integer's subtype with range constraint on object "o" should be used. (Simulation,Coding Style)
nLint reports: document.vhd(2): Warning 27119: "s" declared as BUFFER. (Coding Style)
nLint reports following if the argument value is ("IGNORE_IN_SEQ"): document.v(6): Warning 27122: variable "NextStateFSM1" is conditionally assigned in the block. (Synthesis)
27123 (Verilog) Temporary Variable Used in Nonblocking Assignment 27123 (VHDL) Internal Signal Used Resulting in Bad Performance
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: "%s" is used like a temporary variable; by non-blocking assignment, it will reduce one more storage element. (VHDL) <filename>(<line no.>): <severity> <rule no.>: internal signal "%s" should be declared as a variable for performance. Configurable Parameter Rule group: Simulation, Synthesis; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether there is any temporary variable used as LHS of nonblocking assignment. If not, blocking assignment is suggested to use for alternative. (VHDL) Check to see if there is any signal used in just one process. If not, variable is suggested to use for alternative. It will degrade simulation performance. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module test (clk, y, a, b, c, d); output y; input a, b, c, d; input clk; reg y, tmp1, tmp2; always begin tmp1 tmp2 y <= @(posedge clk) <= a & b; <= c & d; tmp1 | tmp2;
end endmodule
nLint reports: document.v(5): Warning 27123: "tmp1" is blocking assignment, it will reduce one (Simulation,Synthesis) document.v(5): Warning 27123: "tmp2" is blocking assignment, it will reduce one (Simulation,Synthesis)
used like a temporary variable; by nonmore storage element. used like a temporary variable; by nonmore storage element.
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is port (a : in integer; b : in integer; result : out integer); end top_ety; architecture arch of top_ety is
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
signal c: integer:=0; begin p1 : process (a,b) --signal "c" is used as internal signal of this process, --which can be replaced with variable to enhance simulation --performance and will result in unexpected synthesis result begin c <= a - b; if ( a > b ) then result <= c; else result <= -c; end if; end process; end arch;
nLint reports: document.vhd(8): Warning 27123: internal signal "c" should be declared as a variable for performance. (Simulation,Synthesis)
nLint reports: document.vhd(17): Warning 27124: variable "t1" with initial value should be declared as constant since it is never assigned elsewhere. (Coding Style)
nLint reports following if the argument value is ("CHECK_REF_ONLY"): document.v(13): Warning 27125: variable "t" is not fully initialized before being referenced. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is port ( clk : in bit; data : in bit; count : out bit ); end top_ety; architecture arch of top_ety is begin process ( clk ) variable t : bit; --variable t : bit := '1'; --if change the declaration to comment,
13 14 15 16 17 18 19
--warning 27125 on "t" is gone begin if ( clk'event and clk = '1' ) then count <= t and data; --variable "t" is referenced un-initialized end if; end process; end arch;
nLint reports following if the argument value is ("CHECK_REF_ONLY"): document.vhd(16): Warning 27125: variable "t" is not fully initialized before being referenced. (Simulation)
nLint reports following if the argument value is ("CHECK_REF_ONLY"): document1.v(14): Warning 27126: variable "t" is not fully assigned before being referenced. (Synthesis) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 //2. not fully assign before referenced module test (rst, clk, data, count); input rst,clk,data; output count; reg count; reg t;
8 9 10 11 12 13 14 15 16
always @( posedge clk )begin if ( rst ) t = 0; count = t & data; //Here "t" has not been assigned fully //before referenced. After synthesis, an //additional storage for "t" will be inferred end endmodule
nLint reports following if the argument value is ("CHECK_TEMPVAR"): document2.v(12): Warning 27126: variable "t" is not fully assigned before being referenced. (Synthesis) ///////////////example : document3.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 //3. assign after referenced module test (data, count, clk); input clk; input data; output count; reg count; reg t; always @( posedge clk ) begin count = t & data; t = 1; //Here "t" is assigned after referenced. After synthesis, //a redundant storage inferred for "t". But it is not //reported as violation since user might need to keep it. end endmodule
nLint reports following if the argument value is ("CHECK_TEMPVAR"): document3.v(11): Warning 27126: variable "t" is not fully assigned before being referenced. (Synthesis) ///////////////example : document4.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 //4. not fully assign before referenced module test (rst, clk, data, count); input rst,clk; input [1:0] data; output [1:0] count; reg [1:0] count; reg [1:0] t; always @( posedge clk )begin if ( rst ) t[0] = 0; else t[0] = 1; count = t & data; //Here "t" has not been assigned fully //before referenced. After synthesis, an //additional storage for "t" will be inferred end endmodule
nLint reports following if the argument value is ("CHECK_REF_ONLY"): document4.v(15): Warning 27126: variable "t[1]" is not fully assigned before being referenced. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 --1. only reference entity top_ety is port (CLK : in bit; D : in bit;
6 Q : out bit ); 7 end; 8 9 architecture arch of top_ety is 10 begin 11 process (CLK) 12 variable t : bit := '1'; --synthesis ignores 13 begin 14 if (CLK'event and CLK = '1') then 15 Q <= t and D; --Here "t" has not been initialized before 16 --reference. After synthesis, "t" is directly linked 17 --to '0', which cause mismatch between 18 --pre-synthesis status and post-synthesis. 19 end if; 20 end process; 21 end; 22 23 --2. not fully assign before referenced 24 25 entity top_ety is 26 port ( clk : in bit; 27 rst : in bit; 28 D : in bit; 29 Q : out bit ); 30 end; 31 32 architecture arch of top_ety is 33 begin 34 process ( clk ) 35 variable t: bit; 36 begin 37 if ( clk'event and clk = '1' ) then 38 if ( rst = '1' ) then 39 t := '0'; 40 end if; 41 Q <= t and D; --Here "t" has not been assigned fully 42 --before referenced. After synthesis, an 43 --additional storage for "t" will be inferred 44 end if; 45 end process; 46 end; 47 48 --3. assign after referenced 49 50 entity top_ety is 51 port ( CLK : in bit; 52 D : in bit; 53 Q : out bit ); 54 end; 55 56 architecture arch of top_ety is 57 begin 58 process (CLK) 59 variable t : bit := '1'; --synthesis ignore 60 begin 61 if (CLK'event and CLK = '1') then 62 Q <= t and D; 63 t := '1'; 64 end if; --Here "t" is assigned after referenced. After synthesis, 65 --a redundant storage inferred for "t". But it is not 66 --reported as violation since user might need to keep it. 67 end process; 68 end; -------------------example : document1.vhd------------1 2 3 4 5 6 7 8 9 10 11 --1. only reference entity top_ety is port (CLK : in bit; D : in bit; Q : out bit ); end top_ety; architecture arch of top_ety is begin process (CLK)
12 13 14 15 16 17 18 19 20 21 22
variable t : bit := '1'; --synthesis ignores begin if (CLK'event and CLK = '1') then Q <= t and D; --Here "t" has not been initialized before --reference. After synthesis, "t" is directly linked --to '0', which cause mismatch between --pre-synthesis status and post-synthesis. end if; end process; end arch;
nLint reports following if the argument value is ("CHECK_REF_ONLY"): document1.vhd(15): Warning 27126: variable "t" is not fully assigned before being referenced. (Synthesis) -------------------example : document2.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 --2. not fully assign before referenced entity top_ety is port ( clk : in bit; rst : in bit; D : in bit; Q : out bit); end top_ety; architecture arch of top_ety is begin process ( clk ) variable t: bit; begin if ( clk'event and clk = '1' ) then if ( rst = '1' ) then t := '0'; end if; Q <= t and D; --Here "t" has not been assigned fully --before referenced. After synthesis, an --additional storage for "t" will be inferred end if; end process; end arch;
nLint reports following if the argument value is ("CHECK_TEMPVAR"): document2.vhd(19): Warning 27126: variable "t" is not fully assigned before being referenced. (Synthesis) -------------------example : document3.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 --3. assign after referenced entity top_ety is port ( CLK : in bit; D : in bit; Q : out bit ); end top_ety; architecture arch of top_ety is begin process (CLK) variable t : bit := '1'; --synthesis ignore begin if (CLK'event and CLK = '1') then Q <= t and D; t := '1'; end if; --Here "t" is assigned after referenced. After synthesis, --a redundant storage inferred for "t". But it is not --reported as violation since user might need to keep it. end process; end arch;
nLint reports following if the argument value is ("CHECK_TEMPVAR"): document3.vhd(15): Warning 27126: variable "t" is not fully assigned before being referenced. (Synthesis) -------------------example : document4.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 --4. not fully assign before referenced entity top_ety is port ( clk : in bit; rst : in bit; D : in bit_vector(1 downto 0); Q : out bit_vector(1 downto 0)); end top_ety; architecture arch of top_ety is begin process ( clk ) variable t: bit_vector(1 downto 0); begin if ( clk'event and clk = '1' ) then if ( rst = '1' ) then t(0) := '0'; else t(0) := '1'; end if; Q <= t and D; --Here "t" has not been assigned fully --before referenced. After synthesis, an --additional storage for "t" will be inferred end if; end process; end arch;
nLint reports following if the argument value is ("CHECK_REF_ONLY"): document4.vhd(21): Warning 27126: variable "t(1)" is not fully assigned before being referenced. (Synthesis)
nLint reports: document.v(12): Warning 27127: variable "t" should be initialized (fully) before referenced in combinational process. (Simulation)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 entity top_ety is port ( data : in bit; count : out bit ); end top_ety; architecture rtl of top_ety is begin process ( data ) variable t : bit; --variable t : bit := '1'; --if replace the declaration with the comment line, --warning 27127 on "t" is gone begin count <= t and data; --Here "t" is referenced un-initialized end process; end rtl;
nLint reports: document.vhd(14): Warning 27127: variable "t" should be initialized (fully) before referenced in combinational process. (Simulation)
5 6 always @(posedge clk) 7 if (!rst) q1 <= 1'b0; 8 else q1 <= d; 9 10 always @(posedge clk) 11 q2 <= q1; // No warning on q1 12 endmodule Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 1 2 3 4 5 6 7 8 9 10 //1. only reference module input output reg reg top_27128_1( data, count ); data; count; count; t;
initial t = 1'b1; //Even "t" is initialized here, it is ignored. //Because initial block is ignored by synthesizer. always @( data ) begin count = t & data; //Here "t" has not been assigned before referenced. //After synthesis, it is directly linked to '0', //which cause mismatch between pre-synthesis and //post-synthesis end endmodule //2. not fully assign before referenced module input output reg reg top_27128_2( data, count ); data; count; count; t;
always @( data )begin if ( data ) t = 1; count = t; //Here "t" has not been assigned fully before referenced. //After synthesis, an additional latch will be inferred. end endmodule //3. assign after referenced module input output reg reg top_27128_3( data, count ); data; count; count; t;
always @( data )begin count = t; t = data; //There is no difference in the result of synthesis if //change the two assignment sequence. So there is mismatch //between pre-synthesis and post-synthesis. end endmodule///////////////example : document1.v//////////// //1. only reference module test (data, count); input data; output count; reg count; reg t; initial t = 1'b1; //Even "t" is initialized here, it is ignored. //Because initial block is ignored by synthesizer.
11 12 13 14 15 16 17 18
always @( data ) begin count = t & data; //Here "t" has not been assigned before referenced. //After synthesis, it is directly linked to '0', //which cause mismatch between pre-synthesis and //post-synthesis end endmodule
nLint reports: document1.v(13): Warning 27128: variable "t" should be assigned (fully) before being referenced in a combinational process, otherwise it will lead to additional storage or mismatch between pre-synthesis and post-synthesis. (Synthesis) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 //2. not fully assign before referenced module test (data, count); input data; output count; reg count; reg t; always @( data )begin if ( data ) t = 1; count = t; //Here "t" has not been assigned fully before referenced. //After synthesis, an additional latch will be inferred. end endmodule
nLint reports: document2.v(12): Warning 27128: variable "t" should be assigned (fully) before being referenced in a combinational process, otherwise it will lead to additional storage or mismatch between pre-synthesis and post-synthesis. (Synthesis) ///////////////example : document3.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 //3. assign after reference module test (data, count); input data; output count; reg count; reg t; always @( data )begin count = t; t = data; //There is no difference in the result of synthesis if //change the two assignment sequence. So there is mismatch //between pre-synthesis and post-synthesis. end endmodule
nLint reports: document3.v(10): Warning 27128: variable "t" should be assigned (fully) before being referenced in a combinational process, otherwise it will lead to additional storage or mismatch between pre-synthesis and post-synthesis. (Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 --1. only reference entity top_ety is port (D : in bit; Q : out bit ); end; architecture arch of top_ety is
9 begin 10 process ( D ) 11 variable t : bit := '1'; --synthesis ignores 12 begin 13 Q <= t and D; --Here "t" has not been assigned before referenced. 14 --After synthesis, it is directly linked to '0', 15 --which cause mismatch between pre-synthesis and 16 --post-synthesis 17 end process; 18 end; 19 20 --2. not fully assign before referenced 21 22 entity top_ety is 23 port ( D : in bit; 24 Q : out bit ); 25 end; 26 27 architecture arch of top_ety is 28 begin 29 process ( D ) 30 variable t: bit; 31 begin 32 if ( D = '1' ) then 33 t := '1'; 34 end if; 35 Q <= t; --Here "t" has not been assigned fully 36 --before referenced. After synthesis, 37 --an additional latch will be inferred. 38 end process; 39 end; 40 41 --3. assign after referenced 42 43 entity top_ety is 44 port ( D : in bit; 45 Q : out bit ); 46 end; 47 48 architecture arch of top_ety is 49 begin 50 process ( D ) 51 variable t : bit := '1'; --synthesis ignores 52 begin 53 Q <= t and D; 54 t := '1'; --There is no difference in the result of synthesis if 55 --change the two assignment sequence. So there is mismatch 56 --between pre-synthesis and post-synthesis. 57 end process; 58 end; -------------------example : document1.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 --1. only reference entity top_ety is port (D : in bit; Q : out bit ); end; architecture arch of top_ety is begin process ( D ) variable t : bit := '1'; --synthesis ignores begin Q <= t and D; --Here "t" has not been assigned before referenced. --After synthesis, it is directly linked to '0', --which cause mismatch between pre-synthesis and --post-synthesis end process; end;
nLint reports: document1.vhd(13): Warning 27128: variable "t" should be assigned (fully) before being referenced in a combinational process, otherwise it will lead to additional
storage or mismatch between pre-synthesis and post-synthesis. (Synthesis) -------------------example : document2.vhd------------1 --2. not fully assign before reference 2 3 entity top_ety is 4 port ( D : in bit; 5 Q : out bit ); 6 end; 7 8 architecture arch of top_ety is 9 begin 10 process ( D ) 11 variable t: bit; 12 begin 13 if ( D = '1' ) then 14 t := '1'; 15 end if; 16 Q <= t; --Here "t" has not been assigned fully 17 --before referenced. After synthesis, 18 --an additional latch will be inferred. 19 end process; 20 end; 21
nLint reports: document2.vhd(16): Warning 27128: variable "t" should be assigned (fully) before being referenced in a combinational process, otherwise it will lead to additional storage or mismatch between pre-synthesis and post-synthesis. (Synthesis) -------------------example : document3.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 --3. assign after referenced entity top_ety is port ( D : in bit; Q : out bit ); end; architecture arch of top_ety is begin process ( D ) variable t : bit := '1'; --synthesis ignores begin Q <= t and D; t := '1'; --There is no difference in the result of synthesis if --change the two assignment sequence. So there is mismatch --between pre-synthesis and post-synthesis. end process; end;
nLint reports: document3.vhd(13): Warning 27128: variable "t" should be assigned (fully) before being referenced in a combinational process, otherwise it will lead to additional storage or mismatch between pre-synthesis and post-synthesis. (Synthesis)
nLint reports following if the argument value is ("NONBLOCKING"): document1.v(7): Warning 27130: variable "a" is assigned in another assignment (line 9) in same time point. (Coding Style) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 //Ex2 module block( clk, a, b); input clk, b; output a; reg a; always @(posedge clk) begin a = 1; if (b) a = 0; //Warning if select BLOCKING. //If 'b' is true, the 'a' will be assigned again in the same //time point. The result is determined. end endmodule
nLint reports following if the argument value is ("BLOCKING"): document2.v(7): Warning 27130: variable "a" is assigned in another assignment (line 9) in same time point. (Coding Style)
nLint reports following if the argument value is ("BLOCKING NONBLOCKING"): document.v(7): Warning 27131: variable "a" assigned here is completely overwrited by following assignments. (Coding Style) document.v(24): Warning 27131: variable "a" assigned here is completely overwrited by following assignments. (Coding Style)
nLint reports: document.vhd(6): Warning 27143: BLOCK statement should not be used. (HDL Translation,Coding Style)
--warning here
nLint reports: document.vhd(6): Warning 27144: GENERATE statement should not be used. (HDL Translation,Coding Style)
nLint reports: document.vhd(2): Warning 27155: underscore should not be used in port identifier "clk_s" of top entity. (VITAL Compliant)
nLint reports: document.vhd(2): Warning 27159: range constraint should not be specified on port "s" in top entity. (VITAL Compliant)
nLint reports following if the argument value is (""): document.vhd(8): Warning 27163: type "my_color" is not the expected type and should not be used on port "q" in top entity. (VITAL Compliant)
nLint reports: document.vhd(9): Warning 27181: Use signal instead of variable for "t" in process of synthesizable code. (Synthesis)
nLint reports following if the argument value is ("3","16"): document1.vhd(1): Warning 27201: the length of ENTITY name "TOP_01234567890123456" is unconventional and should be in the range from 3 to 16. (Naming Convention) -------------------example : document2.vhd------------1 2 3 4 5 6 entity T is end T; --warning on "T"
nLint reports following if the argument value is ("3","16"): document2.vhd(1): Warning 27201: the length of ENTITY name "T" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(1): Warning 27203: ENTITY "TOP" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_ety"): document.vhd(1): Warning 27205: clock ENTITY name "TEST" does not match to regular expression ".*_ety". (Naming Convention)
27209 (Verilog) MODULE Name Length 27209 (VHDL) ARCHITECTURE Name Length
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the length of module name "%s" is unconventional and should be in the range from %d to %d. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the length of ARCHITECTURE name "%s" is unconventional and should be in the range from %d to %d. Configurable Parameter Rule group: Naming Convention; Argument type: integer, integer; Argument description: specify the least number by the first argument and the most number by the second argument for the number of characters of ARCHITECTURE name; Default value: "3","16" for Verilog, "3","16" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the length of the module name is in the specified range. (VHDL) This rule checks whether the length of the ARCHITECTURE name is in the specified range. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 module test_top_0123456789012; //warning on "test_top_0123456789012" endmodule
nLint reports following if the argument value is ("3","16"): document.v(1): Warning 27209: the length of module name "test_top_0123456789012" is unconventional and should be in the range from 3 to 16. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is end top_ety; architecture TEST_TOP_01234567890123 of top_ety is --warning on "TEST_TOP_01234567890123" begin end TEST_TOP_01234567890123;
nLint reports following if the argument value is ("3","16"): document.vhd(4): Warning 27209: the length of ARCHITECTURE name "test_top_01234567890123" is unconventional and should be in the range from 3 to 16. (Naming Convention)
27211 (Verilog) MODULE Name Case 27211 (VHDL) ARCHITECTURE Name Case
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: module "%s" should be named in %s case. (VHDL) <filename>(<line no.>): <severity> <rule no.>: ARCHITECTURE "%s" should be named in %s case. Configurable Parameter Rule group: Naming Convention; Argument type: (CASE_UPPER, CASE_LOWER); Argument description: If the argument is set to CASE_UPPER, the rule checks whether the string is in upper case. If the argument is set to CASE_LOWER, the rule checks whether the string is in lower case. Default value: "CASE_LOWER" for Verilog, "CASE_LOWER" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the module names are all in lower (or upper) case. (VHDL) This rule checks whether the ARCHITECTURE names are all in lower (or upper) case. Example
(Verilog) ///////////////example : document.v//////////// 1 2 module TEST_TOP; //warning on "TEST_TOP" endmodule
nLint reports following if the argument value is ("CASE_LOWER"): document.v(1): Warning 27211: module "TEST_TOP" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 entity top_ety is end top_ety; architecture TEST_TOP of top_ety is --warning on "TEST_TOP" begin end TEST_TOP;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(4): Warning 27211: ARCHITECTURE "TEST_TOP" should be named in CASE_LOWER case. (Naming Convention)
27213 (Verilog) MODULE Name Prefix or Suffix 27213 (VHDL) ARCHITECTURE Name Prefix or Suffix
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: module name "%s" does not match to regular expression "%s". (VHDL) <filename>(<line no.>): <severity> <rule no.>: ARCHITECTURE name "%s" does not match to regular expression "%s". Configurable Parameter Rule group: Naming Convention; Argument type: (PREFIX, SUFFIX, SUB_STRING, REGEXPR), string; Argument description: Set the first argument as PREFIX, SUFFIX or SUB_STRING to check prefix, suffix or sub-string of a name respectively, and set REGEXPR to check whether a name matches a regular expression (for clarification, see Regular Expression Help in the end of Rule documentation). Specify a string or a regular expression in the second argument for the name to check as specified in the first argument. Default value: "SUFFIX","_module" for Verilog, "SUFFIX","_arch" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the module names has a recommended prefix or suffix. (VHDL) This rule checks whether the ARCHITECTURE name has a recommended prefix or suffix. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 module TEST_TOP; //warning on "TEST_TOP", using //"TOP_module" like endmodule
nLint reports following if the argument value is ("SUFFIX","_module"): document.v(1): Warning 27213: module name "TEST_TOP" does not match to regular expression ".*_module". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is end top_ety; architecture TEST_TOP of top_ety is --warning on "TEST_TOP", using --"TOP_arch" like begin end TEST_TOP;
nLint reports following if the argument value is ("SUFFIX","_arch"): document.vhd(4): Warning 27213: ARCHITECTURE name "test_top" does not match to regular expression ".*_arch". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.vhd(1): Warning 27217: the length of PACKAGE name "ARITH_0123456789012345" is unconventional and should be in the range from 3 to 16. (Naming Convention)
use work.MATH.all; entity top_ety is end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(1): Warning 27219: PACKAGE "MATH" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_pkg"): document.vhd(1): Warning 27221: PACKAGE name "MATH" does not match to regular expression ".*_pkg". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.vhd(8): Warning 27225: the length of CONFIGURATION name "TOP_CONF_0123456789012" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(8): Warning 27227: CONFIGURATION "TOP_CONF" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_cfg"): document.vhd(8): Warning 27229: CONFIGURATION name "TOP_CONF" does not match to regular expression ".*_cfg". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.v(4): Warning 27233: the length of instance name "u_EA_012345678901234" is unconventional and should be in the range from 3 to 16. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 library IEEE; use IEEE.std_logic_1164.all; entity EA generic port (d q end EA; is (n: integer := 8); : in bit_vector(n-1 downto 0); : out bit_vector(n-1 downto 0));
architecture arch of EA is begin end arch; library IEEE; use IEEE.std_logic_1164.all; use work.all; entity top_ety is end top_ety; architecture TOP_arch of top_ety is constant c: integer := 4; signal d1 : bit_vector(c-1 downto 0); signal q1 : bit_vector(c-1 downto 0);
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
signal d2 : bit_vector(2*c-1 downto 0); signal q2 : bit_vector(2*c-1 downto 0); component EA is generic (n: integer := 8); port (d : in bit_vector(n-1 downto 0); q : out bit_vector(n-1 downto 0)); end component EA; begin u_EA_012345678901234: component EA --warning on "u_EA_012345678901234" generic map (n=>c) port map (d=>d1, q=>q1); end TOP_arch;
nLint reports following if the argument value is ("3","16"): document.vhd(35): Warning 27233: the length of instance name "u_EA_012345678901234" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.v(3): Warning 27235: instance "U_EA" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 library IEEE; use IEEE.std_logic_1164.all; entity EA generic port (d q end EA; is (n: integer := 8); : in bit_vector(n-1 downto 0); : out bit_vector(n-1 downto 0));
architecture arch of EA is begin end arch; library IEEE; use IEEE.std_logic_1164.all; use work.all; entity top_ety is end top_ety; architecture TOP_arch of top_ety is constant c: integer := 4; signal d1 : bit_vector(c-1 downto 0); signal q1 : bit_vector(c-1 downto 0);
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
signal d2 : bit_vector(2*c-1 downto 0); signal q2 : bit_vector(2*c-1 downto 0); component EA is generic (n: integer := 8); port (d : in bit_vector(n-1 downto 0); q : out bit_vector(n-1 downto 0)); end component EA; begin U_EA: component EA --warning on "U_EA" generic map (n=>c) port map(d=>d1, q=>q1); end TOP_arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(35): Warning 27235: instance "U_EA" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.vhd(29): Warning 27241: the length of COMPONENT name "EA_012345678901234" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","com_"): document.vhd(15): Warning 27245: COMPONENT name "EA" does not match to regular expression "com_.*". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.v(6): Warning 27249: the length of PROCESS name "P_0123456789012345" is unconventional and should be in the range from 3 to 16. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is end top_ety; architecture arch of top_ety is signal s : bit; signal o : bit; begin P_0123456789012345 : process ( s ) --warning on "P_0123456789012345" begin o <= s; end process; end arch;
nLint reports following if the argument value is ("3","16"): document.vhd(8): Warning 27249: the length of PROCESS name "p_0123456789012345" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.v(6): Warning 27251: process "P1" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is end top_ety; architecture arch of top_ety is signal s : bit; signal o : bit; begin P1 : process ( s ) --warning on "P1" begin o <= s; end process; end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(8): Warning 27251: PROCESS "P1" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.vhd(5): Warning 27257: the length of CONSTANT name "C_0123456789012345" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(5): Warning 27259: CONSTANT "C1" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","c_"): document.vhd(5): Warning 27261: CONSTANT name "Length" does not match to regular expression "c_.*". (Naming Convention)
nLint reports following if the argument value is document.v(4): Warning 27265: the length of TYPE 3 to 16 characters. (Naming Convention) document.v(7): Warning 27265: the length of TYPE "a_very_long_name_as_typedef_name" is not in the (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is type Color_01234567890123 is (black, white, red, green); --warning on "Color_01234567890123" end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("3","16"): document.vhd(2): Warning 27265: the length of TYPE name "Color_01234567890123" is not in the range of 3 to 16 characters. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.sv(3): Warning 27267: TYPE "intP" is not in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is type Color is (black, white, red, green); --warning on "Color" end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(2): Warning 27267: TYPE "Color" is not in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("SUFFIX","_typ"): document.sv(3): Warning 27269: TYPE name "intP" does not match specified string ".*_typ". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is type Color is (black, white, red, green); --warning on "Color", using "Color_typ" like end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("SUFFIX","_typ"): document.vhd(2): Warning 27269: TYPE name "Color" does not match specified string ".*_typ". (Naming Convention)
27273 (Verilog) PARAMETER Name Length 27273 (VHDL) GENERIC Name Length
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the length of parameter name "%s" is unconventional and should be in the range from %d to %d. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the length of GENERIC name "%s" is unconventional and should be in the range from %d to %d. Configurable Parameter Rule group: Naming Convention; Argument type: integer, integer; Argument description: specify the least number by the first argument and the most number by the second argumentfor the number of characters of GENERIC name; Default value: "3","16" for Verilog, "3","16" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the length of the parameter name is in the specified range (VHDL) This rule checks whether the length of the GENERIC name is in the specified range Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 module test; parameter par_012345678901234 = 5; //warning on "par_012345678901234" endmodule
nLint reports following if the argument value is ("3","16"): document.v(2): Warning 27273: the length of parameter name "par_012345678901234" is unconventional and should be in the range from 3 to 16. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is generic ( G_Size_0123456789012 : integer := 16 --warning on "G_Size_0123456789012" ); end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("3","16"): document.vhd(3): Warning 27273: the length of GENERIC name "G_Size_0123456789012" is unconventional and should be in the range from 3 to 16. (Naming Convention)
27277 (Verilog) PARAMETER Name Prefix or Suffix 27277 (VHDL) GENERIC Name Prefix or Suffix
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: parameterl name "%s" does not match to regular expression "%s". (VHDL) <filename>(<line no.>): <severity> <rule no.>: GENERIC name "%s" does not match to regular expression "%s". Configurable Parameter Rule group: Naming Convention; Argument type: (PREFIX, SUFFIX, SUB_STRING, REGEXPR), string; Argument description: Set the first argument as PREFIX, SUFFIX or SUB_STRING to check prefix, suffix or sub-string of a name respectively, and set REGEXPR to check whether a name matches a regular expression (for clarification, see Regular Expression Help in the end of Rule documentation). Specify a string or a regular expression in the second argument for the name to check as specified in the first argument. Default value: "PREFIX","p_" for Verilog, "PREFIX","g_" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the parameter name has a recommended prefix or suffix. (VHDL) This rule checks whether the GENERIC name has a recommended prefix or suffix. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 module test (clock, reset, control, y); input clock, reset, control; output [2:0] y; reg [2:0] y; parameter st0 = 0; //warning on st0, p_st0 is recommended reg [1:0] current, next; endmodule
nLint reports following if the argument value is ("PREFIX","p_"): document.v(6): Warning 27277: parameterl name "st0" does not match to regular expression "p_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is generic (n: integer := 10; --warning on 'n', 'g_n' is recommended M: bit :='0' --warning on 'M', 'g_M' is recommended ); begin end entity top_ety; architecture arch of top_ety is begin end arch;
document.vhd(2): Warning 27277: GENERIC name "n" does not match to regular expression "g_.*". (Naming Convention) document.vhd(4): Warning 27277: GENERIC name "M" does not match to regular expression "g_.*". (Naming Convention)
nLint reports following if the argument value is ("PREFIX","s_"): document.v(2): Warning 27285: signal name "checked" does not match to regular expression "s_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 entity top_ety is signal checked : boolean; --warning on "checked", --using "s_checked" like end top_ety; architecture arch of top_ety is begin end arch;
nLint reports following if the argument value is ("PREFIX","s_"): document.vhd(2): Warning 27285: SIGNAL name "checked" does not match to regular expression "s_.*". (Naming Convention)
nLint reports following if the document.sv(2): Warning 27287: "var_.*". (Naming Convention) document.sv(4): Warning 27287: "var_.*". (Naming Convention) document.sv(4): Warning 27287: "var_.*". (Naming Convention) document.sv(6): Warning 27287: "var_.*". (Naming Convention)
argument value is ("var_.*"): variable name "l" does not match regular expression variable name "q" does not match regular expression variable name "r" does not match regular expression variable name "b" does not match regular expression
document.sv(11): Warning 27287: variable name "su" does not match regular expression "var_.*". (Naming Convention) document.sv(15): Warning 27287: variable name "stvar678901234567" does not match regular expression "var_.*". (Naming Convention) document.sv(20): Warning 27287: variable name "un" does not match regular expression "var_.*". (Naming Convention) document.sv(21): Warning 27287: variable name "dv" does not match regular expression "var_.*". (Naming Convention) document.sv(23): Warning 27287: variable name "t" does not match regular expression "var_.*". (Naming Convention) document.sv(24): Warning 27287: variable name "i" does not match regular expression "var_.*". (Naming Convention) document.sv(27): Warning 27287: variable name "out" does not match regular expression "var_.*". (Naming Convention) document.sv(27): Warning 27287: variable name "in" does not match regular expression "var_.*". (Naming Convention) document.sv(28): Warning 27287: variable name "t" does not match regular expression "var_.*". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.sv(2): Warning 27288: the length of variable name "l" range of "3" to "16" characters. (Naming Convention) document.sv(4): Warning 27288: the length of variable name "q" range of "3" to "16" characters. (Naming Convention) document.sv(4): Warning 27288: the length of variable name "r" range of "3" to "16" characters. (Naming Convention) document.sv(6): Warning 27288: the length of variable name "b" range of "3" to "16" characters. (Naming Convention)
document.sv(11): Warning 27288: the length of variable name "su" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(15): Warning 27288: the length of variable name "stvar678901234567" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(20): Warning 27288: the length of variable name "un" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(21): Warning 27288: the length of variable name "dv" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(23): Warning 27288: the length of variable name "t" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(24): Warning 27288: the length of variable name "i" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(27): Warning 27288: the length of variable name "in" should be in the range of "3" to "16" characters. (Naming Convention) document.sv(28): Warning 27288: the length of variable name "t" should be in the range of "3" to "16" characters. (Naming Convention)
output q);
nLint reports following if the argument value is (".*_fld"): document.sv(3): Warning 27289: field name "l1" does not match regular expression ".*_fld". (Naming Convention) document.sv(12): Warning 27289: field name "l1" does not match regular expression ".*_fld". (Naming Convention) document.sv(13): Warning 27289: field name "i1" does not match regular expression ".*_fld". (Naming Convention) document.sv(18): Warning 27289: field name "i1" does not match regular expression ".*_fld". (Naming Convention)
output q);
nLint reports following if the argument value is ("3","16"): document.sv(3): Warning 27290: the length of field name "l1" should range between "3" and "16" characters. (Naming Convention) document.sv(4): Warning 27290: the length of field name "i1" should range between "3" and "16" characters. (Naming Convention) document.sv(12): Warning 27290: the length of field name "l1" should range between "3" and "16" characters. (Naming Convention) document.sv(13): Warning 27290: the length of field name "i1" should range between "3" and "16" characters. (Naming Convention) document.sv(17): Warning 27290: the length of field name "s1" should range between "3" and "16" characters. (Naming Convention) document.sv(18): Warning 27290: the length of field name "i1" should range between "3" and "16" characters. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","v_"): document.v(2): Warning 27293: variable name "Length" does not match to regular expression "v_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end top_ety; architecture arch of top_ety is begin process variable Length : integer := 16; --warning on "Length", using "var_Length" like begin end process; end arch;
nLint reports following if the argument value is ("PREFIX","v_"): document.vhd(7): Warning 27293: VARIABLE name "Length" does not match to regular expression "v_.*". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.v(3): Warning 27297: the length of function name "mu" is unconventional and should be in the range from 3 to 16. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 entity top_ety is end top_ety; architecture arch of top_ety is function func_add_0123456789 --warning on "func_add_0123456789" ( a : integer; b : integer ) return integer is begin end func_add_0123456789; begin
10
end arch;
nLint reports following if the argument value is ("3","16"): document.vhd(5): Warning 27297: the length of FUNCTION name "func_add_0123456789" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.v(2): Warning 27299: function "Func_add" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is function Func_add --warning on "Func_add" ( a : integer; b : integer ) return integer is begin end Func_add; begin end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(5): Warning 27299: FUNCTION "Func_add" should be named in CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","f_"): document.v(2): Warning 27301: function name "add" does not match to regular expression "f_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is function add --warning on "add", using "f_add" like ( a : integer; b : integer ) return integer is begin end add; begin end arch;
nLint reports following if the argument value is ("PREFIX","f_"): document.vhd(5): Warning 27301: FUNCTION name "add" does not match to regular expression "f_.*". (Naming Convention)
27305 (Verilog) TASK Name Length 27305 (VHDL) PROCEDURE Name Length
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: the length of task name "%s" is unconventional and should be in the range from %d to %d. (VHDL) <filename>(<line no.>): <severity> <rule no.>: the length of PROCEDURE name "%s" is unconventional and should be in the range from %d to %d. Configurable Parameter Rule group: Naming Convention; Argument type: integer, integer; Argument description: specify the least number by the first argument and the most number by the second argumentfor the number of characters of PROCEDURE name; Default value: "3","16" for Verilog, "3","16" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the length of the task name is in the specified range. (VHDL) This rule checks whether the length of the PROCEDURE name is in the specified range. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 module test; task Check_0123456789012; //warning on "Check_0123456789012" begin end endtask endmodule
nLint reports following if the argument value is ("3","16"): document.v(2): Warning 27305: the length of task name "Check_0123456789012" is unconventional and should be in the range from 3 to 16. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end top_ety; architecture arch of top_ety is procedure Check_0123456789012 --warning on "Check_0123456789012" ( a : in integer; b : in integer ) is begin end Check_0123456789012; begin end arch;
nLint reports following if the argument value is ("3","16"): document.vhd(5): Warning 27305: the length of PROCEDURE name "Check_0123456789012" is unconventional and should be in the range from 3 to 16. (Naming Convention)
27307 (Verilog) TASK Name Case 27307 (VHDL) PROCEDURE Name Case
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: task "%s" should be named in %s case. (VHDL) <filename>(<line no.>): <severity> <rule no.>: PROCEDURE "%s" should be named in %s case. Configurable Parameter Rule group: Naming Convention; Argument type: (CASE_UPPER, CASE_LOWER); Argument description: If the argument is set to CASE_UPPER, the rule checks whether the string is in upper case. If the argument is set to CASE_LOWER, the rule checks whether the string is in lower case. Default value: "CASE_LOWER" for Verilog, "CASE_LOWER" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the task names are all in lower (or upper) case. (VHDL) This rule checks whether the PROCEDURE names are all in lower (or upper) case. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 module test; task Check; //warning on "Check" begin end endtask endmodule
nLint reports following if the argument value is ("CASE_LOWER"): document.v(2): Warning 27307: task "Check" should be named in CASE_LOWER case. (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is procedure Check --warning on "Check" ( a : in integer; b : in integer ) is begin end Check; begin end arch;
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(5): Warning 27307: PROCEDURE "Check" should be named in CASE_LOWER case. (Naming Convention)
27309 (Verilog) TASK Name Prefix or Suffix 27309 (VHDL) PROCEDURE Name Prefix or Suffix
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: task name "%s" does not match to regular expression "%s". (VHDL) <filename>(<line no.>): <severity> <rule no.>: PROCEDURE name "%s" does not match to regular expression "%s". Configurable Parameter Rule group: Naming Convention; Argument type: (PREFIX, SUFFIX, SUB_STRING, REGEXPR), string; Argument description: Set the first argument as PREFIX, SUFFIX or SUB_STRING to check prefix, suffix or sub-string of a name respectively, and set REGEXPR to check whether a name matches a regular expression (for clarification, see Regular Expression Help in the end of Rule documentation). Specify a string or a regular expression in the second argument for the name to check as specified in the first argument. Default value: "PREFIX","p_" for Verilog, "PREFIX","p_" for VHDL; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the task name has a recommended prefix or suffix. (VHDL) This rule checks whether the PROCEDURE name has a recommended prefix or suffix. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 module test; task Check; //warning on "Check", using "p_Check" like begin end endtask endmodule
nLint reports following if the argument value is ("PREFIX","p_"): document.v(2): Warning 27309: task name "Check" does not match to regular expression "p_.*". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is procedure Check --warning on "Check", using "p_Check" like ( a : in integer; b : in integer ) is begin end Check; begin end arch;
nLint reports following if the argument value is ("PREFIX","p_"): document.vhd(5): Warning 27309: PROCEDURE name "Check" does not match to regular expression "p_.*". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.vhd(10): Warning 27313: the length of BLOCK name "b_01234567890123456" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("CASE_LOWER"): document.vhd(10): Warning 27315: BLOCK "BL" should be named with CASE_LOWER case. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","blk_"): document.vhd(6): Warning 27317: BLOCK name "ladd" does not match to regular expression "blk_.*". (Naming Convention)
nLint reports following if the argument value is ("3","16"): document.vhd(8): Warning 27321: the length of ATTRIBUTE name "attr_string_01234567890" is unconventional and should be in the range from 3 to 16. (Naming Convention)
nLint reports following if the argument value is ("PREFIX","attr_"): document.vhd(8): Warning 27325: ATTRIBUTE name "ex_name" does not match to regular expression "attr_.*". (Naming Convention)
nLint reports: document.vhd(8): Warning 27327: mixed sequential and combinational logic infered in a process. (Design Style)
nLint reports: document.v(9): Warning 27328: combinational expression or statement not allowed in sequential block. (Design Style) document.v(11): Warning 27328: combinational expression or statement not allowed in sequential block. (Design Style) document.v(14): Warning 27328: combinational expression or statement not allowed in sequential block. (Design Style)
nLint reports following if the argument value is ("NET_DECL"): document.v(3): Warning 27329: there is directly continuous assignment on net "a", which is unrecommended. (Design Style)
nLint reports: document.vhd(8): Warning 27331: there is constrained return expression ""000"" in unconstrained return type function. (Design Style) document.vhd(9): Warning 27331: there is constrained return expression ""001"" in unconstrained return type function. (Design Style) document.vhd(10): Warning 27331: there is constrained return expression ""010"" in unconstrained return type function. (Design Style) document.vhd(11): Warning 27331: there is constrained return expression ""100"" in unconstrained return type function. (Design Style)
27333 (Verilog) Variables Declared in Automatic Tasks Used with Incorrect Constructs
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: variable "%s" should not be assigned or referenced in automatic task "%s". Configurable Parameter Rule group: Language Construct; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) Variables declared in automatic tasks are de-allocated at the end of the task invocation, so they should not be used with constructs that would refer to them after that point. For example, variables declared in automatic tasks should not be used when the assigned values are used in nonblocking assignments or procedural continuous assignments, referenced by procedural continuous assignments or procedural force statements, referenced in intra-assignment event controls of nonblocking assignments, or traced with system tasks such as $monitor and $dumpvars. Example
(Verilog) ///////////////example : document.v2k//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 module test; task automatic ALU; input clock; input [1:0] ctrl; input [12:0] a; input [12:0] b; output [12:0] y; begin case (ctrl) 2'b00: y <= a + b; //warning on y 2'b01: y <= @ ( posedge clock ) a - b; //warning on y, clock 2'b10: force y = a + b; //warning a, b 2'b11: assign y = a + b; //warning on a, b, y endcase $monitor($time,,,"a=%d,b=%d,y=%d",a,b,y); //warning a, b, y end endtask endmodule
nLint reports: document.v2k(12): Warning 27333: variable "y" should not in automatic task "ALU". (Language Construct) document.v2k(14): Warning 27333: variable "y" should not in automatic task "ALU". (Language Construct) document.v2k(14): Warning 27333: variable "clock" should referenced in automatic task "ALU". (Language Construct) document.v2k(16): Warning 27333: variable "a" should not in automatic task "ALU". (Language Construct) document.v2k(16): Warning 27333: variable "b" should not in automatic task "ALU". (Language Construct) document.v2k(18): Warning 27333: variable "y" should not in automatic task "ALU". (Language Construct) document.v2k(18): Warning 27333: variable "a" should not in automatic task "ALU". (Language Construct) document.v2k(18): Warning 27333: variable "b" should not
be assigned or referenced be assigned or referenced not be assigned or be assigned or referenced be assigned or referenced be assigned or referenced be assigned or referenced be assigned or referenced
in automatic task document.v2k(20): in automatic task document.v2k(20): in automatic task document.v2k(20): in automatic task
"ALU". (Language Construct) Warning 27333: variable "a" should not be assigned or referenced "ALU". (Language Construct) Warning 27333: variable "b" should not be assigned or referenced "ALU". (Language Construct) Warning 27333: variable "y" should not be assigned or referenced "ALU". (Language Construct)
nLint reports: document.v(11): Warning 27335: statement/expression used in translate_off/translate_on may cause mismatch between pre-synthesis and postsynthesis. (Simulation,Synthesis) document.v(21): Warning 27335: statement/expression used in translate_off/translate_on may cause mismatch between pre-synthesis and postsynthesis. (Simulation,Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 entity top_ety is port (a,b,c: in bit; SADDR: in bit_vector(3 downto 0); y : out bit; SOFFSET: out bit_vector(3 downto 0)); end top_ety;
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
architecture arch of top_ety is signal E21_REG_BPP : bit_vector(1 downto 0); begin y <= --synopsys translate_off a or b or --synopsys translate_on c; process(E21_REG_BPP) begin case E21_REG_BPP(1 downto 0) is when "00" => SOFFSET <= SADDR; when "01" => SOFFSET <= SADDR(2 downto 0) & '0'; when "11" => SOFFSET <= SADDR(1 downto 0) & "00"; --synopsys translate_off when others => SOFFSET <= "0000"; --synopsys translate_on end case; end process; end arch;
nLint reports: document.vhd(13): Warning 27335: statement/expression translate_off/translate_on may cause mismatch between synthesis. (Simulation,Synthesis) document.vhd(23): Warning 27335: statement/expression translate_off/translate_on may cause mismatch between synthesis. (Simulation,Synthesis)
nLint reports following if the argument value is ("CHECK_FULL_CASE"): document.v(7): Warning 27337: case statement with both full_case directive and default clause may cause mismatch between pre-synthesis and post-synthesis. (Simulation,Synthesis) ///////////////example : document1.sv//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 module test(input bit sel1, sel2, sel3); int a, b, c; always_comb case (sel1) //synopsys full_case 1'b1: a = 0; default: a = 1; endcase always_comb unique case (sel2) 1'b1: b = 0; default: b = 1; endcase
always_comb priority case (sel3) //warning here if CHECK_UNI_PRI is specified 1'b1: c = 0; default: c = 1; endcase endmodule
nLint reports following if the argument value is ( CHECK_UNI_PRI): document1.sv(12): Warning 27337: case statement with both full_case directive and default clause may cause mismatch between pre-synthesis and post-synthesis. (Simulation,Synthesis) document1.sv(18): Warning 27337: case statement with both full_case directive and default clause may cause mismatch between pre-synthesis and post-synthesis. (Simulation,Synthesis)
signed
nLint reports following if the argument value is ("IGNORE_SIGNED_POSITIVE_CONST"): document.sv(14): Warning 27338: signed operand "c" should not be mixed with unsigned operand "a". (Coding Style) document.sv(15): Warning 27338: signed operand "i" should not be mixed with unsigned operand "j". (Coding Style) ///////////////example : document2.sv//////////// 1 module test; 2 parameter reg signed [7:0] A = 3; 3 4 logic [3:0] b, c1, c2, c3; 5 6 always begin 7 c1 = b - A; //No warning if select "IGNORE_SIGNED_POSITIVE_CONST" 8 c2 = b * 3; //No warning if select "IGNORE_SIGNED_POSITIVE_CONST" 9 c3 = b / 3'sb011; //No warning if select "IGNORE_SIGNED_POSITIVE_CONST"
10 11
end endmodule
nLint reports following if the argument value is ( IGNORE_SIGNED_POSITIVE_CONST): ///////////////example : document3.sv//////////// 1 2 3 4 5 6 7 8 9 10 11 module test; parameter reg signed [7:0] A = 3; logic [3:0] b, c1, c2, c3; always begin c1 = b - A; c2 = b * 3; c3 = b / 3'sb011; end endmodule
nLint reports following if the argument value is ( CHECK_ALL): document3.sv(7): Warning 27338: signed operand "A" should not be mixed with unsigned operand "b". (Coding Style) document3.sv(8): Warning 27338: signed operand "3" should not be mixed with unsigned operand "b". (Coding Style) document3.sv(9): Warning 27338: signed operand "3'sb011" should not be mixed with unsigned operand "b". (Coding Style)
nLint reports following if the argument value is ("CHECK_ALL"): document.v(6): Warning 27339: unsigned to signed assignment occurs. (Coding Style) ///////////////example : document2.v2k//////////// 1 module test(sig1, sig2, sig3); 2 input [2:0] sig1, sig2, sig3; 3 wire [2:0] sig1, sig2, sig3; 4 5 assign sig1 = 3'sb011; //no warning if select argument "IGNORE_SIGNED_POSITIVE_CONST" 6 assign sig2 = 3; //no warning if select argument "IGNORE_SIGNED_POSITIVE_CONST" 7 assign sig3 = -3; //warning anyway 8 endmodule
nLint reports following if the argument value is ( IGNORE_SIGNED_POSITIVE_CONST): document2.v2k(7): Warning 27339: signed to unsigned assignment occurs. (Coding Style) ///////////////example : document3.v2k//////////// 1 2 3 4 5 6 7 8 module test(sig1, sig2, sig3); input [2:0] sig1, sig2, sig3; wire [2:0] sig1, sig2, sig3; assign sig1 = 3'sb011; assign sig2 = 3; assign sig3 = -3; endmodule //warning if select argument "CHECK_ALL" //warning if select argument "CHECK_ALL" //warning anyway
document3.v2k(5): Warning 27339: signed to unsigned assignment occurs. (Coding Style) document3.v2k(6): Warning 27339: signed to unsigned assignment occurs. (Coding Style) document3.v2k(7): Warning 27339: signed to unsigned assignment occurs. (Coding Style)
27341 (VHDL) Place Entity, Architecture and Configuration into the Same File
Message (VHDL) <filename>(<line no.>): <severity> <rule no.>: %s "%s" is detected in different file of entity "%s". Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (VHDL) This rule checks whether there is any architecture or configuration declared in different files of entity declaration. Example
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 --a.vhd entity test is --warning here end entity test; --b.vhd architecture arch of test is begin end architecture arch;
nLint reports: document.v(8): Warning 27343: integer type should not be used on port instance "d". (Design Style)
nLint reports: document.v(10): Warning 27345: a size constant should be specified for integer "1". (Language Construct) document.v(15): Warning 27345: a size constant should be specified for integer "3". (Language Construct)
nLint reports: document.v(3): Warning 27347: nested synopsys translate_on or translate_off directive couldn't be used. (Coding Style) document.v(5): Warning 27347: nested synopsys translate_on or translate_off directive couldn't be used. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is begin --synopsys translate_off --synopsys translate_off --warning here --synopsys translate_on --synopsys translate_on --warning here end arch;
nLint reports: document.vhd(7): Warning 27347: nested synopsys translate_on or translate_off directive couldn't be used. (Coding Style) document.vhd(9): Warning 27347: nested synopsys translate_on or translate_off directive couldn't be used. (Coding Style)
nLint reports following if the argument value is ("UNARY_PLUS, UNARY_MINUS, MULTIPLY, DIVIDE, MOD, POWER"): document.v(5): Warning 27351: operator "*" should not be used. (Coding Style) document.v(6): Warning 27351: operator "/" should not be used. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is end top_ety; architecture arch of top_ety is signal x, z, mi : integer ; begin process begin x <= z * mi; --warning here end process; end arch;
nLint reports following if the argument value is ("UNARY_PLUS, UNARY_MINUS, MULTIPLY, DIVIDE, MOD, POWER"): document.vhd(9): Warning 27351: operator "*" should not be used. (Coding Style)
nLint reports following if the argument value is ("\.*.*"): document.v(3): Warning 27353: escape name "\cpu[0] " should not be used. (Coding Style)
nLint reports following if the argument value is ("INPUT_SIGNAL_TO_OUTPUT_PORT, OUTPUT_SIGNAL_TO_INPUT_PORT"): document.v(10): Warning 27355: output signal "OUT" is connected to input port "inb". (Coding Style) document.v(10): Warning 27355: input signal "INA" is connected to output port "out". (Coding Style)
nLint reports: document1.v(10): Warning 27356: wire "test.a" connects to input port "test.u2.a" and input port "test.u3.a" without any drivers. (Block Interconnect) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 //sample case for checking output module test(c); input c; wire a,b,c; test1 u1 (a); test2 u2 (b); and u3 (a, b, c); endmodule module test1(a); //warning here output a; wire a; endmodule module test2(a); output a; wire a; endmodule
nLint reports: document2.v(11): Warning 27356: wire "test.a" connects to output port "test.u1.a" and output port "test.u2.a" without any loads. (Block Interconnect)
nLint reports: a.v(1): Warning 27357: module "A" should not be redefined. (Coding Style)
nLint reports: document.v(2): Warning 27359: macro "THREE" is defined but not used. (Design Style) document.v(11): Warning 27359: macro "FIVE" is defined but not used. (Design Style)
nLint reports: document.v(5): Warning 27361: falling active clock "clk" should not be used. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 library IEEE; use IEEE.STD_LOGIC_1164.all, IEEE.NUMERIC_STD.all; entity top_ety is port ( Clock : in std_logic; A1, A2 : in bit; Y1, Y2 : out bit); end top_ety; architecture RTL of top_ety is begin process(Clock, A2) begin if falling_edge ( Clock ) then Y2 <= A2; end if; end process; end RTL;
--warning here
nLint reports: document.vhd(14): Warning 27361: falling active clock "Clock" should not be used.
(Design Style)
nLint reports following if the argument value is ("IGNORE_GENERATEFOR"): document.v(8): Warning 27363: for-loop is detected. (Coding Style)
nLint reports following if the argument value is ("CASEX"): document.v(7): Warning 27365: no casex statement allowed. (Coding Style)
nLint reports: document.v(8): Warning 27367: no conditional assignment allowed, using if-thenelse instead. (Coding Style)
nLint reports: document.v(3): Warning 27369: integer type object "a" should not be used. (Design Style) document.v(7): Warning 27369: integer type object "f2" should not be used. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 entity top_ety is generic (n: integer :=10); --warning here end top_ety; architecture arch of top_ety is type BYTE_LENGTH is range 0 to 255; signal a: integer; signal b: BYTE_LENGTH; signal clk: bit; --warning here --warning here
function func1 return integer is variable f1: integer; --warning here begin return 0; end; begin process (clk) variable c: BYTE_LENGTH; --warning here begin end process; end arch;
nLint reports: document.vhd(2): Warning 27369: integer type object "n" should not be used. (Design Style) document.vhd(8): Warning 27369: integer type object "a" should not be used.
(Design Style) document.vhd(9): Warning 27369: integer type object "b" should not be used. (Design Style) document.vhd(13): Warning 27369: integer type object "f1" should not be used. (Design Style) document.vhd(19): Warning 27369: integer type object "c" should not be used. (Design Style)
nLint reports following if the argument value is ("parallel_case,full_case"): document.v(2): Warning 27371: synopsys synthesis directive "// synopsys parallel_case" should not be used. (Coding Style) document.v(4): Warning 27371: synopsys synthesis directive "// synopsys full_case" should not be used. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 entity top_ety is end top_ety; architecture arch of top_ety is -- synopsys parallel_case -- warning here -- synopsys full_case -- warning here begin end arch;
nLint reports following if the argument value is ("parallel_case,full_case"): document.vhd(5): Warning 27371: synopsys synthesis directive "-- synopsys parallel_case" should not be used. (Coding Style) document.vhd(7): Warning 27371: synopsys synthesis directive "-- synopsys full_case" should not be used. (Coding Style)
nLint reports following if the argument value is ("SUFFIX","_ns"): document.v(27): Warning 27373: next register name "next" does not match to regular expression ".*_ns". (Naming Convention)
(VHDL)
-------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 entity top_ety is port ( reset : in bit; clock : in bit; in1 : in bit; s: out integer ); end entity top_ety; architecture arch of top_ety is type state_T is (a,b); signal current : state_T :=a; signal next1 : state_T; begin p1: process (current,in1) is begin if (current=a) then if (in1='1') then next1<=b; end if; end if; if (current=b) then if (in1='1') then next1<=a; end if; end if; end process p1; p2: process (clock,reset) is begin if (reset='1') then current<=a; elsif (clock='1') then current<=next1; --warning here on "next1" --good style if using '_ns' --as suffix of current --state register "next1" end if; end process p2; end architecture arch;
nLint reports following if the argument value is ("SUFFIX","_ns"): document.vhd(34): Warning 27373: next register name "next1" does not match to regular expression ".*_ns". (Naming Convention)
nLint reports following if the argument value is ("a.*;.*b"): document.v(3): Warning 27375: identifier name "cba" does not follow the regular expression "a.*;.*b". (Naming Convention)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 --set argument with "a.*,.*b" entity top_ety is end top_ety;
--warning
architecture abc of top_ety is --begin with 'a', ok signal cab : bit; --end with 'b', ok begin end abc;
nLint reports following if the argument value is ("a.*;.*b"): document.vhd(2): Warning 27375: identifier name "top_ety" does not follow the regular expression "a.*;.*b". (Naming Convention)
nLint reports: document.v(1): Warning 27377: module "test" is empty. (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 entity top_ety is port ( clk : in bit); end top_ety; architecture arch of top_ety is signal s : bit; begin process (clk) begin end process; end arch; -- no warning
nLint reports:
nLint reports: document.v(9): Warning 27379: unsigned vector "in1" should not be compared with a negative value " - 2'd1". (Coding Style)
nLint reports following if the argument value is ("IGNORE_TIE_LOW_HIGH"): document.v(6): Warning 27381: scan enable signal should not be driven by combinational logic (scan enable: "TE" (document.v(5)); combinational logic output: "TE"). (DFT)
(VHDL) -------------------example : document.vhd------------1 entity top_ety is 2 port (D1 : in bit; 3 CP1 : in bit; 4 TI1 : in bit; 5 a : in bit; 6 Q1 : out bit; 7 QN1 : out bit); 8 end top_ety; 9 10 architecture arch of top_ety is 11 component FD1S is 12 port( D : in bit; 13 CP: in bit; 14 TI: in bit; 15 TE: in bit; 16 Q : out bit; 17 QN: out bit); 18 end component FD1S; 19 20 signal TE1 : bit; 21 begin 22 u1: component FD1S port map (D=>D1, CP=>CP1, TI=>TI1, TE=>TE1, Q=>Q1, QN=>QN1); 23
24 25 26 27 28
p1: process(CP1,a) is begin TE1 <= CP1 and a; --warning here end process p1; end arch;
nLint reports following if the argument value is ("IGNORE_TIE_LOW_HIGH"): document.vhd(26): Warning 27381: scan enable signal should not be driven by combinational logic (scan enable: "TE1" (document.vhd(22)); combinational logic output: "TE1"). (DFT)
nLint reports: document.v(10): Warning 27383: scan enable signal should not be driven by sequential logic (scan enable: "c[3]" (document.v(7)); sequential logic output: "c[3]"). (DFT)
(VHDL) -------------------example : document.vhd------------1 entity top_ety is 2 port (D1 : in bit; 3 CP1 : in bit; 4 TI1 : in bit; 5 a : in bit; 6 Q1 : out bit; 7 QN1 : out bit); 8 end top_ety; 9 10 architecture arch of top_ety is 11 component FD1S is 12 port( D : in bit; 13 CP: in bit; 14 TI: in bit; 15 TE: in bit; 16 Q : out bit; 17 QN: out bit); 18 end component FD1S; 19 20 signal TE1 : bit; 21 begin 22 u1: component FD1S port map (D=>D1, CP=>CP1, TI=>TI1, TE=>TE1, Q=>Q1, QN=>QN1); 23 24 p1: process(CP1,a) is 25 begin 26 if (CP1'event and CP1='1') then
27 28 29 30
TE1 <= a; --warning here end if; end process p1; end arch;
nLint reports: document.vhd(27): Warning 27383: scan enable signal should not be driven by sequential logic (scan enable: "TE1" (document.vhd(22)); sequential logic output: "TE1"). (DFT)
nLint reports: document.v(9): Warning 27385: scan enable signal should not be used as data (scan enable: "TE" (document.v(6)); data: "TE"). (DFT)
(VHDL) -------------------example : document.vhd------------1 entity top_ety is 2 port (D1 : in bit; 3 CP1 : in bit; 4 TI1 : in bit; 5 TE1 : in bit; 6 rst : in bit; 7 Q1 : out bit; 8 QN1 : out bit; 9 y : out bit); 10 end top_ety; 11 12 architecture arch of top_ety is 13 component FD1S is 14 port( D : in bit; 15 CP: in bit; 16 TI: in bit; 17 TE: in bit; 18 Q : out bit; 19 QN: out bit); 20 end component FD1S; 21 22 begin 23 u1: component FD1S port map (D=>D1, CP=>CP1, TI=>TI1, TE=>TE1, Q=>Q1, QN=>QN1); 24 25 p1: process (rst) is 26 begin 27 if (rst='1') then 28 y <= TE1; --warning here
29 30 31 32 33
else y <= '0'; end if; end process p1; end arch;
nLint reports: document.vhd(28): Warning 27385: scan enable signal should not be used as data (scan enable: "TE1" (document.vhd(23)); data: "TE1"). (DFT)
nLint reports: document.v(1): Warning 27387: scan enable signal feeds into primary output (scan enable: "TE" (document.v(5)); output signal: "y"). (DFT)
(VHDL) -------------------example : document.vhd------------1 entity top_ety is 2 port (D1 : in bit; 3 CP1 : in bit; 4 TI1 : in bit; 5 TE1 : in bit; 6 rst : in bit; 7 Q1 : out bit; 8 QN1 : out bit; 9 y : out bit); -- warning here 10 end top_ety; 11 12 architecture arch of top_ety is 13 component FD1S is 14 port( D : in bit; 15 CP: in bit; 16 TI: in bit; 17 TE: in bit; 18 Q : out bit; 19 QN: out bit); 20 end component FD1S; 21 22 begin 23 u1: component FD1S port map (D=>D1, CP=>CP1, TI=>TI1, TE=>TE1, Q=>Q1, QN=>QN1); 24 25 p1: process (rst) is 26 begin 27 y <= TE1; 28 end process p1; 29 end arch;
nLint reports: document.vhd(9): Warning 27387: scan enable signal feeds into primary output (scan enable: "TE1" (document.vhd(23)); output signal: "y"). (DFT)
nLint reports: document.v(1): Warning 27389: timescale missing on module "test". (Coding Style)
nLint reports following if the argument value is ("logic"): document.sv(2): Warning 27391: 'reg' declaration is detected, use logic instead. (Coding Style)
nLint reports following if the argument value is ("logic"): document.sv(3): Warning 27393: 'wire' declaration is detected, use logic instead. (Coding Style)
nLint reports following if the argument value is ("logic"): document.v(3): Warning 27394: 'tri' declaration is detected, use logic instead. (Coding Style)
nLint reports following if the argument value is ("my_bit,bit,logic;"): document.sv(3): Warning 27395: type "another_bit" should not be used directly, use "my_bit" instead. (Coding Style) document.sv(4): Warning 27395: type "bit" should not be used directly, use "my_bit" instead. (Coding Style) document.sv(5): Warning 27395: type "logic" should not be used directly, use "my_bit" instead. (Coding Style)
nLint reports: document.sv(2): Warning 27397: 'define is not allowed for defining constants. (Coding Style) document.sv(3): Warning 27397: 'define is not allowed for defining constants. (Coding Style)
parameter D1 = 1;
always @(posedge ck) if ( res==1'b0 ) //warning out <= 1'b0; else if ( set==1'b0 ) //warning out <= 1'b1; else out <= #D1 d; endmodule
nLint reports following if the argument value is ("//sync"): document.v(12): Warning 27399: synchronous set or reset "res" inferred without comment "//sync". (Coding Style) document.v(14): Warning 27399: synchronous set or reset "set" inferred without comment "//sync". (Coding Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 library IEEE; use IEEE.std_logic_1164.all; entity top_ety is port (reset : in std_logic; set : in std_logic; clk : in std_logic; d : in std_logic; q : out std_logic ); end entity top_ety; architecture arch of top_ety is
14 15 16 17 18 19 20 21 22 23 24 25 26 27
begin p1: process (clk) is begin if ( rising_edge(clk) ) then if (reset='1') then --warning q<='0'; elsif (set='1') then --warning q<='1'; else q<=d; end if; end if; end process p1; end architecture arch;
nLint reports following if the argument value is ("--sync"): document.vhd(18): Warning 27399: synchronous set or reset "reset" inferred without comment "--sync". (Coding Style) document.vhd(20): Warning 27399: synchronous set or reset "set" inferred without comment "--sync". (Coding Style)
parameter D1 = 1; always @(negedge ck or negedge res) if ( res==1'b0 ) out <= 4'b0000; else begin case(sel) 2'b00 : out <= #D1 4'b0001; //warning here 2'b01 : out <= #D1 4'b0010; 2'b10 : out <= #D1 4'b0100; 2'b11 : out <= #D1 4'b1000; default : out <= #D1 4'bxxxx; endcase end endmodule
nLint reports: document.v(16): Warning 27401: sequential logic "out" should not be mixed with combinational logic in the same always block. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 entity top_ety is end; architecture arch of top_ety is signal clk : bit; signal in1 : bit; signal in2 : bit; signal out1 : bit; signal set : bit; begin process(clk, in1, in2, set) begin
13 14 15 16 17 18 19
if (set = '1') then out1 <= '1'; elsif (clk'event and clk = '1') then out1 <= in1 and in2; --warning here end if; end process; end;
nLint reports: document.vhd(16): Warning 27401: sequential logic "out1" should not be mixed with combinational logic in the same always block. (Design Style)
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
end st2: begin y = 3; next = st3; end //st3: begin y = 4; next = st0; end st3: begin y = 4; next = 0; end //default: begin y = 1; next = st0; end default: begin y = 1; next = 0; end endcase end always @(posedge clock or posedge reset) begin if(reset) current = 0; else current = next ; end endmodule
nLint reports: document.v(32): Warning 27411: use symbolic parameter instead of "0" for FSM state encoding. (Coding Style)
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
// Logic for generating internal control signal always @ ( posedge clk or negedge rst_n ) begin if (!rst_n) control <= 1'b0; else control <= enable; end always @ (negedge rst_n or posedge clk) // sequential logic begin if (!rst_n) rw_cs <= 2'b00; else rw_cs <= rw_ns; end endmodule
nLint reports following if the argument value is (3): document.v(14): Warning 27412: the number of states of a FSM should be kept within 3. (Coding Style)
nLint reports: document.v(2): Warning 27413: multiple clock source founded ("test.clk1" line 2, "test.clk2" line 2, ...). (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 entity test is end; architecture arch of test is signal clk : bit; --clk source signal in1 : bit; signal clk1 : bit;--clk source signal out1 : bit; signal out2 : bit; signal set : bit; begin process(clk, in1, set) begin if (set = '1') then out1 <= '1'; elsif (clk'event and clk = '1') then out1 <= in1; end if; end process; process(clk1, in1, set) begin if (set = '1') then out2 <= '1'; elsif (clk1'event and clk1 = '1') then out2 <= in1; end if;
27 28
nLint reports: document.vhd(7): Warning 27413: multiple clock source founded ("test.clk1" line 7, "test.clk" line 5, ...). (Design Style)
nLint reports following if the argument value is ("D1"): document.v(10): Warning 27415: delay in flip-flop/latch data path is lost or wrong, use delay "D1" instead. (Naming Convention)
nLint reports: document.v(8): Warning 27417: glue logic should not be allowed in top module. (Design Style) document.v(10): Warning 27417: glue logic should not be allowed in top module. (Design Style)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 entity test1 is port( in1 : in bit); end; architecture arch1 of test1 is begin end; library IEEE; use IEEE.STD_LOGIC_1164.all, IEEE.NUMERIC_STD.all; use work.all; entity top_ety is port ( clock : in std_logic ); end; architecture arch of top_ety is signal a : bit; signal b : bit;
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
signal c : bit; signal d : bit; signal y : bit; signal in2 : bit; begin process (a,b) -- warning here begin c <= a and b; end process; process (clock, d) -- warning here begin if rising_edge(clock) then y <= d; end if; end process; u1 : entity test1(arch1) port map (in1=>in2); end;
nLint reports: document.vhd(25): Warning 27417: glue logic should not be allowed in top module. (Design Style) document.vhd(30): Warning 27417: glue logic should not be allowed in top module. (Design Style)
"test.y". (Clock)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 entity test is end entity test; architecture arch of test is signal clk,clk1,clk2,y,y1,y2,data,sel : bit; begin process (clk) begin if (clk'event and clk = '1') then y <= data; end if; end process; process (clk1) begin if (clk1'event and clk1 = '1') then y1 <= data; end if; end process; process (clk2) begin if (clk2'event and clk2 = '1') then y2 <= data; end if; end process; process (sel) begin if (sel = '0') then clk <= clk1; --warning here
32 33 34 35 36
else clk <= clk2; end if; end process; end architecture arch;
nLint reports: document.vhd(31): Warning 27419: multiple resolved point founded on (Clock)
"test.clk".
45
endmodule
nLint reports following if the argument value is ("CHECK_ALL"): document.v(9): Error 27421: FSM is stuck in state "ST_S3". (Design Style) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 module FSM (clk, rst_n, enable); input clk; input rst_n; input enable; parameter [2:0] ST_IN = 3'b000, ST_S1 = 3'b001, ST_S2 = 3'b010; reg [2:0] rw_cs; reg [2:0] rw_ns; reg control; always @ (rw_cs or control) begin case (rw_cs) ST_IN: rw_ns = ST_S1; ST_S1: rw_ns = ST_IN; default: rw_ns = 3'bxxx; endcase end always @ (negedge rst_n or posedge clk) begin if (!rst_n) rw_cs <= ST_IN; else rw_cs <= rw_ns; end endmodule
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
y = 2'b11; rw_ns= ST_IN; end ST_S4: begin y = 2'b10; rw_ns= ST_S5; end ST_S5: begin rw_ns = ST_IN; end default: begin y = 2'b00; rw_ns = ST_IN; end endcase end always @ (negedge rst_n or posedge clk) // sequential logic begin if (!rst_n) rw_cs <= ST_IN; else rw_cs <= rw_ns; end endmodule
nLint reports following if the argument value is ("IGNORE_DEFAULT"): document.v(46): Error 27423: FSM state "ST_S4" cannot be reached from the initial state either directly or indirectly through other states. (Coding Style) document.v(50): Error 27423: FSM state "ST_S5" cannot be reached from the initial state either directly or indirectly through other states. (Coding Style)
50 51 52 53 54
nLint reports: document.v(14): Error 27425: FSM without an initial state is detected. (Design Style)
always @(StartFSM1 or ThreeOnly or CurrStateFSM1) begin: FSM1_COMB En_A = 0; En_B = 0; En_C = 0; case (CurrStateFSM1) ST_A : NextStateFSM1 = ST_B; ST_B : NextStateFSM1 = ST_C; ST_C : NextStateFSM1 = ST_A; default : NextStateFSM1 = CurrStateFSM1; endcase end always @(posedge Clock) begin: FSM1_SEQ if (Reset) CurrStateFSM1 = ST_A; else CurrStateFSM1 = NextStateFSM1; end endmodule
nLint reports: document.v(20): Warning 27427: next state "NextStateFSM1" is not specified as a constant value in the default branch. (Design Style)
nLint reports: document.vhd(2): Warning 27505: non-integer type "bit" on generic "Width_g" is not synthesizable. (Synthesis)
--warning here
architecture arch of top_ety is begin Lbl: for I in 1 to 2 generate signal S1 : integer; --warning here begin S1 <= CI; Inst1 : and_gate port map( S1,P2(I),p3 ); end generate Lbl; end arch;
nLint reports: document.vhd(6): Warning 27507: declaration here is not synthesizable. (Synthesis) document.vhd(12): Warning 27507: declaration here is not synthesizable. (Synthesis)
nLint reports: document.vhd(4): Warning 27509: passive entity statement is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(5): Warning 27515: shared variable "Shar_v" is not synthesizable. (Synthesis)
nLint reports: document.vhd(6): Warning 27517: file object declaration "DataOut_f" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(6): Warning 27518: file operation should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.vhd(6): Warning 27519: alias "OpCode_s" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(6): Warning 27521: group "group_of_test" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(5): Warning 27522: group template "group_of_TOP" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(11): Warning 27523: "impure" specification for sub-program is not synthesizable. (Synthesis)
//warning //warning
//warning //warning
nLint reports: document.sv(2): Warning 27524: initial value ignored by synthesis process. (Synthesis) document.sv(3): Warning 27524: initial value ignored by synthesis process. (Synthesis) document.sv(7): Warning 27524: initial value ignored by synthesis process. (Synthesis) document.sv(8): Warning 27524: initial value ignored by synthesis process. (Synthesis)
"1'b1" assigned to "a" will be "1'b1" assigned to "b" will be "1'b1" assigned to "c" will be "1'b1" assigned to "d" will be
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 entity top_ety is end top_ety; architecture arch of top_ety is signal Init_s : bit := '1'; --warning here shared variable Init_sv : bit := '1'; --warning here procedure Init_p (constant Init_c : in natural := 10; signal Init_si : out bit := '1'; --warning here variable Init_vi : inout bit := '1' ) --warning here is variable Init_vv : bit := '1'; --warning here begin end Init_p; begin process variable Init_v : bit := '1'; --warning here begin wait; end process; end arch;
nLint reports: document.vhd(5): Warning 27524: initial value "1" assigned to "Init_s" will be ignored by synthesis process. (Synthesis) document.vhd(6): Warning 27524: initial value "1" assigned to "Init_sv" will be ignored by synthesis process. (Synthesis) document.vhd(9): Warning 27524: initial value "1" assigned to "Init_si" will be ignored by synthesis process. (Synthesis) document.vhd(10): Warning 27524: initial value "1" assigned to "Init_vi" will be ignored by synthesis process. (Synthesis) document.vhd(12): Warning 27524: initial value "1" assigned to "Init_vv" will be ignored by synthesis process. (Synthesis) document.vhd(17): Warning 27524: initial value "1" assigned to "Init_v" will be ignored by synthesis process. (Synthesis)
nLint reports: document.vhd(5): Warning 27525: user-defined attribute "type_a" is ignored by synthesis. (Synthesis) document.vhd(7): Warning 27525: user-defined attribute "type_a" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(9): Warning 27529: signature "MVF" is not synthesizable. (Synthesis)
nLint reports: document.vhd(2): Warning 27531: deferred constant "MaxCount_c" in package declaration is not synthesizable. (Synthesis)
nLint reports: document.vhd(10): Error 27533: range of "A" should not be null range (reverse or out of bound) because it is not synthesizable. (Synthesis) document.vhd(11): Error 27533: range of "A3_0_s" should not be null range (reverse or out of bound) because it is not synthesizable. (Synthesis) document.vhd(12): Error 27533: range of "A3_0_s" should not be null range (reverse or out of bound) because it is not synthesizable. (Synthesis)
nLint reports: document.vhd(5): Warning 27535: access type declaration "AInt_Typ" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(6): Warning 27536: object "AInt2_v" of ignored type "AInt_Typ" should not be used because it is not synthesizable. (Synthesis) document.vhd(6): Warning 27536: object "AInt1_v" of ignored type "AInt_Typ" should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.vhd(5): Warning 27537: type declaration "Rec_Typ" is incomplete and it is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(7): Warning 27539: type "Mem_Typ" is of multi-dimensional array type, which is not synthesizable. (Synthesis) document.vhd(9): Warning 27539: type "Memory_Typ" is of multi-dimensional array type, which is not synthesizable. (Synthesis)
nLint reports: document.vhd(5): Warning 27541: range "integer" of "tSpec_Typ" is not synthesizable. (Synthesis)
nLint reports: document.vhd(18): Warning 27543: user-defined resolution function "fb_resolve" should not be used in sub-type declaration because it is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(8): Warning 27545: REGISTER or BUS kind in signal (port) declaration are not synthesizable. (Synthesis) document.vhd(9): Warning 27545: REGISTER or BUS kind in signal (port) declaration are not synthesizable. (Synthesis)
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
entity AAA is port (a : in signed; b : in signed; o : buffer signed ); end AAA; architecture arch of AAA is begin p2 : process( a, b ) is begin o <= a + b; if ( o > 10 ) then global_signal <= true; --global signal assigned else global_signal <= false; --global signal assigned end if; end process; end arch;
nLint reports: document.vhd(2): Warning 27549: assigning to global signal "global_signal" is not synthesizable. (Synthesis)
nLint reports: document.vhd(2): Warning 27550: global signal "gControl_s" should be initialized when it is delcared. (Simulation,Synthesis)
nLint reports: document.vhd(2): Warning 27551: linkage mode on "a" is not synthesizable. (Synthesis)
27553 (VHDL) Type Conversion in Formal Part of Association List Not Synthesizable
Message (VHDL) <filename>(<line no.>): <severity> <rule no.>: type conversion "%s" in formal part of association list is not synthesizable. Configurable Parameter Rule group: Synthesis; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (VHDL) This rule checks whether there is any type conversion in formal part of association list which is not synthesizable. Example
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 package pkg is type A_Typ is range 0 to 10; type B_Typ is range 0 to 10; function GetWidth (NUM: in A_Typ) return integer; procedure Asso_p ( variable Init_v : in A_Typ ); end pkg; package body pkg is function GetWidth (NUM: in A_Typ) return integer is begin return (32); end GetWidth; procedure Asso_p ( Init_v : in A_Typ ) is begin end Asso_p; end pkg; use work.pkg.all; entity Latch is generic(Width : integer); port( A : in A_Typ; B : out B_Typ); end entity; architecture arch of Latch is begin end arch; library ieee; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; use work.pkg.all; entity top_ety is end top_ety; architecture arch of top_ety is component Latch is generic(Width : integer); port( A : in A_Typ; B : out B_Typ); end component Latch; signal A : A_Typ := 3; signal B : B_Typ := 7; signal C : unsigned(3 downto 0) := "1001";
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
begin U1: Latch generic map( Width => GetWidth(A) ) --warning here port map( A => A_Typ(B), --warning here A_Typ(B) => A); --warning here process variable VA : A_Typ := 3; variable VB : B_Typ := 7; variable VC : unsigned(3 downto 0) := "1001"; begin --Asso_p( Init_v => unsigned2Int( "1001" ) ); --warning here --Asso_p( Init_v => CONV_INTEGER(VC) ); --warning here Asso_p( Init_v => A_Typ(VB) ); --warning here end process; end arch;
nLint reports: document.vhd(51): Warning 27553: type conversion "A_Typ(B)" in formal part of association list is not synthesizable. (Synthesis)
--warning here
nLint reports: document.vhd(11): Warning 27559: xnor operator is not synthesizable. (Synthesis)
nLint reports: document.vhd(10): Warning 27561: shift operator "(ShiftVector_v sll 3)" is not synthesizable. (Synthesis)
here
nLint reports: document.vhd(14): Warning 27563: operand "Num1_v" in operation "(num1_v / 2)" is not synthesizable. (Synthesis) document.vhd(15): Warning 27563: operand "3" in operation "(5 / 3)" is not synthesizable. (Synthesis) document.vhd(17): Warning 27563: operand "Num1_v" in operation "(num1_v mod num2_c)" is not synthesizable. (Synthesis) document.vhd(20): Warning 27563: operand "num1_c" in operation "(num1_c ** num2_c)" is not synthesizable. (Synthesis)
nLint reports: document.vhd(16): Warning 27565: null for expression here is not synthesizable. (Synthesis)
nLint reports: document.vhd(10): Warning 27567: allocator or deallocator operation "new " is not synthesizable. (Synthesis) document.vhd(11): Warning 27567: allocator or deallocator operation "new " is not synthesizable. (Synthesis) document.vhd(13): Warning 27567: allocator or deallocator operation "deallocate" is not synthesizable. (Synthesis)
--warning here
nLint reports: document.vhd(11): Warning 27571: keyword "on" in wait statement is not synthesizable. (Synthesis)
nLint reports: document.vhd(13): Warning 27573: timeout clause in wait statement is ignored by synthesis. (Simulation,Synthesis)
nLint reports: document.vhd(9): Warning 27575: assertion statement is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(14): Warning 27577: report statement is not synthesizable. (Synthesis)
nLint reports: document.vhd(10): Warning 27581: transport delay in signal assignment is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(9): Warning 27585: multiple waveform elements are not synthesizable. (Synthesis)
nLint reports: document.vhd(7): Warning 27587: unaffected clause is not synthesizable. (Synthesis)
nLint reports: document.vhd(7): Warning 27589: after clause is ignored by synthesis. (Synthesis)
is is is is is
nLint reports: document.vhd(9): Warning 27597: guarded expression "(Clock = '1')" in block statement is not synthesizable. (Synthesis)
nLint reports: document.vhd(9): Warning 27598: explicit guarded signal "GUARD" in block statement is not synthesizable. (Synthesis)
nLint reports: document.vhd(11): Warning 27599: guarded signal assignment is not synthesizable. (Synthesis)
nLint reports: document.vhd(11): Warning 27601: block header is not synthesizable. (Synthesis)
architecture arch of top_ety is component com_Reg is port( Clk : in bit; Data : in bit; D : out bit); end component com_Reg; begin U1: component com_Reg port map( Clk, Data, D); U2: entity Reg(Reg_RTL) port map( Clk, Data, D); --warning on "entity"
46 47 48 49
U3: configuration Reg_Conf port map( Clk, Data, D); end arch;
--warning on "configuration"
nLint reports: document.vhd(43): Warning 27605: binding specification "entity" in component instantiation statement is not synthesizable. (Synthesis) document.vhd(46): Warning 27605: binding specification "configuration" in component instantiation statement is not synthesizable. (Synthesis)
nLint reports: document.vhd(15): Warning 27609: pre-defined attribute "last_value" for "clk" or expression in attribute is not synthesizable. (Synthesis)
nLint reports: document.vhd(21): Warning 27610: expression "2" in attribute "high" should not be
used because it is not synthesizable. (Synthesis) document.vhd(22): Warning 27610: expression "3" in attribute "low" should not be used because it is not synthesizable. (Synthesis) document.vhd(23): Warning 27610: expression "2" in attribute "left" should not be used because it is not synthesizable. (Synthesis) document.vhd(24): Warning 27610: expression "3" in attribute "right" should not be used because it is not synthesizable. (Synthesis)
--warning on "TEXTIO"
nLint reports: document.vhd(2): Warning 27613: package "std.textio" is not synthesizable. (Synthesis)
nLint reports: document.vhd(17): Warning 27615: wait statement is not synthesizable in subprogram. (Synthesis)
nLint reports: document.vhd(2): Warning 27617: use clause should not reference only a portion of a package. Instead, it should reference the entire package. (Synthesis)
nLint reports: document.vhd(5): Warning 27619: physical type declaration "distance" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(5): Warning 27621: floating type declaration "small_float" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(10): Warning 27623: file type enumeration "file_open_status" is not synthesizable. (Synthesis)
nLint reports: document.vhd(6): Warning 27625: severity level enumeration "severity_level" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(5): Warning 27627: file type declaration "IntFile_Typ" is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(15): Warning 27629: file be used because the file in interface document.vhd(24): Warning 27629: file used because the file in interface is
"DataOut_f" in port association should not is not synthesizable. (Synthesis) "Out_f" in port association should not be not synthesizable. (Synthesis)
component Reg_com is --warning on "is" port( Clk : in bit; Data : in bit; D : out bit); end component Reg_com; --warning on "component" function ABC_F( A: bit; B: bit ) return bit is begin Ret_Lbl: return B; --warning on "Ret_Lbl" end function ABC_F; --warning on "function"
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98
procedure Bit2Int(A: in bit; B: out integer) is begin if A = '1' then B := 1; else B := 0; end if; end procedure Bit2Int; --warning on "procedure" begin Blk_Lbl: block is --warning on "Blk_Lbl" begin end block Blk_Lbl; process( Clock ) is --warning here begin end process; Pro_Lbl: Process(Clock) variable ABC_v : bit; variable B : integer; begin If_Lbl: if Clock'event and Clock = '1' then --warning on "If_Lbl" SAssign_Lbl: ABC_s <= '1'; --warning on "SAssign_Lbl" VAssign_Lbl: ABC_v := '1'; --warning on "VAssign_Lbl" else Null_Lbl: null; --warning on "Null_Lbl" end if; -- end if If_Lbl; Ass_Lbl: assert Rst = '1' --warning on "Ass_Lbl" report "Async reset detected" severity warning; Rep_Lbl: report "Hold time checked error" --warning on "Rep_Lbl" severity warning; Proc_Lbl: Bit2Int(ABC_s, B); --warning on "Proc_Lbl" Case_Lbl: case CS is when "00" => null; when "01" => null; when "10" => null; when "11" => null; end case Case_Lbl; --warning on "Case_Lbl"
Loop_Lbl: for index_v in 0 to 5 loop Next_Lbl: next Loop_Lbl when index_v = 3; --warning on "Next_Lbl"(only Next_Lbl is unsupport) Exit_Lbl: exit Loop_Lbl when index_v = 4; --warning on "Exit_Lbl"(only Exit_Lbl is unsupport) SI <= SI + index_v; end loop Loop_Lbl; end process Pro_Lbl; Conc_Proc_Lbl: Bit2Int( ABC_s, SV ); --warning on "Conc_Proc_Lbl"
Cond_Assign_Lbl: ABC_s2 <= Data when Clock = '1' else --warning here on "Cond_Assign_Lbl" not Data when Clock = '0'; Sele_Assign_Lbl: with CS select --warning here on "Sele_Assign_Lbl" SI <= 0 when "00", 1 when "01", 2 when "10", 3 when "11"; Lbl: for I in 1 to 2 generate signal S2 : integer; begin --warning on "begin" S2 <= SI; end generate Lbl; U1: Reg_com port map( Clock, Data, D); U2: component Reg_com --warning on "component"
98 98 98
nLint reports: document.vhd(5): Warning 27631: "entity" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(15): Warning 27631: "architecture" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(38): Warning 27631: "is" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(42): Warning 27631: "Reg_com" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(46): Warning 27631: "Ret_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(47): Warning 27631: "function" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(56): Warning 27631: "procedure" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(59): Warning 27631: "is" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(63): Warning 27631: "is" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(71): Warning 27631: "If_Lbl" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(72): Warning 27631: "SAssign_Lbl" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(73): Warning 27631: "VAssign_Lbl" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(75): Warning 27631: "Null_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(78): Warning 27631: "Ass_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(80): Warning 27631: "Rep_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(83): Warning 27631: "Proc_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(85): Warning 27631: "Case_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(93): Warning 27631: "Next_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(95): Warning 27631: "Exit_Lbl" should not be used because it is VHDL93 only and is not synthesizable. (Synthesis) document.vhd(102): Warning 27631: "Conc_Proc_Lbl" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(104): Warning 27631: "Cond_Assign_Lbl" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(108): Warning 27631: "Sele_Assign_Lbl" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(116): Warning 27631: "begin" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis) document.vhd(123): Warning 27631: "component" should not be used because it is VHDL-93 only and is not synthesizable. (Synthesis)
nLint reports: document.vhd(38): Warning 27633: configuration specification is ignored by synthesis. (Synthesis)
nLint reports: document.vhd(8): Warning 27635: using an index name "0" of an unconstrained out parameter "Data_s" in a procedure shall not be supported. (Synthesis)
nLint reports: document.vhd(11): Warning 27639: explicit inertial delay in signal assignment should not used because it is not synthesizable. (Synthesis) document.vhd(12): Warning 27639: explicit inertial delay in signal assignment should not used because it is not synthesizable. (Synthesis)
nLint reports: document.vhd(15): Warning 27641: meta-logic value ""X0"" in case choice should not be used because it is interpreted as never-occur by synthesis. (Synthesis) document.vhd(17): Warning 27641: meta-logic value ""0Z"" in case choice should not be used because it is interpreted as never-occur by synthesis. (Synthesis)
nLint reports: document.vhd(15): Warning 27643: edge specification in concurrent signal assignment not synthesizable. (Synthesis)
27645 (VHDL) Same Signal Assigned and Referenced in Waveforms Not Synthesizable
Message (VHDL) <filename>(<line no.>): <severity> <rule no.>: same signal "%s" assigned and referenced in waveforms should not be used in concurrent assignment because it is not synthesizable. Configurable Parameter Rule group: Synthesis; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (VHDL) This rule checks whether there is any same signal assigned and referenced in waveforms of concurrent signal assignment at the same time, which is not synthesizable. Example
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 library IEEE; use IEEE.STD_LOGIC_1164.all; entity top_ety is end top_ety; architecture arch of top_ety is subtype my_vec is std_ulogic_vector(1 downto 0); signal c_s : my_vec; signal n_s : my_vec; signal rst : bit; begin n_s <= "00" when rst = '1' else not n_s when rst = '0' else --warning here "XX"; end arch;
nLint reports: document.vhd(14): Warning 27645: same signal "n_s" assigned and referenced in waveforms should not be used in concurrent assignment because it is not synthesizable. (Synthesis)
44 45
nLint reports: document.vhd(41): Warning 27649: generate scheme "(n = 1)" can not be statically evaluated which is not synthesizable. (Synthesis)
nLint reports: document.vhd(5): Warning 27651: extended identifier "123 _$% should not be used because it is not synthesizable. (Synthesis) document.vhd(8): Warning 27651: extended identifier "7(*&) should not be used because it is not synthesizable. (Synthesis) document.vhd(10): Warning 27651: extended identifier "7(*&) should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.vhd(14): Warning 27653: clock signal "clk" should be of BIT or STD_ULOGIC data type. Otherwise it is not synthesizable. (Synthesis)
nLint reports: document.vhd(15): Warning 27655: the else branch following an edge condition branch should not be used because it is not synthesizable. (Synthesis)
nLint reports: document.vhd(14): Warning 27657: statements outside of an edge-sensitive ifstatement not synthesizable. (Synthesis)
nLint reports: document.v(9): Warning 27661: signal "b" is being read asynchronously. It may cause simulation-synthesis mismatch. (Simulation,Synthesis)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 entity top_ety is end; architecture arch of top_ety is signal clk : bit; signal chk : bit; signal rst : bit; signal a : bit; signal b : bit; begin process( clk, chk, rst ) begin if ( rst = '0' ) then a <= '0'; elsif ( chk = '0' ) then a <= b; --warning here elsif ( clk'event and clk = '1' ) then a <= a; end if; end process; end;
nLint reports: document.vhd(16): Warning 27661: signal "b" is being read asynchronously. It may cause simulation-synthesis mismatch. (Simulation,Synthesis)
nLint reports: document.v(11): Warning 27662: signal "q" has already been set or reset at line 9. (Simulation,Synthesis)
nLint reports: document.vhd(2): Warning 27663: unconstrained port "a" declaration shall not be supported. (Synthesis) document.vhd(3): Warning 27663: unconstrained port "q2" declaration shall not be supported. (Synthesis)
nLint reports following if the argument value is ("16"): document.v(13): Warning 27664: do not infer large multiplier by the operand "IN1" whose bit-width is larger than 16. (Synthesis)
endmodule
27668 (Verilog) Arithmetic/Relational Operations Sharing with Large Operand Not Allowed
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: either arithmetic or relational operation "%s" whose operand is larger than %d bits is the same as expression in line %d. Configurable Parameter Rule group: Synthesis; Argument type: integer; Argument description: specify the maximum bit width number ; Default value: "8" for Verilog; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rules check whether either the arithmetic operator (+, -, *) or relational operator (<, >, =) are shared with a large bit-width operand. A violation will be reported if the operator is shared and if the bit-width of the operand exceeds the specified argument. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 module smp(IN1, IN2, OUT1, OUT2); input [16:0] IN1; input [16:0] IN2; output [16:0] OUT1; output [16:0] OUT2; reg [16:0] OUT1; reg [16:0] OUT2; always @(IN1 or IN2) if(IN1 < IN2) OUT1 = IN1 * 2; else OUT1 = IN1 / 2; always @(IN1 or IN2) if(IN2 > IN1) OUT2 = IN2 * 4; else OUT2 = IN2 / 4; endmodule
nLint reports: document.v(8): Warning 27669: timing path from "top.i1.s2.sub:Always2#Always0:8:9:Reg" to "top.i1.s3.sub:Always2#Always0:8:9:Reg" should be kept in two sub-blocks in basic block "basic". (Synthesis) document.v(8): Warning 27669: timing path from "top.i1.s1.sub:Always2#Always0:8:9:Reg" to "top.i1.s2.sub:Always2#Always0:8:9:Reg" should be kept in two sub-blocks in basic block "basic". (Synthesis)
reg FOUT; parameter D1 = 1; always@(negedge RES1 or negedge RES2 or posedge CK) if(~RES1 || ~RES2) FOUT <= #D1 1'b0; else FOUT <= #D1 FIN; endmodule
module MB1 (mout1, min1, mclk); output mout1; input min1, mclk; wire mtmp1, mtmp2, mtmp3, mtmp4; M1 M2 M2 M1 X11 X12 X14 X13 (.out1(mtmp1), (.out1(mtmp2), (.out1(mtmp3), (.out1(mtmp4), .in1(min1), .clk(mclk)); .in1(mtmp1), .in2(mtmp1)); .in1(mtmp2), .in2(mtmp2)); .in1(mtmp3), .clk(mclk));
module MB2 (mout1, min1, mclk); output mout1; input min1, mclk; wire mtmp1, mtmp2; M1 X21 (.out1(mtmp1), .in1(min1), .clk(mclk)); M1 X22 (.out1(mtmp2), .in1(mtmp1), .clk(mclk)); assign mout1 = ~mtmp2; endmodule
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
module M1 (out1, in1, clk); output out1; input in1, clk; wire int1; reg int2; assign int1 = ~in1; always @ (posedge clk) begin int2 <= int1; end assign out1 = ~int2; endmodule
module M2 (out1, in1, in2); output out1; input in1, in2; assign out1 = in1 & in2; endmodule
nLint reports following if the argument value is ("3"): document.v(56): Error 27671: the number of sub-blocks in the critical path from "smp.X1.X11.M1:Always2#Always0:56:59:Reg" to "smp.X1.X13.M1:Always2#Always0:56:59:Reg" is 4 (should not exceed 3) in basic block "MB1". (Synthesis)
nLint reports following if the argument value is ("32"): document.v(6): Warning 27672: the bit width of reduction operand "a" is larger than 32. (Simulation)
nLint reports following if the argument value is ("IGNORE_TEMPVAR"): document_1.v(7): Warning 27673: signal "tmp" is written and read in the same always block. (Simulation) ///////////////example : document_2.v//////////// 1 2 3 4 5 6 7 8 rule 9 10 11 12 13 14 module test( AIN, BIN, CIN, QOUT ); input AIN, BIN, CIN; output QOUT; reg QOUT; reg tmp; always @( AIN or BIN or CIN) begin tmp = AIN & BIN; //If choose IGNORE_TEMPVAR, tmp will not violate this if ( tmp == CIN ) QOUT <= 1'b0; else QOUT <= 1'b1; end endmodule
) ) ) ) ) )
endmodule
always_ff @ (posedge clk) begin if ( foo1 == 1'b1 ) sig1 <= 1'b0; foo1 <= 1'b0; end //OK: 27676 need not check sequential always blocks
always_comb begin sig2 = foo2; foo2 = 0; //Warning: "foo2" is referenced before being assigned end endmodule
nLint reports: document.sv(21): Warning 27676: signal "foo2" is read before being written in the same always block. (Simulation,Synthesis)
nLint reports: document.sv(2): Warning 27801: 'iff' construct is not synthesizable. (Synthesis)
nLint reports: document.sv(4): Warning 27803: statement labels are not synthesizable. (Synthesis)
nLint reports: document.sv(8): Warning 27805: task is used in 'always_comb' block. (Simulation,Synthesis)
nLint reports following if the argument value is ("IGNORE_NOT_FULL_RET"): document.sv(6): Warning 27807: non-void function is not declared as automatic. (Coding Style)
//warning here
//warning here
enum { a, b, c} enumRoot; //warning here typedef enum {R, Y, G} Light; Light light1; //warning here assign v5 = v4; //warning here
module test (input logic in, output logic out); logic aa; always_comb out = in; endmodule test mytestinst (v4, v5); and myGateInst(v3, v1, v2); //warning here //warning here
interface Intf; logic d1; logic d2; modport P1 (input d1, output d2); modport P2 (input d2, output d1); endinterface Intf myInterface(); //warning here
nLint reports: document.sv(1): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(1): Warning 27813: Constructs in $root are not synthesizable. (Synthesis)
document.sv(1): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(1): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(1): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(2): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(3): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(7): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(9): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(13): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(18): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(20): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(22): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(24): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(31): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(33): Warning 27813: Constructs in $root are not synthesizable. (Synthesis) document.sv(42): Warning 27813: Constructs in $root are not synthesizable. (Synthesis)
27815 (Verilog) Incremented/Decremented Variables Used More than Once in the Same Expression
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: incremented/decremented variable "%s" is operatedused more than once in the same expression. Configurable Parameter Rule group: Coding Style; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether the same variable using increment (++) or decrement (--) operators appears more than once in the same expression. Example
(Verilog) ///////////////example : document.sv//////////// 1 2 3 4 5 6 7 8 9 10 module test; int foo; int number; initial begin foo = 0; number = foo + foo ++ ; //warning here end endmodule
nLint reports: document.sv(7): Warning 27815: incremented/decremented variable "foo" is operatedused more than once in the same expression. (Coding Style)
nLint reports: document.sv(11): Warning 27817: 'always_ff' is not used to model sequential blocks. (Coding Style)
nLint reports: document.sv(8): Warning 27819: use always_comb to model combinational behavior. (Coding Style)
nLint reports: document.sv(9): Warning 27821: variable "tmp.b" is not completely assigned in always_comb block. (Simulation,Synthesis)
//warning here
nLint reports: document.sv(8): Warning 27823: event construct @ is found in always_comb procedure. (Synthesis)
nLint reports: document.sv(10): Warning 27825: common sub-expression is detected within for/generate loop statement. (Synthesis) document.sv(16): Warning 27825: common sub-expression is detected within for/generate loop statement. (Synthesis)
nLint reports following document.sv(3): Warning (Design Style) document.sv(4): Warning (Design Style) document.sv(5): Warning (Design Style)
if the argument value is ("ALL"): 27827: assignment is used in declaration of variable "b". 27827: assignment is used in declaration of variable "c". 27827: assignment is used in declaration of variable "d".
//no warning, b is only used within this block //warning, non-ff logic inferred
always_comb begin logic b; if (clk) //warning, non-comb logic inferred c = ~a; if (clk) //no warning, b is only used within this block b= a; f2 = e & c; //no warning, comb logic inferred end endmodule
document.sv(8): Warning 27829: non-latch logic inferred on signal "f1" in always_latch block. (Synthesis) document.sv(17): Warning 27829: non-ff logic inferred on signal "q2" in always_ff block. (Synthesis) document.sv(23): Warning 27829: non-comb logic inferred on signal "c" in always_comb block. (Synthesis)
nLint reports: document.v(16): Warning 28009: the input of register "q" comes from more than one clock source. (Clock)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk1, clk2, clk3, d1, d2 : in std_logic; q : out std_logic); end top_ety; architecture arch of top_ety is signal temp : std_logic; signal q1, q2 : std_logic; begin Process(clk1) begin if (clk1'event and clk1 = '1' ) then q1 <= d1; end if; end Process;
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Process(clk2) begin if (clk2'event and clk2 = '1' ) then q2 <= d2; end if; end Process; temp <= q1 and q2; Process(clk3) begin if (clk3'event and clk3 = '0' ) then q <= temp; end if; end Process; end arch;
nLint reports: document.vhd(32): Warning 28009: the input of register "q" comes from more than one clock source. (Clock)
28011 Inputs of a Tri-state Bus Not Generated from a Single Clock Source
Message <filename>(<line no.>): <severity> <rule no.>: the inputs of the tri-state bus "%s" are not generated from a single clock source. Configurable Parameter Rule group: Clock; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description This rule checks whether all the inputs of a tri-state bus are generated from a single clock source. This rule will be checked only if a clock source tree is extracted. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module test (clk1, clk2, en1, en2, d1, d2, q); input clk1, clk2, en1, en2, d1, d2; output q; wire clk1, clk2, d1, d2, q, en1, en2; reg q1, q2; always @(posedge q1 = d1; always @(posedge q2 = d2; assign q = en1 ? assign q = en2 ? endmodule clk1) clk2) q1 : 'bZ; q2 : 'bZ;
nLint reports: document.v(4): Warning 28011: the inputs of the tri-state bus "q" are not generated from a single clock source. (Clock)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk1, clk2, en1, en2, d1, d2 : in std_logic; q : out std_logic); end top_ety; architecture arch of top_ety is signal q1, q2 : std_logic; begin Process (clk1) begin if (clk1'event and clk1 = '1') then q1 <= d1; end if; end Process; Process (clk2) begin if (clk2'event and clk2 = '1') then q2 <= d2;
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
end if; end Process; Process begin wait; if (en1 = '1') then q <= q1; else q <= 'Z'; end if; end Process; Process begin wait; if (en2 = '1') then q <= q2; else q <= 'Z'; end if; end Process; end arch;
nLint reports: document.vhd(6): Warning 28011: the inputs of the tri-state bus "q" are not generated from a single clock source. (Clock)
nLint reports: document.v(10): Warning 28015: tri-state buffer "test:Always0#SigOp0:10:10:TriState" exists in a clock path from "test.clk" to "test.clk1". (Clock)
(VHDL) -------------------example : document.vhd------------1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 library ieee; use ieee.std_logic_1164.all; entity top_ety is port (clk, en, d : in std_logic; q : out std_logic); end top_ety; architecture arch of top_ety is signal clk1 : std_logic; begin Process (clk1) begin if (clk1'event and clk1 = '1' ) then q <= d; end if; end Process; Process (clk) begin if (en = '1') then clk1 <= clk;
23 24 25 26 27 28 29 30
else clk1 <= 'Z'; end if; end Process; end arch; --specify comamnd line option : -ex_clk -clk_source "top_ety.clk" --to set "top_ety.clk" as clock source
nLint reports: document.vhd(19): Warning 28015: tri-state buffer "top_ety(arch):Process1#line__19:19:26:TriState" exists in a clock path from "top_ety.clk" to "top_ety.clk1". (Clock)
nLint reports: document.v(9): Warning 28101: set ("set") and reset ("reset" (11)) are specified for the same flip-flop/latch. (Synthesis) document.v(19): Warning 28101: set ("set") and reset ("reset" (21)) are specified for the same flip-flop/latch. (Synthesis) document.v(31): Warning 28101: set ("set") and reset ("reset" (29)) are specified for the same flip-flop/latch. (Synthesis)
nLint reports: document.v(9): Warning 29001: user defined primitive should be named in lower case (Naming Convention)
endmodule
nLint reports: document.v(14): Warning 29002: instance name "testadder" must be related to module name and indexed by an integer if multiple instantiated (Naming Convention) document.v(15): Warning 29002: instance name "adderx_last" must be related to module name and indexed by an integer if multiple instantiated (Naming Convention)
nLint reports: document.v(22): (Coding Style) document.v(25): (Coding Style) document.v(28): (Coding Style) document.v(30): (Coding Style)
Warning 29003: bus direction of "A" is not consistent with "a" Warning 29003: bus direction of "C2" is not consistent with "c" Warning 29003: bus direction of "A" is not consistent with "a" Warning 29003: bus direction of "C3" is not consistent with "c"
document.v(33): Warning 29003: bus direction of "A" is not consistent with "a0" (Coding Style) document.v(36): Warning 29003: bus direction of "C2" is not consistent with "c" (Coding Style) ///////////////example : document_limit1.v//////////// 1 // will report violation on impending(floating) bus , though it is not expected. 2 // ( by the way:the floating bus can be introduced by a concat port or concat portinst) 3 4 module test(a); 5 input[0:7] a; 6 endmodule 7 8 module top (); 9 wire [0:3] B; 10 wire [0:3] C; 11 wire [3:0] D; 12 test i_test({D,B,C});//D will improperly reported. 13 //the conections are: 14 //B[0:3]<==>a[0:3] C[0:3]<==>a[4:7], D is floating. 15 16 endmodule
nLint reports: document_limit1.v(12): Warning 29003: bus direction of "D" is not consistent with "a" (Coding Style) ///////////////example : document_limit2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 //do not lint special cases in which both portinst and port are concated. //e.g. module test(.a({in1,in2})); input [0:3] in1; input [3:0] in2; endmodule module top (); wire [0:3] B; wire [3:0] C; test i_test({C,B});//will not check the portinst, //since both port and portinst are concated, //though C[3:0]<==>in1[0:3], B[0:3]<==>in2[3:0] //which break the the rule. endmodule
nLint reports: ///////////////example : document_notreport.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 //module decl: module m1(a,b,c); input [0:7] a; input [7:0] b; output [7:0] c; endmodule module m2(a,b,c); input a; input [7:0] b; output [5:5]c; endmodule //module instantiation: module top(); wire [7:0] A; wire [7:0] B; wire [3:0] C1; wire [0:3] C2; m1 u1_m1(.a(A[0]),//not report on single bit selection belong to portinst .b(B), .c({C1,C2[1]}));//not report on single bit selection in a concat belong
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
//to portinst. m1 u2_m1(.a(A[0]),//not report on single bits selection belong to portinst .b(B), .c({C1,{C2[0],C2[1],C2[2],C2[3]}}));//not report on single bits selection //in a simple concat/complex concat. //though it can be merged into C2[0:3] m2 u_m2(.a(A),//not report on a single bit port. .b(B), .c({C1,C2}));//not report on a single bit port.
m1 u3_m1(.a(A&B), //not report when introduce a rtl inst. (A&B). .b(B), .c({C1,~C2})); //not report when introduce a rtl inst (~C2). endmodule
nLint reports:
nLint reports following if the argument value is ( ".*GTECH.*"): document.v(7): Warning 29004: module "mGTECH1" (of instance "inst_1") is named in the predefined pattern ".*GTECH.*" (Naming Convention)
nLint reports following if the argument value is ( 3): document.v(16): Warning 29005: the nested level of if statement (4 levels) detected exceeding 3 levels (Coding Style)
nLint reports following if the argument value is ( 2): document.v(12): Warning 29006: the nested level of case statement (3 levels) detected exceeding 2 levels (Coding Style)
nLint reports: document.v(13): Warning 29100: IO declaration "HSEL_4" is not in order with its port declaration. (Coding Style) document.v(14): Warning 29100: IO declaration "HSEL_3" is not in order with its port declaration. (Coding Style)
29101 (Verilog) Declaration of All Internal Nets should Follow the Port I/O Declaration at the Top of the Module
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: : the declaration of all internal nets should follow the port I/O declaration at the top of the module. Configurable Parameter Rule group: IPQ Design Guidelines.Coding Style; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (Verilog) Report warning when net declaration occurs at two or more sections in a module, function, task, or when there are other statement between net declaration and IO declaration. Here, net declaration does not includes the net declaration in always block. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 module test(i, o); wire w; //warning: not following the port declaration reg r; input i; //port declaration output o; endmodule module test1(i, o); input i; output o; reg r; parameter p = 8; wire w; //warning: not in one section. endmodule
nLint reports: document.v(2): Information 29101: the declaration of all internal nets should follow the port I/O declaration at the top of the module (Coding Style) document.v(13): Information 29101: the declaration of all internal nets should follow the port I/O declaration at the top of the module (Coding Style) document.v(13): Information 29101: internal signal "w" should be declared in one section (Coding Style)
42 43
endtask endmodule
nLint reports following if the argument value is ("always,assign,function,task"): document.v(6): Information 29102: no comment is found before always (Comments) document.v(14): Information 29102: no comment is found before assign (Comments) document.v(19): Information 29102: no comment is found before function (Comments) document.v(38): Information 29102: no comment is found before task (Comments)
nLint reports: document.v(2): Information 29103: don't use multi-line comment from line "2" to "4" (Comments) document.v(5): Information 29103: don't use multi-line comment from line "5" to "5" (Comments)
nLint reports: document.v(6): Warning 29104: no comment is found before the cell instantiation (Comments) document.v(21): Warning 29104: no comment is found before the cell instantiation (Comments)
nLint reports: document.v(9): Information 29105: no comment on this synthesis directive (Comments)
endmodule
nLint reports: document.v(1): Information 29107: no comment behind the `include (Comments) document.v(4): Information 29107: no comment behind the `define (Comments) document.v(9): Information 29107: no comment behind the `endif (Comments) ///////////////example : lib.v//////////// 1 2 module lib; endmodule
//report warning
//report warning
nLint reports following if the argument value is ("always,assign,initial,specify,function,task"): document.v(6): Warning 29108: specific keyword "assign" is not allowed in design (Design Style) document.v(10): Warning 29108: specific keyword "function" is not allowed in design (Design Style)
document.v(16): Warning 29108: specific keyword "initial" is not allowed in design (Design Style)
be be be be be
of of of of of
29110 (Verilog) Signals Names of an Identical Signal should Remain the Same throughout the Design Hierarchy.
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: : Port instance name "%s" is different to port name "%s". Configurable Parameter Rule group: IPQ, Design, Guidelines., Design Style; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (Verilog) Report warning if the name of port instance is different to the name of the port it connected to. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 module block1( rst_n, clk, addr, wr_data ); input rst_n; // Top module reset signal input clk; // Top module clock signal input [15:0] addr; // Top module address bus output [31:0] wr_data; // Top module write data bus endmodule module block2( reset_n, sysclk, address, WR_data ); input reset_n; // Top module reset signal input sysclk; // Top module clock signal input [15:0] address; // Top module address bus output [31:0] WR_data; // Top module write data bus endmodule module top( rst_n, clk, addr, wr_data ); input rst_n; // Top module reset signal input clk; // Top module clock signal input [15:0] addr; // Top module address bus output [31:0] wr_data; // Top module write data bus block1 u_blockOk ( .clk (clk), .addr (addr), .wr_data(wr_data) ); .rst_n (rst_n),
(rst_n),
43 44 45 46 47 48 49 50 51 52 53
.address .WR_data );
(addr), (wr_data)
nLint reports: document.v(41): Warning 29110: port name "reset_n" (Naming Convention) document.v(42): Warning 29110: port "sysclk" (Naming Convention) document.v(43): Warning 29110: port "address" (Naming Convention) document.v(44): Warning 29110: port name "WR_data" (Naming Convention) document.v(47): Warning 29110: port name "reset_n" (Naming Convention) document.v(48): Warning 29110: port "sysclk" (Naming Convention) document.v(49): Warning 29110: port "address" (Naming Convention) document.v(50): Warning 29110: port name "WR_data" (Naming Convention)
instance name "rst_n" is different to port instance name "clk" is different to port name instance name "addr" is different to port name instance name "wr_data" is different to port instance name "rst_n" is different to port instance name "clk" is different to port name instance name "addr" is different to port name instance name "wr_data" is different to port
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
//------------------------------------------------------------------// PARAMETERS: none //------------------------------------------------------------------// OTHERS: leave blank if N/A //-CHDR-------------------------------------------------------------task Mux; input A; input B; input SEL; output Y0; begin assign Y0 = SEL ? A : B; end endtask endmodule
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
begin if (reset) q = 0; else q = d; end endmodule module test5(clk, reset, set, d, q); input clk, reset, set, d; output q; reg q; always @ (posedge clk or posedge reset) begin if (reset&set) //not a simple condition q = 0; else q = d; end endmodule
nLint reports following if the argument value is ("BitNegOp, EqOp, NotEqOp"): document.v(7): Warning 29112: don't use complex expression in the condition expression for asynchronous set or reset (Synthesis) document.v(21): Warning 29112: don't use complex expression in the condition expression for asynchronous set or reset (Synthesis) document.v(51): Warning 29112: don't use complex expression in the condition expression for asynchronous set or reset (Synthesis)
29113 (Verilog) If Statement Describing Asynchronous Set/Reset should be the Most Beginning Statement in a Always Block
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: %f(%l): if statement describing asynchronous set/reset should be put before any other logic statement in always block. Configurable Parameter Rule group: Synthesis; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (Verilog) Report warning if a if-statement describing asynchronous set or reset is not in the beginning of always block. For an "if" statement describing asynchronous set or reset, the ifcondition should a simple expression like 'if (res)' 'if(~res)' 'if (res == 0)' and 'if(res != 0)'). And the if-statement should be put in the beginning of the always block. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 module test(d1, clk, R, d, q, d2); input d1, clk, R, d; output q, d2; reg q, d2; always @( posedge clk or posedge R) begin d2 = d1; if (R) //not the first statement q = 0; else q = d; end endmodule
nLint reports: document.v(8): Warning 29113: if statement describing asynchronous set/reset should be put before any other logic statement in always block (Synthesis)
29114 (Verilog) A Signal is Connected to Both Input and Output Ports of an Instance
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: : Signal %s should not connect both input and output port of the instance. Configurable Parameter Rule group: Design Style; Argument type: none; Default severity : Level2 (Warning) Can be suppressed by Synopsys compiler directive "synopsys translate_off"; This rule is turned OFF by default; Description (Verilog) For a module instance, compare each output signal in its high-connection expression with each input signal. If there is a signal connected to both input and output port of the instance, report warning Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 module test1( a, b, c ); input a, b; output c; assign c = a & b; endmodule module test2( .A(a), .B(b), .C(c) ); input a, b; output c; test1 u1( c, b, c ); //here signal connected to output "c" goes into //input "a" of test1 again. //or something like following test1 u2( c&a, b, c);
endmodule
nLint reports: document.v(13): Warning 29114: Signal "c" should not connect both input and output port of the instance (Design Style) document.v(17): Warning 29114: Signal "c" should not connect both input and output port of the instance (Design Style)
nLint reports: document.v(6): Warning 29115: clock should not be explicitly read in the always block (Synthesis)
nLint reports: document.v(13): Warning 29116: The signal "flag1" is assigned by independent statements in a sequential block. (Synthesis)
module test ; integer k; reg [31:0] a; wire [31:0] b; ABC u( .P(k), //not allowed .P1( 1 ), //allowed .P2( k & a ), //not allowed .P3( a[3:0] ), //allowed .P4( b[k] ) //not to check this ); endmodule
nLint reports: document.v(15): Warning 29118: integer variable "k" is used at port expression (Synthesis) document.v(17): Warning 29118: integer variable "k" is used at port expression (Synthesis)
//synopsys translate_on //synopsys translate_off macromodule up_counter( clk, reset, count, carry ); parameter WIDTH = 4; input clk, reset; output [WIDTH-1:0] count; output carry; reg [WIDTH-1:0] count; reg carry; reg [1:0] c; //synopsys translate_off always @( posedge clk ) begin if ( reset ) begin count <= 0; carry <= 0; c <= 0; end else begin : ADD reg [WIDTH-1:0] tmp; tmp = count + 1; count <= tmp; if ( count != 0 && tmp == 0 ) carry <= 1; else carry <= 0; end end endmodule
nLint reports: document.v(2): Warning 29201: mismatched translate_on is found (Synthesis) document.v(4): Warning 29201: mismatched translate_off is found (Synthesis) document.v(15): Warning 29201: mismatched translate_off is found (Synthesis)
module top (clk, reset, d, q); input clk, reset, d; output q; ffd1 (clk, reset, d, q); ffd2 (clk, reset, d, q); endmodule module ffd1 (clk, reset, d, q); input clk, reset, d; output q; reg q; always @(posedge clk or posedge reset) if (reset == 1'b1) q <= 1'b0; else q <= d; endmodule `celldefine module ffd2 (clk, reset, d, q); input clk, reset, d; output q; reg q; always @(posedge clk or posedge reset) if (reset == 1'b1) q <= 1'b0; else q <= ~d; endmodule `endcelldefine //Warning
nLint reports: document.v(6): Information 29204: instance name for module "ffd1" is missed (Naming Convention) document.v(7): Information 29204: instance name for module "ffd2" is missed (Naming Convention)
`define AA 1.1 module test; reg a,b; real c; parameter k=1.0; initial begin a=`AA; c=1.2; case (a) a 1 `AA k 1.1,c default endcase case (b) `AA+1 k+1.0 c+1 `AA+((c+1)+(k+0.11)) default endcase end endmodule
: : : : : :
: : : : :
nLint reports: document.v(15): Warning 29206: real Style) document.v(16): Warning 29206: real Style) document.v(17): Warning 29206: real (Coding Style) document.v(22): Warning 29206: real (Coding Style) document.v(23): Warning 29206: real (Coding Style) document.v(24): Warning 29206: real (Coding Style) document.v(25): Warning 29206: real used in case item (Coding Style)
expression "1.1" is used in case item (Coding expression "k" is used in case item (Coding expression "1.1 , c" is used in case item expression "(1.1 + 1)" is used in case item expression "(k + 1.0)" is used in case item expression "(c + 1)" is used in case item expression "(1.1 + ((c + 1) + (k + 0.11)))" is
nLint reports: document.v(8): Warning 29211: procedural continuous assignment is used in task/function "top" (Synthesis)
nLint reports: document.v(10): Warning 29212: procedural continuous deassign is used in task/function "top" (Synthesis)
nLint reports: document.v(2): Error 29801: Nested text macros "macro2" is found. (SC)
nLint reports: document.v(12): Warning 29802: Constant value "0000" is assigned to case default clause (SC)
nLint reports: document.v(11): Error 29803: the reset logic should be separate from the for loop logic. (SC)
end
//Warning: the number of line in //always construct should not be //up to threshold value endmodule
nLint reports following if the argument value is ("200"): document.v(9): Warning 29804: the number of line in always construct should not be up to "10" from line "9" to line "20" (Coding Style)
29805 (Verilog) Use Case for Cases without 'Don't Care' Values
Message (Verilog) <filename>(<line no.>): <severity> <rule no.>: %f(%l):use case instead of casex or casez for cases without don't care values in the case items. Configurable Parameter Rule group: Language Construct; Argument type: none; Default severity : Level2 (Warning) This rule is turned OFF by default; Description (Verilog) This rule checks whether casex or casez is used for cases without don't care values in the case items. Example
(Verilog) ///////////////example : document.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 module smp(zo,sel); input[1:0] sel; output[3:0] zo; reg [3:0] zo;
always@( sel ) casex(sel) 2'b00: zo 2'b01: zo 2'b10: zo 2'b11: zo default: zo endcase endmodule
= = = = =
nLint reports: document.v(9): Error 29805: use case instead of casex or casez for cases without don't care values in the case items. (SC) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 module smp2(zo,sel); input[1:0] sel; output[3:0] zo; reg [3:0] zo;
always@( sel ) casez(sel) 2'b00: zo 2'b01: zo 2'b10: zo 2'b11: zo default: zo endcase endmodule
= = = = =
nLint reports: document2.v(9): Error 29805: use case instead of casex or casez for cases without don't care values in the case items. (SC)
nLint reports: document.v(12): Error 29806: do not assign signal with negative value "-1" (SC)
nLint reports: document.v(11): Error 29807: Fractional delay value "-1.500000" is found (SC) document.v(13): Error 29807: Fractional delay value "-1.500000" is found (SC)
always@( sel ) case(1'b1) sel[0]: sel[1]: sel[2]: sel[3]: default: endcase endmodule
zo zo zo zo zo
= = = = =
nLint reports: document.v(9): Error 29808: the value of case selection expression is fixed. (SC)
nLint reports: document.v(11): Error 29809: A negative value is assigned to an integer. (SC)
A; B; C; D; 1'bx;
nLint reports: document.v(10): (SC) document.v(11): (SC) document.v(12): (SC) document.v(13): (SC) document.v(14): (SC)
Error 29810: non-blocking assignment is used inside a function. Error 29810: non-blocking assignment is used inside a function. Error 29810: non-blocking assignment is used inside a function. Error 29810: non-blocking assignment is used inside a function. Error 29810: non-blocking assignment is used inside a function.
FIN; FOUT;
reg[W-1:0] FOUT; parameter D1 = 1; always@( posedge CK ) FOUT <= #D1 FIN; endmodule
nLint reports: document.v(3): Error 29811: Specify base explicitly for parameter "W" (SC)
nLint reports: document.v(11): Error constant of 5 bits or document.v(12): Error constant of 5 bits or document.v(13): Error constant of 5 bits or document.v(14): Error constant of 5 bits or document.v(15): Error constant of 5 bits or
29812: Specify more. (SC) 29812: Specify more. (SC) 29812: Specify more. (SC) 29812: Specify more. (SC) 29812: Specify more. (SC)
bit width explicitly when assigning a bit width explicitly when assigning a bit width explicitly when assigning a bit width explicitly when assigning a bit width explicitly when assigning a
always@( sel1 or sel2 ) case(sel1&sel2) 2'b00: zo = 4'b0001; 2'b01: zo = 4'b0010; 2'b10: zo = 4'b0100; 2'b11: zo = 4'b1000; default: zo = 4'b0000; endcase endmodule
nLint reports: document.v(9): Warning 29813: Logical, arithmetic or bitwise operation is in the case selection expression. (SC)
nLint reports: document.v(9): Warning 29814: more than one statement (if/case/while/for/forever/repeat) is described in a single always block. (SC)
nLint reports following if the argument value is ("CHECK_CONDEXPR"): document.v(6): Warning 29815: bit-wise operators should be used instead of logical operators "NotOp" in single-bit operations. (SC) ///////////////example : document2.v//////////// 1 2 3 4 5 6 7 8 9 10 11 12 module t(clk,A,B,c); input clk; input A,B; output c; reg c; always @(posedge clk) begin if ( (A==1) && (B==1) ) c = 0; assign c = (A==1) && (B==1); end endmodule
nLint reports following if the argument value is ("CHECK_CONDEXPR"): document2.v(8): Warning 29815: bit-wise operators should be used instead of logical operators "LogAndOp" in single-bit operations. (Design Style) document2.v(10): Warning 29815: bit-wise operators should be used instead of logical operators "LogAndOp" in single-bit operations. (Design Style) ///////////////example : document3.v//////////// 1 2 3 4 5 6 module t(clk,A,B,c); input clk; input A,B; output c; reg c;
7 8 9 10 11 12
always @(posedge clk) begin if ( (A==1) && (B==1) ) c = 0; assign c = (A==1) && (B==1); end endmodule
nLint reports following if the argument value is ( IGNORE_CONDEXPR): document3.v(10): Warning 29815: bit-wise operators should be used instead of logical operators "LogAndOp" in single-bit operations. (Design Style)
always@(A or B) if( A ) WA = 1'b0; else WA = B; assign Y = ( C ) ? D : F; always@(A or B or C or D or G or H) case ({G,H}) 2'b00 : ZA = A; 2'b01 : ZA = B; 2'b10 : ZA = C; 2'b11 : ZA = D; default : ZA = 1'bx; endcase function ZFC; input A,B,C,D,G,H; begin case ({G,H}) 2'b00 : ZFC = 2'b01 : ZFC = 2'b10 : ZFC = 2'b11 : ZFC = default : ZFC = endcase end endfunction
A; B; C; D; 1'bx;
nLint reports: document.v(8): Warning 29816: use function and assignment constructs rather than an always construct to describe combinational logic. (SC)
document.v(16): Warning 29816: use function and assignment constructs rather than an always construct to describe combinational logic. (SC)
function ZFC; input A,B,C,D,G,H; begin case ({G,H}) 2'b00 : ZFC = 2'b01 : ZFC = 2'b10 : ZFC = 2'b11 : ZFC = default : ZFC = endcase end endfunction
A; B; C; D; 1'bx;
nLint reports: document.v(22): Error 29817: function "ZFC" is called in an always block. (SC)
`celldefine module FF1(Din, Clk, Q, QB); input Din, Clk; output Q, QB; reg Q, QB; always @(posedge Clk) begin Q = Din; QB = ~Din; end endmodule `endcelldefine
nLint reports: document.v(12): Error 29819: Arithmetic operation is performed on non for loop variables. (SC)
nLint reports: document.v(12): Error 29820: Logical or relational operation is performed on non for loop variables (SC)
reg fo; parameter D1 = 1; always@( negedge RES or posedge CK ) if(~RES) fo <= #D1 1'b1; else fo <= #D1 FIN; JANIV IJANIV ( .bout(FOUT), .bin(fo) ); endmodule module JANIV (bin,bout); input bin; output bout; assign bout = bin; endmodule
nLint reports following if the argument value is ("m190c_list.txt"): document.v(21): Error 29821: Instance/module name "JANIV" uses the same name as an ASIC library cell name (SC)
nLint reports following if the argument value is ("m190c_list.txt"): document.v(15): Error 29822: library cell "JANIV" is instantiated (SC)
nLint reports: document.v(10): Error 29823: The initial value of flip_flop "out1" is specified in an initial block (SC)
The words put in the quotation mark (' ') which is at right side of the equal sign is the description of file header format. Every line represents a comment line in the design. Comment format for matching comment in design is case sensitive. Some parts of description are different because of file differences. Below is Variable, RegExp and Set used to describe the transformable comment.
Refer a Variable When a variable is referred, it must take a '$' as the header. If only the variable '$FileName' is provided, it represents the current file name. Refer a RegExp When a regexp is referred, it must take a '$' as the header. Some regexp are provided as references. See the table below for examples.
Name AnyString Separator Version Author Date Yes_No EmailAddress RegExp .* ----* [0-9]+\.[0-9]+ [a-zA-Z][a-zA-Z_]* (20|19)[0-9][0-9]-[0-1][0-9]-[0-3][0-9] (Y|N) [a-zA-Z].*@.*
Refer a Set
When a set is referred, it must take a '$' as the header. A period ( . ) can be used to connect the property of a set, such as $Set.Object.Type. Set name without property, such as '$set', is not allowed. Some sets are provided as references. See the table below for examples.
Property of set Type, Name, File, LineNo, BeginLine, EndLine, Range, ConstType, Value, IsSigned, IsLocalParam, Size
InstanceSet
Collect all Type, Name, File, LineNo, BeginLine, EndLine, module instances IsArray, Size, DefFile, DefLineNo, DefBeginNo, in the file DefEndLine, IsCellInstance, DefNetType, TimePrecision, TimeUnit
PortSet
Type, Name, File, LineNo, BeginLine, EndLine, PortIndex, Direction, IsConnByName, IsExplicitName, IsVector, IsScalar, Size
ifEmpty(ifNotEmpty)...else Users can control their comment format flexibly by the keyword pair, 'ifEmpty' and 'else', 'ifNotEmpty' and 'else'. 'ifEmpty' or 'ifNotEmpty' must have a set as its parameter. For 'ifEmpty', if the set is null, the first branch is valid for check engine; otherwise, the second branch (else) is valid for check engine. For 'ifNotEmpty', it is contrary to 'ifEmpty'. The first and second branch may be null; if a null branch is used, no match will be done by check engine. When used in the grid, 'ifNotEmpty' and 'else' must take a '$' as a header. Brace should be used to enclose the content of the two branches. 'else' can not appear alone. Example
$ifNotEmpty $InstanceSet{ There are instances in the file. } $else { No instance in the module. }
'ifNotEmpty' can be used alone and the second branch is regarded as a null branch.
Foreach When user wants to repeat certain lines or patterns, or gets a full list of something in Verilog design file, the keyword, Foreach, can be used.
When used in the grid, 'foreach' must take a '$' as a header. A brace is used to enclose the repeated pattern. The nesting is allowed for the keyword. If no set is in the repeated pattern, a symbol for prompting the repeated times should be specified after the right brace. '+' means plus times beginning from one and '*' means minus time beginning from zero. If a set is referred in the repeated pattern, it must be the only one and be writen out after 'foreach'. The size of the set is the times of repeat. The default traverse mode for a set in the repeated pattern is not listed in order. All elements in a set can be listed randomly in comment. An option '-order' can be invoked after 'foreach'. Elements must be listed according to the order added to the set.
Example
VERSION, DATE, AUTHOR, DESCRIPTION is RegExp. a. Repeat line (one and more times)(no set) $foreach { $VERSION : $DATE : $ AUTHOR: $DESCRIPTION }+ b. Repeat words (one and more times) Instantiations: $foreach $InstanceSet { $InstanceSet.Object.Name } c. Repeat line (zero and more) $foreach $InstanceSet { Instantiations: $InstanceSet.Object.Name } d. Repeat line (zero and more)(-order) $foreach $InstanceSet -order { Instantiations: $InstanceSet.Object.Name }
The words put in the quotation mark (' ') which is at right side of the equal sign is the description of construct header format. Every line represents a comment line in the design. Comment format for matching comment in design is case sensitive. Some parts of description are different because of file differences. Below is Variable, RegExp and Set used to describe the transformable comment.
Refer a Variable When a variable is referred, it must take a '$' as the header. Variable '$ConstructName' and $ConstructType' represents the current construct name and type (task, function, user-definedprimitive). Refer a RegExp When a regexp is referred, it must take a '$' as the header. Some regexp are provided as references. See the table below for examples
Name AnyString Separator CommaOrnon RegExp .* ----* ,?
Refer a set When a set is referred, it must take a '$' as the header. A period ( . ) can be used to connect the property of a set, such as $Set.Object.Type. Set name without property, such as '$set', is not allowed. Some sets are provided as references. See the table below for examples.
Set name ParamSet Description Collect all parameters in the file Collect all module instances in the file Property of set Type, Name, File, LineNo, BeginLine, EndLine, Range, ConstType, Value, IsSigned, IsLocalParam, Size Type, Name, File, LineNo, BeginLine, EndLine, Size, DefFile, Direction, IsVector, IsScalar
IOSet
These sets can be used in the following syntax. ifEmpty(ifNotEmpty)...else Users can control their comment format flexibly by the keyword pair, 'ifEmpty' and 'else, 'ifNotEmpty' and 'else'. 'ifEmpty' or 'ifNotEmpty' must have a set as its parameter. For 'ifEmpty', if the set is null, the first branch is valid for check engine; otherwise, the second branch (else) is valid for check engine. For 'ifNotEmpty', it is contrary to 'ifEmpty'. The first and second branch may be null; if a null branch is used, no any match is done by check engine. When used in the grid, 'ifNotEmpty' and 'else' must take a '$' as a header. Brace should be used to enclose the content of the two branches. 'else' can not appear alone.
Example
$ifNotEmpty $ParamSet{ There are parameter(s) in the construct. } $else { No parameter in the construct. }
'ifNotEmpty' can be used alone and the second branch is regarded as a null branch.
Foreach When user wants to repeat certain lines or patterns, or gets a full list of something in Verilog design file, the keyword, Foreach, can be used.
When used in the grid, 'foreach' must take a '$' as a header. A brace is used to enclose the repeated pattern. The nesting is allowed for the keyword. If no set is in the repeated pattern, a symbol for prompting the repeated times should be specified after the right brace. '+' means plus times beginning from one and '*' means minus time beginning from zero. If a set is referred in the repeated pattern, it must be the only one and be writen out after 'foreach'. The size of the set is the times of repeat. The default traverse mode for a set in the repeated pattern is not listed in order. All elements in a set can be listed randomly in comment. An option '-order' can be invoked after 'foreach'. Elements must be listed according to the order added to the set.
Example
VERSION, DATE, AUTHOR, DESCRIPTION is RegExp. a. Repeat line (one and more times)(no set) $foreach { $VERSION : $DATE : $ AUTHOR: $DESCRIPTION }+ b. Repeat words (one and more times) Parameters: $foreach $ParamSet{ $ParamSet.Object.Name } c. Repeat line (zero and more) $foreach $ParamSet { Parameters: $ParamSet.Object.Name } d. Repeat line (zero and more)(-order) $foreach $ParamSet -order { Parameters: $ParamSet.Object.Name }
Header File
Overview
Since a header file can be included in lots of files, nLint only enables the first check point for every rule to avoid redundant warnings; other check points are disabled to get the best performance. There is a risk that nLint will lose some messages when a rule is violated from the second check point but was not violated at the first check point.
Solution
Considering most users' cases: only parameter and macro definitions are written in a header file. The solution focuses on parameter and macro definitions. In nLint, some rules are context-sensitive, e.g. rule 22061 (Unused Object) and 27359 (Unused Macro), while some rules are not context-sensitive, e.g. 21041 (parameter case). Context-sensitive rules may check parameter or macro definitions many times, but other rules only need to check once. nLint uses the following guidelines when encountering header files: For rule 22061and 27359, nLint enables all check points for the header file no matter how many times it is included by other files. For the other rules, nLint only checks the header file once when it is first parsed and filters all messages from the second time it is parsed.
Usage Notes
If a header file is included outside a module declaration, all parameters declared in this header file are global. If a parameter declared in the header file is not used in anywhere in the design, nLint will report it.
Example
line 1: `include "eg.vh" line 2: module test(); line 3: ... line 40 endmodule
All parameters declared in header file eg.vh are effective throughout the whole design.
If a header file is included in a module declaration, all parameters declared in this header file are local to the module. If a parameter declared in the header file is not used in within the module, nLint will report it.
Example
line 1: module test(); line 2: `include "eg.vh" line 3: ... line 40 endmdoule
All parameters declared in header file eg.vh are effective locally within module test. If a parameter declared in eg.vh is not used in the module test, a violation will be reported.
Example
Example1
--param.h-line 1 parameter PARAMA = 1'b0; line 2 parameter PARAMB = 1'b1; --test1.v-line 1 module test1; line 2 `include "param.h" line 3 logic [PARAMA : 0] a; line 4 endmodule
line 3 endmodule
The header file param.h is included in both module test1 and test2. All parameters declared in param.h are locally effective in test1 or test2. In test1, PARAMA is used, but PARAMB is not used, so nLint reports: param.h(2): Warning 22061: object "PARAMB" is declared but not used. (Design Style) In test2, neither PARAMA or PARAMB are used, so nLint reports: param.h(1): Warning 22061: object "PARAMA" is declared but not used. (Design Style)param.h(2): Warning 22061: object "PARAMB" is declared but not used. (Design Style) Example2
--param.h-line 1 parameter PARAMA = 1'b0; line 2 parameter PARAMB = 1'b1;
The header file param.h is included in test2.v outside the module declaration, so all parameters declared in param.h are effective globally. Since PARAMA is used in test1.v, while PARAMB is never used through the whole design,nLint reports: param.h(2): Warning 22061: object "PARAMB" is declared but not used. (Design Style)
[4]
[set]
[5]
[6]
[6.1] ? [7] ()
[8]
\digit
[9]
\<\>
[10]
[11] ^ $
[12] |
match a specific number of instances or instances within a range of the preceding character. {i,} {,j} For example, the expression A[0-9]{3} will match "A" followed by exactly 3 digits. That is, it will match A123 but not A1234. The expression [0-9]{4,6} any sequence of 4, 5, or 6 digits. The expression A[0-9]{1,} match "A" followed by at least 1 digit. {,j} means {1,j}, A[0-9]{,3} match "A" followed by at most 3 digits, at least 1 digit
Examples
pattern: matches: pattern: matches: pattern: matches: pattern: matches: pattern: matches: pattern: matches: pattern: matches: pattern: matches: foo*.* fo foo fooo foobar fobar foxx ... fo[ob]a[rz] fobar fooar fobaz fo foo\\+ foo\ foo\\ foo\\\ ... (foo)[1-3]\1 (same as foo[1-3]foo) foo1foo foo2foo foo3foo (fo.*)_\1 foo_foo fo_fo fob_fob foobar_foobar ... foo(1|9) foo1 foo9 foo[0-9]{3} foo123 foo111 foo379 ... foo[0-9]{1,3} foo1 foo12 foo123 foo87 ...