You are on page 1of 578

Table of Contents

Release Notes for ALINT 2010.10 SR1..................................................................................................................1 What's New..................................................................................................................................................1 Graphical User Interface (GUI)..............................................................................................................1 GUI Preferences.............................................................................................................................1 Open file dialogues.........................................................................................................................1 Chip level engine...................................................................................................................................2 Rule Plug-ins.........................................................................................................................................2 ALDEC............................................................................................................................................2 STARC............................................................................................................................................2 FPGA Vendor Primitives Support..........................................................................................................3 Problems corrected in ALINT 2010.10 SR1.................................................................................................3 VHDL Engine.........................................................................................................................................3 Verilog Engine.......................................................................................................................................3 FPGA Vendor Primitives Support..........................................................................................................3 Graphical User Interface (GUI)..............................................................................................................4 Framework......................................................................................................................................4 Flow Manager.................................................................................................................................4 GUI Preferences.............................................................................................................................4 Policy Editor....................................................................................................................................4 Violation Database..........................................................................................................................4 HTML report....................................................................................................................................4 Rule Plug-ins.........................................................................................................................................5 STARC............................................................................................................................................5 ALDEC............................................................................................................................................5 User Defined Rules...............................................................................................................................5 Documentation......................................................................................................................................5 Reaching Technical Support........................................................................................................................5 Introduction.............................................................................................................................................................7 Starting ALINT ..............................................................................................................................................7 Starting ALINT on Linux........................................................................................................................7 Using run* Scripts from the Installation Directory ............................................................................7 Programs from the bin/ Subdirectory..............................................................................................7 Starting ALINT on Windows..................................................................................................................7 Starting ALINT from GUI.................................................................................................................8 Using run*.bat Files from the Installation Directory.........................................................................8 Programs from the bin/ Subdirectory..............................................................................................8 Programs from the bin Subdirectory............................................................................................................9 alint/alintcon program .................................................................................................................................10 Batch Mode................................................................................................................................................13 Supported Standards.................................................................................................................................14 VHDL...................................................................................................................................................14 Verilog.................................................................................................................................................14 ALINT Tools and Applications ....................................................................................................................15 HTML Help.................................................................................................................................................17 Viewing Documentation.......................................................................................................................17 Help Engine ...................................................................................................................................17 Supported Browsers...............................................................................................................18 Viewing Help in the Embedded Viewer..................................................................................18 . Reference Guides.........................................................................................................................18 Documentation Window .......................................................................................................................19 Navigation Pane............................................................................................................................19 Contents Pane..............................................................................................................................20 Index Pane....................................................................................................................................20 Search Pane.................................................................................................................................20

Table of Contents
Introduction Document Area.............................................................................................................................22 User's Guide..........................................................................................................................................................24 Quick Start.................................................................................................................................................24 Quick Start Overview...........................................................................................................................24 Design Preparation..............................................................................................................................25 Create New Design.......................................................................................................................25 Import Existing Design..................................................................................................................26 Add Libraries.......................................................................................................................................27 Add library in GUI..........................................................................................................................27 Add library in the batch mode.......................................................................................................27 Set Linting Options..............................................................................................................................29 Local and Global Design Preferences ...........................................................................................30 Active Policy Selection..................................................................................................................30 Reporting Mode Setup..................................................................................................................30 Clocks, Resets and Blackboxes Specification..............................................................................31 Run Linting..........................................................................................................................................31 Compilation-time Linting ................................................................................................................32 Elaboration-time Linting................................................................................................................32 Analyze the Results.............................................................................................................................33 Cross-probing ................................................................................................................................34 Filters............................................................................................................................................35 Violation Statuses.........................................................................................................................36 Flatten/organize button.................................................................................................................37 Export to Other Formats ................................................................................................................38 AVDB Files Comparison...............................................................................................................39 Framework Basics ......................................................................................................................................40 Design and Workspaces ......................................................................................................................40 What is a Workspace?..................................................................................................................40 Workspace Configuration.......................................................................................................40 What is a Design?.........................................................................................................................40 Benefits of Workspaces and Designs...........................................................................................41 Workspace ..............................................................................................................................41 Design .....................................................................................................................................41 Design Libraries............................................................................................................................42 Design Dependencies...................................................................................................................42 File Dependencies........................................................................................................................43 Compilation-time Linting ................................................................................................................44 Compilation-time linting Options.............................................................................................44 Setting Preferences .......................................................................................................................45 Global Preferences vs. Design Preferences ...........................................................................45 Configurations...............................................................................................................................45 Workspace Configurations ......................................................................................................46 Design Configurations............................................................................................................46 Workspace and Design Operations in GUI...................................................................................47 Creating New Workspace.......................................................................................................47 Opening Existing Workspace ..................................................................................................48 Creating New Design ..............................................................................................................48 Adding Existing Design to Workspace ....................................................................................49 Adding Files to Design ............................................................................................................49 Setting a Design as an Active .................................................................................................49 Compiling Design ....................................................................................................................49 Compiling Workspace .............................................................................................................49 Workspace and Design Operations in Command-line..................................................................50

ii

Table of Contents
User's Guide Workspace Operations...........................................................................................................50 Design Operations..................................................................................................................51 Design Libraries ...................................................................................................................................54 Overview.......................................................................................................................................54 Library Files ...................................................................................................................................54 Library Mapping............................................................................................................................54 Library Visibility Rules...................................................................................................................55 Links.......................................................................................................................................55 Duplicated Library Names......................................................................................................55 Global Libraries.............................................................................................................................55 Refreshing Library Contents.........................................................................................................56 Commands for Library Management............................................................................................57 . Creating a New Library...........................................................................................................57 Setting a Working Library.......................................................................................................57 Listing Library Contents..........................................................................................................57 Deleting a Library Unit............................................................................................................58 Emptying a Library ..................................................................................................................58 Attaching a Library ..................................................................................................................59 Detaching a Library .................................................................................................................59 Listing Mapped Libraries .........................................................................................................60 Linking Libraries ......................................................................................................................60 Unlinking Libraries..................................................................................................................60 Tcl and Macros....................................................................................................................................61 Overview.......................................................................................................................................61 Executing Macros ..........................................................................................................................61 Executing Macros loaded in the HDL Editor...........................................................................61 The do Command vs the source Command...........................................................................61 Tcl Syntax Basics..........................................................................................................................62 ALINT Variables............................................................................................................................65 Tcl Commands for Checking and Setting Variables...............................................................65 List of ALINT Variables...........................................................................................................66 Command Arguments in a Variable..............................................................................................67 Using eval to Expand Arguments...........................................................................................68 Using Tcl Lists for Storing Command Arguments ...................................................................68 Sharing a Variable across Multiple Macros............................................................................69 More Information on Tcl................................................................................................................69 Command Substitution..................................................................................................................69 Substitution of ALINT Commands..........................................................................................70 Handling Script Execution Errors..................................................................................................70 Using the catch Command.....................................................................................................70 Using the onerror Command..................................................................................................71 Executing External Programs and System Commands................................................................71 Blocking and Non-blocking Commands ..................................................................................72 Command Output...................................................................................................................72 Shell Commands....................................................................................................................72 Summary................................................................................................................................73 Tcl and HDL Identifiers ..................................................................................................................73 VHDL Extended Identifiers.....................................................................................................73 Verilog Simple and Escaped Identifiers..................................................................................74 Dragging Objects to the Console and the HDL Editor............................................................75 The startup.tcl Macro....................................................................................................................75 tcllib Library...................................................................................................................................76 Selected Modules...................................................................................................................76 Configuring ALINT ......................................................................................................................................79

iii

Table of Contents
User's Guide Overview ..............................................................................................................................................79 Rule Parameters...........................................................................................................................79 Parameter types.....................................................................................................................79 Rulesets and Policies....................................................................................................................80 Available Rule Plug-ins ........................................................................................................................81 Overview.......................................................................................................................................81 Pre-installed Rule Plug-ins............................................................................................................81 Optional Rule Plug-ins..................................................................................................................81 Policy and Ruleset Files Syntax..........................................................................................................83 Ruleset Configuration Files...........................................................................................................83 Ruleset definition....................................................................................................................83 Ruleset fields..........................................................................................................................83 Policy Configuration Files ..............................................................................................................84 Policy definition .......................................................................................................................84 Policy fields .............................................................................................................................85 Running analysis ........................................................................................................................................88 Overview ..............................................................................................................................................88 Linting Activation Methods ...................................................................................................................88 Both stages linting - alint command..............................................................................................88 Linting during compilation.............................................................................................................89 Linting during elaboration..............................................................................................................90 Options for ALINT Session..................................................................................................................90 Arguments.....................................................................................................................................91 Activation Examples..........................................................................................................................100 When elaboration is necessary...................................................................................................101 Linting Activation from GUI................................................................................................................102 Linting Options............................................................................................................................105 VHDL.................................................................................................................................................107 Overview.....................................................................................................................................107 Compilation in GUI...............................................................................................................107 . Setting Compilation Options ...........................................................................................108 Compiling with acom...................................................................................................................108 Run compilation-time linting with acom................................................................................109 Library Usage..............................................................................................................................109 Working Library .....................................................................................................................110 Resource Libraries ................................................................................................................110 Order of Analysis .........................................................................................................................110 Netlist Compilation Mode............................................................................................................111 Disable Netlist Compilation Mode .........................................................................................111 Relaxing LRM Requirements......................................................................................................111 Visibility Rules .......................................................................................................................112 32-bit Integers .......................................................................................................................112 Choices in the Case Statement............................................................................................112 Case Expression Type ..........................................................................................................113 Selected Signal Assignment.................................................................................................114 Non-conforming Subprogram Specifications........................................................................114 VHDL Versions ............................................................................................................................115 VHDL 1993...........................................................................................................................116 VHDL 2002...........................................................................................................................116 VHDL 2006...........................................................................................................................116 VHDL Reference Guide........................................................................................................116 Mixing Various VHDL Versions .............................................................................................116 Packages from the IEEE Library....................................................................................117 Verilog...............................................................................................................................................118

iv

Table of Contents
User's Guide Overview.....................................................................................................................................118 Compiling with alog.....................................................................................................................119 Run compilation-time linting with acom................................................................................119 Resource Libraries......................................................................................................................120 Verilog Source Libraries..............................................................................................................121 The `uselib Directive.............................................................................................................121 Options ........................................................................................................................................122 Verilog 2001................................................................................................................................122 ANSI C Style Declarations ....................................................................................................122 Net Declarations...................................................................................................................124 Generate Statement.............................................................................................................124 Constant Functions ...............................................................................................................125 Automatic Tasks and Functions ............................................................................................126 Parameters...........................................................................................................................126 Arrays, Bit-selects and Part-selects ......................................................................................127 Signed Arithmetic ..................................................................................................................128 Unsized Integer Constants...................................................................................................128 Operators ..............................................................................................................................129 Event Control........................................................................................................................129 Input-Output Tasks...............................................................................................................130 Compiler Directives ...............................................................................................................131 Compiler Directives.....................................................................................................................131 Compiler Directives from IEEE Std 1364-2001 .....................................................................131 Compiler Directives from Annex D to IEEE Std 1364-2001 ..................................................132 The `include.ova and include.psl Directives.........................................................................132 The `library Directive .............................................................................................................132 The `uselib Directive.............................................................................................................133 The `verilog_comp_off and `verilog_comp_on Directives .....................................................133 Verilog-XL Compiler Directives .............................................................................................133 Strict LRM Mode.........................................................................................................................133 Preprocessor Extensions............................................................................................................134 C-like #define ........................................................................................................................134 `if defined and #if defined Directives .....................................................................................135 C-like #if, #elif, and #endif....................................................................................................136 C-like <include>....................................................................................................................136 SystemVerilog Extensions....................................................................................................136 Directives for Reporting Messages, Warnings, and Errors ...................................................137 C Style Macros............................................................................................................................137 Working with Results ................................................................................................................................139 Overview ............................................................................................................................................139 Save Linting Results..........................................................................................................................139 Save linting results from Console ................................................................................................139 Save linting results from GUI......................................................................................................139 Automatic results update between linting sessions .....................................................................140 Manage Linting Results.....................................................................................................................141 View linting results......................................................................................................................142 Convert linting results ..................................................................................................................142 Filter linting results......................................................................................................................142 Compare linting results...............................................................................................................142 Copy linting results......................................................................................................................142 AVDB Files Listing.............................................................................................................................142 AVDB Files Comparison....................................................................................................................156 AVDB Files Copy...............................................................................................................................171 AVDB Files Clear ...............................................................................................................................177

Table of Contents
User's Guide Advanced Features..................................................................................................................................185 Chip Level Engine.............................................................................................................................185 Advanced Design Structure Analysis..........................................................................................185 Overview ...............................................................................................................................185 Advanced Design Structure Analysis ....................................................................................185 Module Size Estimation ..................................................................................................187 Clocks and Resets......................................................................................................................189 Overview ...............................................................................................................................189 Global Clock.........................................................................................................................189 -alint_gclk Argument......................................................................................................189 Automatic Clock Detection.............................................................................................190 Clock Domains Extraction..............................................................................................190 Global Asynchronous Reset.................................................................................................192 -alint_grst Argument.......................................................................................................192 Automatic Reset Detection .............................................................................................193 Reset Synchronization Circuit..............................................................................................193 . Internal Clocks and Resets ...................................................................................................196 Internal Clock/Reset Detection .......................................................................................196 Internal Clock/Reset Source..........................................................................................197 Custom Rules....................................................................................................................................200 Overview.....................................................................................................................................200 Rule Plug-ins...............................................................................................................................201 Basic Terms ..........................................................................................................................201 Rule Plug-ins Registration....................................................................................................201 Rule Plug-in Resources........................................................................................................203 New Rule Wizard........................................................................................................................205 FPGA Vendor Primitives ....................................................................................................................208 Overview.....................................................................................................................................208 Regular Synthesis v.s. Dedicated Vendor Components Support.........................................208 Vendor Components Support Levels ....................................................................................209 Attaching Vendor Library to a Design...................................................................................212 Supported Libraries.....................................................................................................................213 Altera....................................................................................................................................213 Xilinx.....................................................................................................................................215 Source Code Exclusions...................................................................................................................217 Overview.....................................................................................................................................217 Disable Checks for Particular Context........................................................................................217 GUI Options..........................................................................................................................217 Console Options...................................................................................................................218 Source File Options..............................................................................................................218 Comparison of Available Options.........................................................................................219 @alint Pragmas ...........................................................................................................................222 Enable/Disable Rules And Rulesets.....................................................................................222 Changing rule state........................................................................................................222 Changing ruleset state...................................................................................................222 Example of using pragmas rule_state and ruleset_state...............................................223 Set Severity For Rules And Rulesets...................................................................................223 Changing rule severity...................................................................................................223 Changing ruleset severity ...............................................................................................224 Example of using pragmas rule_severity and ruleset_severity......................................224 Push/Pop ALINT Settings.....................................................................................................225 Push current configuration to a stack.............................................................................225 Pop saved configuration from a stack............................................................................225 Push/pop usage example ...............................................................................................226

vi

Table of Contents
User's Guide Synthesis constraints..................................................................................................................227 Synthesis translate_off and translate_on ..............................................................................227 Examples.......................................................................................................................227 Exclusions Files..........................................................................................................................229 Exclusions Files Content......................................................................................................229 GUI Reference.....................................................................................................................................................230 Framework...............................................................................................................................................230 Overview ............................................................................................................................................230 Toolbar..............................................................................................................................................231 Document Windows and Tool Windows............................................................................................231 Document Windows....................................................................................................................232 Tool Windows ..............................................................................................................................232 Switching between Windows.............................................................................................................232 Switching between Tool Windows ...............................................................................................234 Switching between Document Windows.....................................................................................234 Status Bar..........................................................................................................................................234 Favorites Toolbar........................................................................................................................235 Perspective Navigator Toolbar....................................................................................................235 Views and Other Toolbars ...........................................................................................................235 Description Section.....................................................................................................................235 HDE Editor Section.....................................................................................................................236 Favorites............................................................................................................................................236 Add and Remove Favorites .........................................................................................................236 Perspectives......................................................................................................................................237 Adding and Deleting Perspectives..............................................................................................237 Switching Between Perspectives................................................................................................237 Configuring Application Look.............................................................................................................238 Preferences for Built-in Tools......................................................................................................238 Configuring the Widget Look.......................................................................................................238 Linux.....................................................................................................................................238 Windows...............................................................................................................................239 Exporting/Importing GUI Preferences.........................................................................................239 Exporting Preferences..........................................................................................................239 Importing Preferences..........................................................................................................240 Related Commands...........................................................................................................................241 Sample Commands for Managing Documents:..........................................................................242 Sample Commands for Managing Perspectives:........................................................................242 Sample Commands for Managing Windows:..............................................................................243 Console....................................................................................................................................................244 Overview ............................................................................................................................................244 Autocomplete .....................................................................................................................................244 Filtering Messages in the Console....................................................................................................245 Filter Toolbar...............................................................................................................................246 Filtered Views ..............................................................................................................................246 Cross-probing from the Console to Other Tools................................................................................246 Double-click Operation in the Console........................................................................................246 Drag and Drop Operation from Other Debug Windows to the Console......................................247 Related Commands...........................................................................................................................247 Design Management Windows................................................................................................................248 Design Manager................................................................................................................................248 Overview.....................................................................................................................................248 Design Manager Window............................................................................................................248 Design Manager Context Menu............................................................................................249

vii

Table of Contents
GUI Reference Related Commands....................................................................................................................251 Configuration Manager......................................................................................................................254 Overview.....................................................................................................................................254 File Browser .......................................................................................................................................255 Overview.....................................................................................................................................255 File Browser Window..................................................................................................................255 File Browser Context Menu..................................................................................................256 Related Commands....................................................................................................................258 Library Manager................................................................................................................................260 Overview.....................................................................................................................................260 Library Tree.................................................................................................................................260 Library Mappings..................................................................................................................261 Links.....................................................................................................................................261 Library Contents..........................................................................................................................261 VHDL Units...........................................................................................................................261 Verilog and SystemVerilog Units..........................................................................................262 Creating Library Configuration Files ............................................................................................263 Creating and Attaching Libraries.................................................................................................263 Creating a New Library.........................................................................................................263 Mapping a Newly Created Library outside the Current Directory...................................263 Attaching an Existing Library................................................................................................264 Mapping a Newly Attached Library outside the Current Directory.................................264 Linking Library Configuration Files..............................................................................................264 Storing Links outside the Current Directory..........................................................................265 Removing Links....................................................................................................................265 Searching for Libraries and Library Units....................................................................................265 Filtering the Library Tree .......................................................................................................266 Using the Search Box...........................................................................................................266 Managing Access Rights .............................................................................................................267 Emptying and Deleting Libraries.................................................................................................267 Deleting a Library Unit..........................................................................................................267 Emptying a Library ................................................................................................................268 Refreshing Libraries ..............................................................................................................268 Library Manager Context Menu ...................................................................................................268 Setting the Current Working Library.....................................................................................268 Run Elaboration-time linting ..................................................................................................268 Compact Library...................................................................................................................268 Copy Testbench ....................................................................................................................269 Copy VHDL Component Declaration....................................................................................269 Copy VHDL Instantiation......................................................................................................269 Copy Verilog Instantiation .....................................................................................................269 Make Library Global.............................................................................................................269 . Show Source........................................................................................................................270 Related Commands....................................................................................................................270 HDL Editor...............................................................................................................................................272 . Overview ............................................................................................................................................272 Column Selection........................................................................................................................272 Printing Documents.....................................................................................................................272 Syntax Highlighting............................................................................................................................273 Enabling Syntax Highlighting......................................................................................................273 Find Matching....................................................................................................................................274 Automatic Find Matching .............................................................................................................274 Enabling Automatic Find Matching ..............................................................................................275 Working with Sections.......................................................................................................................275

viii

Table of Contents
GUI Reference Navigation Marker and Global Marker...............................................................................................277 Global Marker.............................................................................................................................278 . Configuring the Markers..............................................................................................................278 Navigating with Bookmarks...............................................................................................................279 Searching for Bookmarks............................................................................................................280 Find and Replace Dialog Box............................................................................................................280 Find Tab......................................................................................................................................280 Replace Tab................................................................................................................................281 Bookmarks Tab...........................................................................................................................282 Go to Line Tab............................................................................................................................282 Find Incremental.........................................................................................................................283 AutoComplete....................................................................................................................................283 Content AutoComplete................................................................................................................284 Included Files Opening......................................................................................................................285 Verilog Include File ......................................................................................................................285 C/C++ Include File......................................................................................................................285 VHDL Package Opening...................................................................................................................285 Integration with the Compiler.............................................................................................................286 Compilation Errors and Warnings...............................................................................................286 Related Commands...........................................................................................................................287 Commands for Manipulating Text Blocks ....................................................................................287 Command for Navigating............................................................................................................288 Commands for Manipulating Links and Bookmarks....................................................................288 Commands for Editing Document Structure ................................................................................289 Commands for Manipulating Files ...............................................................................................290 Commands for Manipulating Cursors ..........................................................................................290 Find Results Window...............................................................................................................................291 Overview ............................................................................................................................................291 Find in Files or Replace in Files dialog boxes.............................................................................293 Printing and Print Preview ........................................................................................................................295 Overview ............................................................................................................................................295 Toolbar buttons...........................................................................................................................295 Printing Options Dialog Box ...............................................................................................................296 General Options..........................................................................................................................297 Header/Footer Tab...............................................................................................................297 Colors Tab............................................................................................................................297 Tool-Specific Options..................................................................................................................298 HDE Editor Options..............................................................................................................298 Buttons........................................................................................................................................298 HTML Viewer...........................................................................................................................................299 Overview ............................................................................................................................................299 Linting Windows.......................................................................................................................................300 Overview ............................................................................................................................................300 Quick Launch Panel..........................................................................................................................302 Overview.....................................................................................................................................302 Available Actions.........................................................................................................................303 Design Setup........................................................................................................................304 Linting...................................................................................................................................304 Advanced ..............................................................................................................................305 Flow Manager....................................................................................................................................306 Overview.....................................................................................................................................306 Design Linting Flow.....................................................................................................................306 Attaching Flow to Design......................................................................................................306 Running Flow ........................................................................................................................306

ix

Table of Contents
GUI Reference Predefined Flows..................................................................................................................308 Flow Phases ................................................................................................................................309 Pass Criteria.........................................................................................................................309 Execution States ...................................................................................................................310 New Flow Wizard........................................................................................................................310 Related Commands....................................................................................................................312 Flow Editor .........................................................................................................................................314 Overview.....................................................................................................................................314 Flow Editor Window..............................................................................................................314 Flow Content...............................................................................................................................315 Flow Tree Structure..............................................................................................................316 Structure Modification...........................................................................................................316 Phase Configuration ....................................................................................................................317 Pass Criteria.........................................................................................................................317 Policy....................................................................................................................................318 Preferences..........................................................................................................................319 New Phase Wizard ......................................................................................................................320 Related Commands....................................................................................................................322 Rule Plug-in Viewer...........................................................................................................................324 Overview.....................................................................................................................................324 Related Commands....................................................................................................................326 Rule Description Viewer....................................................................................................................327 Overview.....................................................................................................................................327 Configuration Viewer.........................................................................................................................329 Overview.....................................................................................................................................329 Ruleset Editor....................................................................................................................................331 Overview.....................................................................................................................................331 Managing Rulesets.....................................................................................................................331 Creating a New Ruleset .......................................................................................................331 . Using Rules Directly.......................................................................................................331 Inheriting Existing Rulesets............................................................................................332 Modifying a Ruleset..............................................................................................................333 Policy Editor .......................................................................................................................................334 Overview.....................................................................................................................................334 Managing Policies.......................................................................................................................334 Creating a New Policy..........................................................................................................334 Using Rules Directly.......................................................................................................334 Using Existing Rulesets.................................................................................................335 Inheriting Existing Policies.............................................................................................336 Modifying a Policy .................................................................................................................337 Policy Contents and Rule Configurations ....................................................................................337 Policy Contents Section ........................................................................................................337 Rule Configurations Section.................................................................................................337 Rule Parameters Editor.....................................................................................................................339 Overview.....................................................................................................................................339 Violation Viewer.................................................................................................................................340 Overview.....................................................................................................................................340 Violation Viewer Structure....................................................................................................340 Managing Violations....................................................................................................................341 Observing Multiple Violations...............................................................................................342 Expanding Hierarchical Violations........................................................................................342 Functional Buttons......................................................................................................................343 Violations Report Export.......................................................................................................344 Filtered View.........................................................................................................................345

Table of Contents
GUI Reference Organize the Hierarchy .........................................................................................................346 Filter by Status ......................................................................................................................346 Pop-up Menu ...............................................................................................................................347 Enable/Disable Rule(s) for Active Policy..............................................................................348 Enable/Disable Rule(s) for Selected Objects ........................................................................350 Use Ruleset..........................................................................................................................354 Use Policy .............................................................................................................................354 Additional Filters ..........................................................................................................................354 Filter Results by User Defined Policy or Ruleset..................................................................354 Filter Results by Classification Topic....................................................................................355 Generate Policy from AVDB Wizard...........................................................................................356 Design Quality Report Generation Wizard..................................................................................360 Exclusions Editor...............................................................................................................................363 Overview.....................................................................................................................................363 Managing Exclusions Elements..................................................................................................363 Creating a New Exclusions File............................................................................................363 Adding Exclusion Elements ............................................................................................363 Adding Rules..................................................................................................................364 Modifying an Exclusions File................................................................................................365 Related Commands....................................................................................................................365 Dialog Box References............................................................................................................................367 Customize Dialog Box.......................................................................................................................367 Overview.....................................................................................................................................367 Options........................................................................................................................................367 Shortcuts.....................................................................................................................................367 Preferences Dialog Box.....................................................................................................................369 Overview.....................................................................................................................................369 Searching for Options...........................................................................................................369 Environment Category................................................................................................................371 Extensions Category .............................................................................................................371 Documentation Category......................................................................................................371 Linting Category..........................................................................................................................372 General Category.................................................................................................................372 Advanced Category..............................................................................................................373 Entries Category...................................................................................................................375 Languages Category............................................................................................................377 VHDL Category..............................................................................................................377 Verilog Category............................................................................................................378 C/C++ Category.............................................................................................................380 Tools Category............................................................................................................................382 Console Category.................................................................................................................382 Appearance Category....................................................................................................382 General Category...........................................................................................................382 Library Manager...................................................................................................................383 . General Category...........................................................................................................383 Code Generation............................................................................................................384 HDL Editor Category .............................................................................................................386 Appearance Category....................................................................................................386 General Category...........................................................................................................386 File Type Pages.............................................................................................................387 Exclusions Editor Category ...................................................................................................389 General Category...........................................................................................................389 HTML Viewer Category........................................................................................................390 General Category...........................................................................................................390

xi

Table of Contents
GUI Reference Connection Category.....................................................................................................390 Flow Manager.......................................................................................................................391 Appearance Category....................................................................................................391 General Category...........................................................................................................391 Violation Viewer Category....................................................................................................392 Appearance Category....................................................................................................392 General Category...........................................................................................................392 Export Category.............................................................................................................392 Rule Description Viewer Category ........................................................................................393 Appearance Category....................................................................................................393 General Category...........................................................................................................393 Quick Launch Panel Category..............................................................................................394 Appearance Category....................................................................................................394 General Category...........................................................................................................394 Tool Windows.......................................................................................................................395 Appearance Category....................................................................................................395 Export and Import Appearance Preferences.....................................................................................395 AVDB Compare Dialog......................................................................................................................395 Basic AVDB Compare Dialog ......................................................................................................396 Advanced AVDB Compare Dialog..............................................................................................396 Macro Command Reference ...............................................................................................................................398 Conventions.............................................................................................................................................398 Specifying Arguments in a File .................................................................................................................399 Tcl Expansion....................................................................................................................................399 Whitespace and Comments..............................................................................................................399 Arguments Shared by All Commands......................................................................................................400 -help argument..................................................................................................................................400 -title argument ...................................................................................................................................400 . -window argument.............................................................................................................................400 -f argument........................................................................................................................................400 Command Return Values .........................................................................................................................401 Displaying Output of Commands that Return Values........................................................................401 Commands Available at the OS Prompt..................................................................................................403 Library Management .........................................................................................................................403 . Compilation and Linting.....................................................................................................................403 Current Working Library....................................................................................................................403 abort command........................................................................................................................................404 Syntax ................................................................................................................................................404 Arguments.........................................................................................................................................404 Examples...........................................................................................................................................404 acom command ........................................................................................................................................405 Syntax ................................................................................................................................................405 Arguments.........................................................................................................................................405 Source File Arguments ................................................................................................................409 Examples...........................................................................................................................................409 adel command ..........................................................................................................................................410 Syntax ................................................................................................................................................410 Arguments.........................................................................................................................................410 Examples...........................................................................................................................................410 adir command..........................................................................................................................................412 Syntax ................................................................................................................................................412 Arguments.........................................................................................................................................412 Examples...........................................................................................................................................412

xii

Table of Contents
Macro Command Reference alias command.........................................................................................................................................414 Syntax ................................................................................................................................................414 Arguments.........................................................................................................................................414 Examples...........................................................................................................................................414 alib command ...........................................................................................................................................415 Syntax ................................................................................................................................................415 Arguments.........................................................................................................................................415 Examples...........................................................................................................................................416 alint command ..........................................................................................................................................417 Syntax ................................................................................................................................................417 Arguments.........................................................................................................................................417 Examples...........................................................................................................................................419 alintId command .......................................................................................................................................420 Syntax ................................................................................................................................................420 Arguments.........................................................................................................................................420 alintVersion command ..............................................................................................................................421 Syntax ................................................................................................................................................421 Arguments.........................................................................................................................................421 alintVersionString command....................................................................................................................422 Syntax ................................................................................................................................................422 Arguments.........................................................................................................................................422 alint.ruleplugin.load command.................................................................................................................423 Syntax ................................................................................................................................................423 Arguments.........................................................................................................................................423 Examples...........................................................................................................................................423 alint.ruleplugin.register command............................................................................................................424 Syntax ................................................................................................................................................424 Arguments.........................................................................................................................................424 Examples...........................................................................................................................................424 alint.ruleplugin.turn command..................................................................................................................425 Syntax ................................................................................................................................................425 Arguments.........................................................................................................................................425 Examples...........................................................................................................................................425 alint.ruleplugin.unload command.............................................................................................................426 Syntax ................................................................................................................................................426 Arguments.........................................................................................................................................426 Examples...........................................................................................................................................426 alint.ruleplugin.unregister command........................................................................................................427 Syntax ................................................................................................................................................427 Arguments.........................................................................................................................................427 Examples...........................................................................................................................................427 alist command..........................................................................................................................................428 Syntax ................................................................................................................................................428 Arguments.........................................................................................................................................428 Examples...........................................................................................................................................428 alog command ..........................................................................................................................................430 Syntax ................................................................................................................................................430 ALINT Arguments..............................................................................................................................430 Arguments.........................................................................................................................................432 Examples...........................................................................................................................................435 amap command.......................................................................................................................................436 Syntax ................................................................................................................................................436 Arguments.........................................................................................................................................436 Examples...........................................................................................................................................437

xiii

Table of Contents
Macro Command Reference asim command .........................................................................................................................................438 Syntax ................................................................................................................................................438 ALINT Arguments..............................................................................................................................438 Arguments (not language specific)....................................................................................................440 Arguments (VHDL)............................................................................................................................441 Example .............................................................................................................................................441 Example .............................................................................................................................................441 Example .............................................................................................................................................442 avdb2csv command.................................................................................................................................443 Syntax ................................................................................................................................................443 Arguments.........................................................................................................................................443 avdb2html command ................................................................................................................................446 Syntax ................................................................................................................................................446 Arguments.........................................................................................................................................446 avdb2txt command ...................................................................................................................................449 Syntax ................................................................................................................................................449 Arguments.........................................................................................................................................449 avdbcompare command ...........................................................................................................................452 Syntax ................................................................................................................................................452 Arguments.........................................................................................................................................452 avdbclear command .................................................................................................................................455 Syntax ................................................................................................................................................455 Arguments.........................................................................................................................................455 avdbcopy command.................................................................................................................................457 Syntax ................................................................................................................................................457 Arguments.........................................................................................................................................457 bye command ...........................................................................................................................................459 ccomp command ......................................................................................................................................460 Syntax ................................................................................................................................................460 Arguments.........................................................................................................................................460 Examples...........................................................................................................................................461 cd command .............................................................................................................................................462 Syntax ................................................................................................................................................462 Arguments.........................................................................................................................................462 clear command .........................................................................................................................................463 Syntax ................................................................................................................................................463 do command............................................................................................................................................464 Syntax ................................................................................................................................................464 Arguments.........................................................................................................................................464 Examples...........................................................................................................................................465 echo command .........................................................................................................................................466 Syntax ................................................................................................................................................466 Arguments.........................................................................................................................................466 Examples...........................................................................................................................................466 echofile command....................................................................................................................................467 Syntax ................................................................................................................................................467 Arguments.........................................................................................................................................467 Examples...........................................................................................................................................467 exit command ...........................................................................................................................................468 msginfo command ....................................................................................................................................469 Syntax ................................................................................................................................................469 Arguments.........................................................................................................................................469 onerror command .....................................................................................................................................470 Syntax ................................................................................................................................................470

xiv

Table of Contents
Macro Command Reference Arguments.........................................................................................................................................470 Examples...........................................................................................................................................470 pause command .......................................................................................................................................471 Syntax ................................................................................................................................................471 Arguments.........................................................................................................................................471 Examples...........................................................................................................................................471 quiet command .........................................................................................................................................472 Syntax ................................................................................................................................................472 Arguments.........................................................................................................................................472 quit command ...........................................................................................................................................473 Syntax ................................................................................................................................................473 Arguments.........................................................................................................................................473 resume command....................................................................................................................................474 Syntax ................................................................................................................................................474 Arguments.........................................................................................................................................474 Examples...........................................................................................................................................474 runexe command.....................................................................................................................................475 Syntax ................................................................................................................................................475 Arguments.........................................................................................................................................475 Examples...........................................................................................................................................475 runscript command ...................................................................................................................................476 setlibrarymode command .........................................................................................................................477 Syntax ................................................................................................................................................477 Arguments.........................................................................................................................................477 show command........................................................................................................................................478 Syntax ................................................................................................................................................478 Arguments.........................................................................................................................................478 Examples...........................................................................................................................................478 sh command .............................................................................................................................................479 Syntax ................................................................................................................................................479 Arguments.........................................................................................................................................479 Examples...........................................................................................................................................479 transcript command ..................................................................................................................................480 Syntax ................................................................................................................................................480 Arguments.........................................................................................................................................480 transcript file command............................................................................................................................481 Syntax ................................................................................................................................................481 Arguments.........................................................................................................................................481 vcom command ........................................................................................................................................482 vdel command ..........................................................................................................................................483 vdir command ...........................................................................................................................................484 view command.........................................................................................................................................485 Syntax ................................................................................................................................................485 Arguments.........................................................................................................................................485 Examples...........................................................................................................................................485 vlib command...........................................................................................................................................487 vlint command..........................................................................................................................................488 Stand-alone vlint Executable.............................................................................................................488 Syntax (for standalone vlint command).............................................................................................488 Arguments.........................................................................................................................................488 vlist command..........................................................................................................................................490 vlog command ..........................................................................................................................................491 vmap command ........................................................................................................................................492 vsim command.........................................................................................................................................493

xv

Table of Contents
Installation and Licensing..................................................................................................................................494 Linux .........................................................................................................................................................494 Software and Hardware Requirements for Linux ...............................................................................494 Linux (32-bit version)..................................................................................................................494 . Linux (64-bit version)..................................................................................................................494 . Installation Package..........................................................................................................................495 Running the Installation Script...........................................................................................................496 Additional plug-ins installation.....................................................................................................496 Silent Mode Installation...............................................................................................................497 Post Installation Setup................................................................................................................497 Windows ...................................................................................................................................................499 Software and Hardware Requirements for Windows .........................................................................499 ALINT Setup Program.......................................................................................................................499 Licensing..................................................................................................................................................500 Obtaining an Evaluation License.......................................................................................................500 Setting Up the License Server...........................................................................................................500 License Variables..............................................................................................................................500 License Diagnostics ...........................................................................................................................502 GPL-licensed Software Delivered with ALINT...................................................................................502 How to Check Product Version................................................................................................................503 Release History...................................................................................................................................................505 Release Notes for ALINT 2009.02...........................................................................................................505 What's New in this Release...............................................................................................................505 Rule Libraries..............................................................................................................................505 Macro Commands.......................................................................................................................505 Framework..................................................................................................................................506 Console.......................................................................................................................................506 Rule Description Viewer..............................................................................................................506 Configuration Viewer...................................................................................................................506 Violation Viewer..........................................................................................................................506 HDL Editor..................................................................................................................................507 . Design Manager..........................................................................................................................507 GUI Preferences.........................................................................................................................507 Documentation............................................................................................................................508 License........................................................................................................................................508 Problems Corrected in Version 2009.02 ............................................................................................508 General.......................................................................................................................................508 Framework..................................................................................................................................509 Known Problems...............................................................................................................................509 General.......................................................................................................................................509 Framework..................................................................................................................................509 Library Manager..........................................................................................................................509 File Browser................................................................................................................................509 Macro Commands.......................................................................................................................510 Reaching Technical Support.............................................................................................................510 Release Notes for ALINT 2009.06...........................................................................................................511 Summary:..........................................................................................................................................511 What's New in this Release...............................................................................................................511 Custom Rules ..............................................................................................................................511 Rule Libraries..............................................................................................................................512 VHDL Synthesis..........................................................................................................................512 Linting Flow.................................................................................................................................513 Violation Databases....................................................................................................................513 Comparison Databases ...............................................................................................................514

xvi

Table of Contents
Release History Framework..................................................................................................................................514 VHDL 2008 ..................................................................................................................................514 Macro Commands.......................................................................................................................515 Tcl Interpreter..............................................................................................................................515 Console.......................................................................................................................................515 Alintcon Program .........................................................................................................................515 Installer.......................................................................................................................................516 . HDL Editor..................................................................................................................................516 . Documentation............................................................................................................................516 Problems Corrected in Version 2009.06 ............................................................................................516 General.......................................................................................................................................516 Violation Databases and Violation Viewer..................................................................................517 Comparison Databases ...............................................................................................................517 HDL Editor..................................................................................................................................517 . Design Manager..........................................................................................................................517 Macro Commands.......................................................................................................................518 Framework..................................................................................................................................518 Known Problems...............................................................................................................................518 General.......................................................................................................................................518 Framework..................................................................................................................................518 HDL Editor..................................................................................................................................518 . Library Manager..........................................................................................................................518 File Browser................................................................................................................................519 Macro Commands.......................................................................................................................519 Reaching Technical Support.............................................................................................................519 Release Notes for ALINT 2009.10...........................................................................................................520 What's New ........................................................................................................................................520 ALDEC Rule Plug-ins..................................................................................................................520 DO-254 Rule Plug-ins.................................................................................................................520 STARC Rule Plug-ins ..................................................................................................................520 FPGA Primitives Support............................................................................................................521 API Functions..............................................................................................................................521 Advanced CDC Reports..............................................................................................................522 VHDL Linting...............................................................................................................................523 Built-in Synthesis Engine............................................................................................................525 Batch Mode.................................................................................................................................526 Graphical User Interface.............................................................................................................526 Tcl and Macro Commands..........................................................................................................527 Supported Platforms...................................................................................................................528 Problems Corrected in Version 2009.10 ............................................................................................528 Verilog Linting.............................................................................................................................528 VHDL Linting...............................................................................................................................528 Graphical User Interface.............................................................................................................529 Tcl and Macro Commands..........................................................................................................529 Documentation............................................................................................................................529 Miscellaneous.............................................................................................................................529 Known Problems...............................................................................................................................529 General.......................................................................................................................................530 Rules...........................................................................................................................................530 Framework..................................................................................................................................530 HDL Editor..................................................................................................................................530 . Library Manager..........................................................................................................................531 File Browser................................................................................................................................531 Macro Commands.......................................................................................................................531

xvii

Table of Contents
Release History Reaching Technical Support.............................................................................................................531 Release Notes for ALINT 2010.02...........................................................................................................532 What's New ........................................................................................................................................532 RMM Rule Plug-in.......................................................................................................................532 Basic plug-ins (ALDEC)..............................................................................................................532 DO-254 Rule Plug-ins.................................................................................................................532 STARC Rule Plug-ins ..................................................................................................................533 FPGA Primitives Support............................................................................................................533 Chip-Level Checks......................................................................................................................533 API Functions..............................................................................................................................533 Framework - Design Quality Metrics...........................................................................................534 Framework - Violation Viewer Upgrade......................................................................................534 Graphical User Interface Enhancements....................................................................................534 HDL Editor............................................................................................................................535 Console .................................................................................................................................535 Framework ............................................................................................................................535 Problems Corrected in Version 2010.02 ............................................................................................535 Verilog Linting.............................................................................................................................535 VHDL Linting...............................................................................................................................535 Built-in Synthesis Engine............................................................................................................536 Graphical User Interface.............................................................................................................536 Tcl and Macro Commands..........................................................................................................537 Documentation............................................................................................................................537 Licensing.....................................................................................................................................537 Known Problems...............................................................................................................................537 General.......................................................................................................................................537 Rules...........................................................................................................................................537 Framework..................................................................................................................................538 HDL Editor..................................................................................................................................538 . Library Manager..........................................................................................................................538 File Browser................................................................................................................................538 Macro Commands.......................................................................................................................538 Reaching Technical Support.............................................................................................................538 Release Notes for ALINT 2010.06...........................................................................................................540 What's New ........................................................................................................................................540 Flow Manager.............................................................................................................................540 Exclusions Editor........................................................................................................................540 . Quick Launch Panel....................................................................................................................540 Console.......................................................................................................................................540 Framework..................................................................................................................................541 GUI Preferences.........................................................................................................................541 Appearance Preferences............................................................................................................541 Preferences and Design Properties............................................................................................541 HTML Viewer..............................................................................................................................542 Basic plug-ins (ALDEC)..............................................................................................................542 ALDEC Rules Improvements ................................................................................................542 RMM Rule Plug-in.......................................................................................................................542 STARC Rule Plug-ins ..................................................................................................................542 STARC Rules Improvements ................................................................................................543 Macro Commands.......................................................................................................................543 Problems Corrected in Version 2010.06 ............................................................................................543 Verilog Linting.............................................................................................................................543 VHDL Linting...............................................................................................................................543 Tcl and Macro Commands..........................................................................................................544

xviii

Table of Contents
Release History Library System............................................................................................................................544 Documentation............................................................................................................................544 Known Problems...............................................................................................................................544 General.......................................................................................................................................544 Chip Level Engine.......................................................................................................................544 Exclusions Files..........................................................................................................................545 Flow Manager.............................................................................................................................545 Framework..................................................................................................................................545 HDL Editor..................................................................................................................................545 . Library Manager..........................................................................................................................545 File Browser................................................................................................................................545 Macro Commands.......................................................................................................................545 Reaching Technical Support.............................................................................................................546 Release Notes for ALINT 2010.10...........................................................................................................547 What's New ........................................................................................................................................547 Phase-Based Linting...................................................................................................................547 Flow Methodology .................................................................................................................547 Flow Editor ............................................................................................................................547 Create New Flow Wizard......................................................................................................548 Chip Level Engine.......................................................................................................................548 Licensing.....................................................................................................................................548 Graphical User Interface.............................................................................................................549 Configuration Viewer............................................................................................................549 Violation Viewer....................................................................................................................549 AVDB Compare Dialog.........................................................................................................549 HDL Editor............................................................................................................................549 Library Manager...................................................................................................................550 . Find Results ..........................................................................................................................550 Embedded HTML Viewer.....................................................................................................550 . Rule Plug-ins...............................................................................................................................550 STARC ..................................................................................................................................551 STARC Rules Improvements.........................................................................................551 ALDEC ..................................................................................................................................552 RMM.....................................................................................................................................552 Macro Commands.......................................................................................................................552 Startup Macro ..............................................................................................................................553 FPGA Vendor Libraries Support.................................................................................................553 Documentation............................................................................................................................553 Installation...................................................................................................................................553 Problems Corrected in Version 2010.10 ............................................................................................553 Chip Level Engine.......................................................................................................................554 Built-in Synthesis Engine............................................................................................................554 Verilog Linting.............................................................................................................................554 VHDL Linting...............................................................................................................................554 Exclusion files.............................................................................................................................554 Flow Manager.............................................................................................................................554 Violation Viewer..........................................................................................................................555 Macro Commands.......................................................................................................................555 Design Manager..........................................................................................................................555 Known Problems...............................................................................................................................555 General.......................................................................................................................................555 Exclusions Files..........................................................................................................................555 Flow Manager and Flow Editor...................................................................................................556 Framework..................................................................................................................................556

xix

Table of Contents
Release History Library Manager..........................................................................................................................556 File Browser................................................................................................................................556 Macro Commands.......................................................................................................................556 Reaching Technical Support.............................................................................................................556

xx

Release Notes for ALINT 2010.10 SR1

These Release Notes list additions, changes and fixes to ALINT implemented since the previous version, ALINT 2010.10.

What's New

Graphical User Interface (GUI)

GUI Preferences Now Linting | General category contains only the most important and frequently used options. Options used in the specific cases only have been moved from the Linting | General to the Linting | Advanced category. This makes the ALINT configuration process easier due to the fact that a user have to deal with the less number of options at a time. These changes are made in the Global and Design Preferences. Generate synthesis log option is now available in the Global and Design Preferences under the Linting | Advanced category. It allows storing detected clocks/resets, clock domain crossings, and equivalent logic gates count. This option is equivalent of the -alint_synthesislog argument for the alint or asim command. (SPT60267) Additional options for 'asim' has been added to the Global and Design Preferences under the Linting | Advanced category. It allows setting additional elaboration-time linting options (-asim). For example, this option can be used to assign default values to VHDL generics and Verilog parameters. (SPT50587) Additional options option from the Linting | Advanced category is renamed to the Additional options for 'alint'. Clean AVDB file on design linting option is now available in the Global Preferences under the Linting | General category. Once enabled (default), old violations are cleared from the violation database associated with design before linting. AVDB file cleaning is invoked if the whole design is linted. This prevents the results of previous linting sessions from affecting the current one. (SPT51074) Clean work library on design compilation option is now available under the Linting | General category of the Global Preferences. Once enabled, the working library is cleared before compilation-time linting of the design. In cases when several designs are compiled at a time, all working libraries are cleared. This prevents previously compiled design units to affect the current linting results.

Open file dialogues Open file dialogs now remember the last opened file (SPT51192). Now the last opened file is stored independently for the following dialogues: Open workspace (File | Open | Workspace) Open design (File | Open | Design) Open file (File | Open | File menu) Execute macro (Tools | Execute Macro)

ALINT

Release Notes for ALINT 2010.10 SR1


Compare *.avdb files (Linting | Compare AVDB Files) Attached or create library (Library Manager | Attach Library or Library Manager | Create Library) Add existing file to the design (Design Manager | Add | Existing File) Export *.avdb file (Violation Viewer | Export to)

Chip level engine


Now ALINT engine supports automatic reset synchronization circuit recognition. This allows ALINT engine to resolve correctly reset signals that are synchronized with a clock, resulting in the elimination of false violations from reset-dependent rules. The reset synchronizer is a circuit, that releases the asynchronous reset signal to inactive state with a delay after active edge of the clock signal. The circuit of reset synchronizer is shown in Figure 1.

Figure 1. Reset synchronization circuit The synchronized reset signal eliminates metastability problems that may be caused by a violation of the setup and hold time conditions if the asynchronous reset signal is used. The reset synchronization circuits are transparent for global reset signals. (This means that if a global reset is connected to a reset synchronization circuit then the output of the reset synchronization circuit is also treated as a global reset). See the Reset Synchronization Circuit section for details. (SPT49314)

Rule Plug-ins

ALDEC New ALDEC_VHDL.2311 rule is implemented. It verifies that all process statements are preceded by a comment. (SPT50539) New ALDEC_VHDL.3311 and ALDEC_VLOG.3311 rules are implemented. These rules confirm that all flip-flops have a reset signal. (SPT60240)

STARC SKIP_ENUMERATION parameter is added to STARC_VHDL.2.8.1.4 rule checker. It allows skipping case statements that have case expression of user-defined enumeration type. (SPT49757)

ALINT

Release Notes for ALINT 2010.10 SR1

MAX_NAME_LENGTH parameter is added to STARC_VHDL.1.1.1.9 and STARC_VLOG.1.1.1.9 rule checkers. It defines the maximum number of characters for the design unit and port names. (SPT51191) RESET_TYPE parameter is added to STARC_VHDL.2.3.6.1 and STARC_VLOG.2.3.6.1 rule checkers. It specifies what kind of reset signals are checked. (SPT60241)

FPGA Vendor Primitives Support


Simplified handling is now supported for following Altera libraries: altera_lnsim, arriaiigz, arriaiigz_hssi, arriaiigz_pcie_hip, cycloneiv, cycloneiv_hssi, cycloneiv_pcie_hip, hardcopyiv_hssi, hardcopyiv_pcie_hip, maxv, ovi_altera_lnsim, ovi_arriaiigz, ovi_arriaiigz_hssi, ovi_arriaiigz_pcie_hip, ovi_cycloneiv, ovi_cycloneiv_hssi, ovi_cycloneiv_pcie_hip, ovi_hardcopyiv_hssi, ovi_hardcopyiv_pcie_hip, ovi_maxv, ovi_stratixv, ovi_stratixv_hssi, ovi_stratixv_pcie_hip, stratixv, stratixv_hssi, stratixv_pcie_hip. (SPT51139)

Problems corrected in ALINT 2010.10 SR1

VHDL Engine
Unexpected warning message was issued at the elaboration-time stage when several VHDL files were analyzed with reordering enabled. (SPT51004) Incorrect synthesis results were generated when a loop variable was used in a bit or slice select of a two-dimensional array signal. (SPT51123) Previously, global clock and reset signals were not detected properly when architecture was larger than 10000 lines. A false warning message was issued on such architecture. (SPT51097, SPT50891) Previously, an irrelevant warning message about compilation without -dbg switch was reported when -acom or -alog macro command was used to compile a VHDL or Verilog file correspondingly. (SPT51236) Incorrect synthesis results were inferred on for loops with array references depending on loop variable. (SPT51244) Internal compiler error was reported when more than 70000 comment lines were present before VHDL design entity. (SPT51245)

Verilog Engine
Previously, an incorrect elaboration-time error was reported if named block nested in the generate statement was present deep in the design hierarchy. (SPT50965)

FPGA Vendor Primitives Support


Previously, false violations were issued on the protected design units from vendor library. Protected design units have all information about inner structure encrypted and so cannot be checked by ALINT. Now the protected design units are automatically skipped. This eliminates false violations from various checkers. (SPT60292)

ALINT

Release Notes for ALINT 2010.10 SR1

Graphical User Interface (GUI)

Framework The following macro commands are properly handled now (SPT60268): alintId alintVersion alintVersionString Previously, an error was generated if a file name containing space was passed to the alint command. A file name shall be enclosed in double quotes or braces to be passed to alint command. (SPT60304)

Flow Manager Now predefined flow template does not depend on the Policy directories option of the Tools | Preferences | Linting | Entries category. Entries that point to the flow template policies are no longer included into the Policy directories option by default. (SPT50371)

GUI Preferences Previously, the list of available policy paths in the Policy Directories category of the Design Properties | Linting | Entries section was not updated properly. No changes were displayed when the policy path list was modified, until the dialog is reopened. (SPT51190)

Policy Editor Previously, when the Configure Rule option was used to modify rule parameters, the focus was set to the top of the Policy Contents section. Now focus is set to the corresponding node in the Rule Configuration section. (SPT51193)

Violation Database Now AVDB file is properly updated when -alint_skipunit argument was changed between linting sessions. (SPT50669) Unhandled exception was issued on saving changes in the AVDB file attached to the flow phase after violation status was changed and flow was re-executed. This was a Linux specific problem. (SPT50952)

HTML report Now the sources of the HTML report are saved to the directory named <html_report_name>_files instead of <html_report_name> files. Space characters used in the directories naming caused problems when

ALINT
ALINT was used on Linux platform. (SPT51194)

Release Notes for ALINT 2010.10 SR1

Rule Plug-ins

STARC False STARC_VHDL.3.3.3.2, STARC_VLOG.3.3.3.2, STARC_VHDL.2.3.5.1 and STARC_VLOG.2.3.5.1 rule violations occurred if a multiplexer with constants only mapped to its inputs was connected to a flip-flop data input. (SPT49317) Previously, a crash occurred when STARC_VHDL.1.6.1.4 rule checker was turned off/on with a pragma macro comment. (SPT50840)

ALDEC Now there is no ALDEC_VHDL.2305 rule violation on empty package body. Empty package bodies are created for packages that contain constants and type declarations only. (SPT49339) Previously, no ALDEC_VLOG.7001 and ALDEC_VHDL.7001 rule violations were issued when a flip-flop in one clock domain received data from the other clock domain through synchronous controls (set, reset or enable). (SPT50262) False violations were reported by ALDEC_VHDL.2151 and ALDEC_VHDL.2201 rules if bit or slice select was used in the port association list, and it's index depended on a generate loop variable. (SPT50523)

User Defined Rules


Previously, incorrect source point was passed to the lexical callback functions in case when several VHDL files were compiled in one compilation session. (SPT50345)

Documentation
Typos in ALDEC and STARC rule descriptions (ALDEC_VHDL.2303, ALDEC_VLOG.2303, STARC_VHDL.2.1.3.2, STARC_VHDL.1.1.1.8) were fixed. (SPT49791) The description of the STARC_VHDL.3.5.3.3 rule was extended. Examples for this rule now reflect the checker behavior properly. (SPT50546) Nonexistent rules (RMM.5.3.1.1, RMM.5.3.1.2, RMM.5.2.1.11) were removed from the Overview table of the RMM plug-in. These rules were added by a mistake. (SPT50765) The obsolete title of the DO254_VHDL.1312 rule checker was updated in the DO-254 VHDL Plug-in Overview table. (SPT50785) The titles of STARC_VHDL.2.7.1.3 and STARC_VLOG.2.7.1.3 rule checkers were updated. (SPT60215)

Reaching Technical Support

ALINT

Release Notes for ALINT 2010.10 SR1

To open a Technical Support Case, users with a valid Maintenance Agreement should visit http://support.aldec.com/ContactSupport/. Please note, you will be asked to register if you have not already.

Introduction

Starting ALINT
ALINT is offered on various platforms and can be started either in the GUI or batch mode.

Starting ALINT on Linux


ALINT and tools included in the ALINT suite can be started either with the run* scripts located in the installation directory or by running programs located in the bin/ subdirectory of the installation directory.

Using run* Scripts from the Installation Directory The two most important scripts in the installation directory are runalint and runalintcon. The first script starts ALINT graphical interface, the other runs ALINT in the command line mode. You can run the script either by typing its name in a terminal window or by clicking on it in a file manager. (A single or a double click is required, depending on your desktop configuration.) The installer does not place any shortcuts on the desktop or in the Start menu. Other script located in the installation directory allows you to run the license diagnostic utility (runlicensediagnostics). Arguments passed to a run* script on the command line (if any) are always passed to the executable started by the script. (For example, arguments passed to the runalintcon script are passed to the alintcon executable.)

Programs from the bin/ Subdirectory Instead of starting ALINT with the run* scripts from the installation directory, you can directly invoke programs from the bin/ subdirectory. This applies both to the alint and alintcon programs (see alint/alintcon Programs) and other programs from the bin/ subdirectory (see Other Programs from the bin/ Subdirectory).

Starting ALINT on Windows


ALINT can run on the Windows platform either in the GUI (ALINT) or command-line mode (ALINT Console). The program can be started by using shortcut icons available in the Start menu or pre-installed scripts loading the program.

ALINT
Starting ALINT from GUI

Introduction

The installation program facilitates launching ALINT by creating the program group with the shortcut icons in Start | All Programs | Aldec ALINT <version> (Windows XP/Vista) menu. The installation program also adds the icons to your desktop. The icons allow starting ALINT either in the GUI or interactive command-line mode. Clicking on the ALINT <version> icon runs the program in the GUI mode. Before ALINT starts, the environment variables are set. They define an environment for the license server, the compilers, the location of system libraries, and other tools and applications that could be run directly from the ALINT GUI. After the environment is set, ALINT starts. Clicking on the ALINT <version> Console icon runs the program in the interactive command-line mode. Before the ALINT Console window brings up, the environment variables are set. Once the environment is configured, ALINT Console runs in the interactive mode. Such a mode allows you to manually execute commands or scripts and control the entire process of linting including the moment when your session is terminated (ALINT Console will not close automatically when a sequence of commands terminates).

Using run*.bat Files from the Installation Directory ALINT and ALINT Console can be also started from the cmd.exe prompt. Executing the runalint.bat file is equivalent to using the ALINT <version> shortcut in the Start menu and starts ALINT in the GUI mode. Executing runalintcon.bat is equivalent to using ALINT <version> Console shortcut. The content of each script file is as follows: rungui.bat call "C:\Aldec\ALINT-<version>\etc\setenv.bat" start "ALINT" "%VSIMSABIN%\alint.exe" %* runvsimsa.bat call "C:\Aldec\ALINT-<version>\etc\setenv.bat" "%VSIMSABIN%\alintcon.exe" %* Before the programs start, the etc/setenv.bat script is called. It sets the variables required to configure the working environment and run the program. Arguments passed to a run*.bat file on the command line (if any) are always passed to the executable started by the batch file. (For example, arguments passed to the runalintcon.bat file are passed to the alintcon.exe executable.)

Programs from the bin/ Subdirectory Instead of starting ALINT with the run*.bat files from the installation directory, you can directly invoke programs from the bin/ subdirectory. This applies both to the alint and alintcon programs (see alint/alintcon Programs) and other programs from the bin/ subdirectory (see Other Programs from the bin/ Subdirectory).

ALINT

Introduction

Programs from the bin Subdirectory


Instead of starting ALINT with the run* scripts (Linux) or run*.bat files (Windows) from the installation directory, you can directly invoke programs from the bin/ subdirectory. This option can be very convenient, provided that the bin/ subdirectory is added to the $PATH (Linux) or %PATH% (Windows) environment variable. Under Linux, you can adjust the $PATH variable and other environment settings by editing configuration files of your shell. For more information, see the Post Installation Setup section in the Installation and Licensing section. Under Windows, the installer prompts whether the %PATH% variable should be updated. If you did not update the environment during installation, you can do it manually by using the Control Panel. If the environment is properly configured (and the bin/ subdirectory of the installation directory is added to the PATH variable), you can start ALINT by typing the name of the program at the prompt in a terminal (Linux) or the cmd.exe window. To start ALINT GUI, type: alint To start ALINT in the command line mode, type: alintcon For information on command-line options, see alint/alintcon Programs. You can also start ALINT by running the vlint program. By default, vlint starts the GUI. When used with the -c switch, the program starts the command line mode. Unlike the alint and alintcon programs, the vlint program accepts all linting-related options and can start linting process. For more information, see the description of the vlint command. Other programs located in the bin/ subdirectory include: ALINT commands related to library management and compilation. (See Commands Available at the OS Prompt.) Program to run the license diagnostic utility (licensediagnose).

ALINT

Introduction

alint/alintcon program
Starts ALINT in the GUI (alint) or batch mode (alintcon), respectively. Syntax alint [-log] [-quiet] [-nosplash] [-encoding <encoding>] [-l <logfile>] [-do <macro> [<arguments>] | <"commands">] or alintcon [-log] [-encoding <encoding>] [-l <logfile>] [-do <macro> [<arguments>] | <"commands">] Arguments -help Displays the help information for the program. -log Creates the alint.log (ALINT) or alintcon.log (ALINT Console) log file while starting the program. The files can be generated for the diagnostic purposes and they can contain debugging information useful when troubleshooting the program, e.g. the process of the program startup. By default, the log files are created in the user home directory. Table 1 lists the default locations for the log files. Table 1 Operating System Linux Windows XP Windows Vista /home/<user_account_name> C:\Documents and Settings\<user_account_name>\Application Data\Aldec\ALINT\<version>\log C:\Users\<user_account_name>\AppData\Roaming\Aldec\ALINT\<version>\log Log Directory

-quiet Runs ALINT in the quiet mode. No message boxes are displayed when this mode is on. Available for the alint program only. -nosplash Prevents displaying the splash screen at application startup. Available for the alint program only. -encoding <encoding> Allows setting or changing text encoding. The following encodings are supported: Apple Roman

10

ALINT
Big5 Big5-HKSCS EUC-JP EUC-KR GB18030-0 IBM 850 IBM 866 IBM 874 ISO 2022-JP ISO 8859-1 to 10 ISO 8859-13 to 16 Iscii-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, and Tml JIS X 0201 JIS X 0208 KOI8-R KOI8-U MuleLao-1 ROMAN8 Shift-JIS TIS-620 TSCII UTF-8 UTF-16 UTF-16BE UTF-16LE UTF-32 UTF-32BE UTF-32LE Windows-1250 to 1258 WINSAMI2

Introduction

When this switch is omitted, the ASCII character set is used. Specifying -encoding system causes that the setting of text encoding is inherited from the preferences of your operating system. If the name of the encoding contains the space character(s), it should be enclosed with the double quotes, e.g. -encoding "IBM 850". -l <logfile> Enables the echoing of messages printed to the Console window to an external log file specified by the <logfile> argument. The messages are printed to the file until: The end of the program session The following command is issued: transcript file -close <logfile>

11

ALINT

Introduction
If you disable the echoing by using the transcript command when the program is running, you can re-enable it only issuing the following command: transcript file <logfile> The command enables the echoing of messages but the previously used log file will be overwritten. If you want to append subsequent messages to the existing log file, you should issue the following command: transcript file -append <logfile>

-do <macro> [<arguments>] | <"commands"> Runs a macro file or executes macro commands after GUI (alint) or command line (alintcon) starts. The first word following the -do switch is assumed to be the name of a macro. If no such macro exists in the file system, then the program treats the string following the -do switch as a command sequence. If a command sequence is specified, then it should be enclosed in quotes so that it is visible to the alint/alintcon programs as one string. Multiple commands should be delimited with semicolons, in accordance with Tcl syntax rules. If the OS shell supports it, you can also separate commands with new lines. If the string following the -do switch is determined to be a macro, then all words following the macro are assumed to be macro arguments and can be accessed inside the macro as variables $1, $2, .... The -do switch followed by a macro and, optionally, macro arguments must be the last switch on the command line.

12

ALINT

Introduction

Batch Mode
By default, the alintcon program starts in the interactive mode. In this mode, you can enter commands from the keyboard and the simulator prints messages to STDOUT, i.e. the built-in Console. When the linting engine output is redirected to a file, the mode of operation changes from interactive to batch. In the batch mode you cannot enter commands interactively. Instead, you can specify a macro to execute (with optional arguments). In the example below, the runalintcon script is followed by the -do runme.do argument specifying the name of the macro to execute; the output of the program is redirected to file lint.log using the greater than (>) character. runalintcon -do runme.do > lint.log Note that it is the redirection (not the -do argument followed by a macro) that is responsible for switching the mode of operation from interactive to batch. In the batch mode, the alintcon program terminates when the execution of the macro completes. The program will also terminate if an error is encountered during macro execution. This is different from the interactive mode where the alintcon program stops at a prompt allowing you to enter commands interactively; the program will exit only when command bye/exit/quit is encountered during macro execution (or entered interactively at the prompt).

13

ALINT

Introduction

Supported Standards

VHDL
The requirements of IEEE Std 1076-1993 and IEEE Std 1076-2002 standards are supported by ALINT engine. Refer to the VHDL Versions topic or the VHDL Reference Guide (Help | VHDL Reference) for additional information. For details about newly supported constructs, refer to the What's New in this Release section in the Release Notes.

Verilog
The requirements of IEEE Std 1364-1995, IEEE Std 1364-2001 and IEEE Std 1364-2005 standards are supported by ALINT engine. For additional information, refer to the Verilog Compilation chapter in the User's Guide or the Verilog Reference Guide (Help | Verilog Reference).

14

ALINT

Introduction

ALINT Tools and Applications


ALINT components are either embedded or integrated with the graphical environment referred to as the framework or they can be started as the stand-alone applications. Except for the compilers, each ALINT tool is implemented in a separate window. The tables 1 and 2 provide a brief description of ALINT tools and applications. Table 1 lists ALINT design management tools. Table 1: ALINT Tool Console Description The Console is the basic input-output device. The compilers and other ALINT-integrated tools print their output to the Console. You can also use this window to enter and execute macro commands. The Configuration Manager is a tool that allows you to create and manage the configurations for designs and workspaces. A workspace/design configuration is a set of options for compilation sessions performed in the GUI of ALINT. The Design Manager is a tool that allows viewing, managing, and controlling workspaces, attached designs and their resources. The File Browser displays the contents of the current working directory along with its subdirectories. It allows loading source files into the HDL Editor, executing macros, renaming and deleting files, etc. The tool can also be used for navigating the file system and changing the current working directory. The Library Manager facilitates library management in the ALINT environment. The tool displays a linked list of libraries visible from the current directory. The Quick Launch Panel is a wizard that helps to manage linting process easily. It is implemented as a separate window that appears on the left side of the framework on the first launch.

Configuration Manager

Design Manager

File Browser

Library Manager

Quick Launch Panel

Table 2 lists design entry and debugging tools. Table 2: ALINT Viewer/Editor/Window HDL Editor Rule Plug-in Viewer Rule Description Viewer Configuration Viewer Ruleset Editor Policy Editor Description The HDL Editor is a built-in text editor used both for source code editing and source code debugging. The Rule Plug-in Viewer displays the content of currently loaded ALINT rule plug-ins. The Rule Description Viewer displays short rule description. The Configuration Viewer displays contents of available rulesets and policies. The Ruleset Editor manages ruleset contents. The Policy Editor manages policy content .

15

ALINT
Rule Parameters Editor Violation Viewer

Introduction
The Rule Parameters Editor is a tool for rule parameters modification in a policy. The Violation Viewer displays AVDB file contents (either regular and comparison databases are supported).

16

ALINT

Introduction

HTML Help

Viewing Documentation
Product documentation is located in the documentation/html subdirectory and can be accessed with the Product Help command in the Help menu. ALINT launches an external or embedded HTML browser to show help. The Internal HTML viewer and External HTML viewer options available in the Environment | Documentation category of the Preferences dialog box allows you to specify the viewer for displaying HTML-based on-line documentation delivered with the installation of ALINT. You can also view product help without starting ALINT. To do so, start the HTML browser and load the documentation/html/ug/index.htm file.

Help Engine All modern HTML browsers will display the standard Help layout with the Contents, Index, and Search panes on the left and the actual content on the right. The detailed information about the window panes can be found in the Documentation Window topic. The example browser window displaying the ALINT on-line documentation is shown in the Figure 1.

Figure 1. Product help in the HTML browser.

17

ALINT
The navigation pane with the table of contents uses three icons: The book icons The page icon The circle icons are not linked to any content. always links to an HTML page. link to headers within a page.

Introduction

If the browser window is blank after loading index.htm, make sure that JavaScript is enabled in the browser preferences. This applies to all browsers. Loading the documentation in Internet Explorer requires an ActiveX control. Internet Explorer may display a warning about a security risk and prompt for confirmation. The help engine uses an ActiveX control to load XML files.

Supported Browsers The help engine will work correctly in most modern browsers, as shown in the table below: Browser Internet Explorer (Windows) Mozilla Firefox Netscape Opera Konqueror (Linux) 6.01 and above 1.0 and above 6.0 and above 9 and above 3.5.3 and above Version

Google Chrome currently is not supported. The Help engine relies heavily on advanced JavaScript features which are known to break in pre-release/beta browser versions. Therefore, you should view ALINT help using the release version of your browser of choice.

Viewing Help in the Embedded Viewer ALINT for Windows contains an embedded HTML Viewer that will correctly display the product documentation. To load documentation in the embedded viewer, click the Open HTML Viewer button on the toolbar and then drag the documentation/html/ug/index.htm file from the File Browser to the viewer.

Reference Guides ALINT contains VHDL Reference Guide, Verilog Reference Guide and ALINT API Reference Guide. These guides can be accessed from the Help menu or manually loaded in the browser. The reference guides are not cross-linked with the product help.

18

ALINT

Introduction

Documentation Window
ALINT provides an HTML-based documentation that can be used on any operating system with a browser supporting the DHTML technology. In order to start the ALINT System Help, choose the Product Help option from the Help menu or press the F1 key. The ALINT on-line documentation window is shown in the Figure 1.

Figure 1. The ALINT on-line documentation window. The window displaying the on-line documentation is divided into the following panes. Navigation Pane Contents Pane Index Pane Search Pane Document Area

Navigation Pane The Navigation pane is located in the upper horizontal part of the window. It contains the Contents, Index, and Search tabs and the search area. You can select these tabs in order to switch among the table of contents, index, and search pane (in left part of the window). The search area allows you to enter a word or phrase to find in the on-line documentation. The Clear Highlighted Words button is used for removing light blue word highlighting in the Document area (right-hand part of the window). The Navigation pane is presented in Figure 2.

Figure 2. The Navigation pane.

19

ALINT

Introduction

Contents Pane The Contents pane shows the table of contents. The pages representing individual topics are collected within books that in turn represent categories of help topics. The table of contents includes the books (without contents), pages (HTML files), and page-headings located inside the page. Clicking on the book expands its structure in the table of contents while selecting the page or page-heading opens the topic with corresponding description of ALINT feature (in the right-hand part of the documentation window).

Index Pane The Index pane lists indexed keywords pointing to the topics where those keywords are discussed. Type a word in the Type in the keyword to find field and press the Enter key in order to relocate to a position in the list and display the related topic. When there are multiple topics associated with one index entry, a pop-up menu with the list of found topics will be displayed.

Figure 3. The Index pane.

Search Pane The Search engine of the ALINT documentation allows to search for words and phrases. The Search pane consists of the input field and the area where the found topics are listed. Matching options determine which documents will be found: Word match: abc xyz

20

ALINT

Introduction

Searches for documents containing at least one of the words you type in, including inflected forms. Exact match: "abc xyz" Searches for phrases consisting of several words or exact word forms. Compulsory match: +abc +"abc xyz" Searches for documents that contain ALL words and phrases prefixed with plus symbol. Negative match: -abc -"abc xyz" Excludes pages containing words or phrases written with foregoing minus symbol. Searches for documents that do NOT contain any of the words you type in. Examples: VHDL Verilog +Compilation Shows documents containing 'Compilation' and optionally 'VHDL' and 'Verilog'. "Elaboration-time Linting" -Linux Shows documents containing "Elaboration-time Linting". Documents containing 'Linux' will be excluded. compilation +"-alint_avdb" +comparison Shows documents containing '-alint_avdb' and 'comparison' words and optionally 'compilation' word. The search is started by clicking on the go button or pressing the Enter key on the keyboard. You can also use the search area in the Navigation pane. The search engine results include a list of documents with titles (a link to the page) and a short description showing where the words or phrases have matched content within the topic. The search engine highlights search results in the Search pane with light yellow color. In the right-hand part of the window found words are highlighted with the light blue color. The Clear button on the Search pane clears search results and displays search help under the input field.

21

ALINT

Introduction

Figure 4. The Search pane. NOTE: This version of ALINT uses the standalone external browsers to display the help system pages. Refer to the Supported Browsers section of the Viewing Documentation topic for more information about the applications that can be used to display the on-line documentation in this version of ALINT.

Document Area The Document Area is located in the right part of the window and is used for displaying documents. A line with white links on the black background can help you to navigate in the ALINT documentation. Links refer to the page with the list of subtopics belonging to the same section of the documentation.

22

ALINT
Figure 5. The Document area.

Introduction

The ALINT search engine highlights searched words or phrases in the Document area with light blue color. The Clear Highlighted Words button on the Navigation pane is designed for removing light blue word

highlighting in the Document area. It does not clear search results. To reset search results use the Clear button on the Search pane.

23

User's Guide

Quick Start

Quick Start Overview


Quick Launch Panel located on the right-hand side is designed to assist you with the basic steps:

The detailed description of each step is provided below. Create New Design / Open Existing Design You can either create new or open existing design. Use appropriate option to create new design and add the files you want to check. If you prefer to run design rules checking using script files, refer to the Change Source Directory option. Change Source Directory If you already have a design checking script prepared, just point its location on the hard drive. Compilation-time Linting Linting process is divided into two phases: compile-time phase and elaboration-time phase. Run the first step to check your design for basic rules that do not require knowledge about the design hierarchy. Elaboration-time Linting Advanced data sets are collected during the compilation-time linting session and available once it is completed. Run the elaboration-time linting session to check complicated View results By default, the results of linting session are saved to the .avdb file. This option allows to open the resulting violations database to view the results. The option is grayed out unless at least the compilation-time linting session is completed.

24

ALINT
rules that require parameter values and knowledge about the design hierarchy. Set Linting Options Use this option to specify the variety of settings including what rules should be checked, what parts of the design should be skipped, and in what format the results should be stored.

User's Guide

Advanced section contains additional options, allowing to create custom rules, rulesets, policies and linting flow. See also Whats New in This Release section.

Design Preparation
To start working with ALINT it is necessary to create new design or open an existing one. Design is a collection of individual files (HDL source files, macros, scripts, etc.) It allows grouping and working with a number of files stored even in different locations or shared with other designs. Once you collect all design files, you can add, modify, save, or remove them from an active design, compile sources, execute macros and scripts or finally assign your entire design global settings used during compilation or elaboration.

Create New Design To create new design you should do the following: 1. From the File | New menu open the Design... option. The Create New Design Wizard (see Figure 1) will be opened. 2. Type in design name 3. Select location for design directory (use the Browse button to browse the desired location). If you want to create additional directory for design check in appropriate checkbox. 4. Click the Finish button. Design will be created in the pointed directory

25

ALINT

User's Guide

Figure 1. The Create New Design Wizard window HINT: To create new design quickly you can do the following from the File Browser window: 1. Right-click on the source file folder. 2. From the context menu select the Create Design item. 3. Created design may be observed in the Design Manager with the name as the source folder name.

Import Existing Design To import an existing design you should do the following: 1. From the File | Open menu select the Design... option, you will see the Add design dialog window. 2. Open directory containing the necessary design, select the .rdsn file and open it. Design will be opened.

26

ALINT

User's Guide

Add Libraries

Add library in GUI A pre-compiled library can be easily attached to a design using the Library Manager. The following steps should be performed to do this: 1. Click the Attach Library button. 2. Type a library name in the appropriate edit box. 3. Point the tool to a pre-compiled library file (.lib). Once a library is attached, all the design units from this library can be used in the description. Library files should not be analyzed by ALINT explicitly -- library primitives are recognized automatically once the appropriate library appears in the Library Manager. See the FPGA Vendor Primitives section for details if your design is based on components from an FPGA library. NOTE: The following important options are available in the right-click menu (appears while clicking on a library in the Library Manager): Refresh If a library was compiled using older versions of our software then the Refresh option should be used. A library is automatically recompiled and it becomes possible to use it with current version of ALINT. Make Library Global Library can be set as a global one using the appropriate function in the right-click menu. Once a library is set as global it becomes available in all the designs.

See the following section for instructions on how to create a library manually from the source files.

Add library in the batch mode The following actions are typically performed to make vendor library available in the ALINT framework (refer to the Design Libraries section for details): 1. Set the library name. 2. Register the library (further it will be available during the compilation and appear in the Design Manager). 3. Compile the library source files. NOTE: It is not necessary to run the linting process for vendor library components. It is recommended to compile library source files without linting related switches (see the example below). Sample Macros to Add Vendor Library on Linux

27

ALINT

User's Guide

The below build_lib.bash sample is based on the assumption that the folders xilinx\unisim were created in the %ALINTInstallationDirectory%\vlib directory and the unisim contains the macros to build the library itself and the list of the library source files unisim_vhdl.opt: CompSwitches="$1"

# 1. Set the library name. LibraryLogicalName="unisim"

# 2. Register the library. ../../../bin/vlib -global -t0 $LibraryLogicalName ./unisim.lib if [ $? != 0 ]; then exit -1; fi

# 3. Compile the library source files. ../../../bin/vcom -s ../.. -work $LibraryLogicalName unisim_vhdl.opt if [ $? != 0 ]; then exit 1; fi Sample Macros to Add Vendor Library on Windows The below build_lib.bat sample is based on the assumption that the folders xilinx\unisim were created in the %ALINTInstallationDirectory%\vlib directory and the unisim contains the macros to build the library itself and the list of the library source files unisim_vhdl.opt: set CompSwitches=%1 $CompSwitches -f

# 1. Set the library name. set LibraryLogicalName=unisim

# 2. Register the library. ..\..\..\bin\vlib -global -t0 %LibraryLogicalName% ./unisim.lib if %ERRORLEVEL% NEQ 0 goto vlibError

# 3. Compile the library source files.

28

ALINT
..\..\..\bin\vcom -s ..\.. -work %LibraryLogicalName% unisim_vhdl.opt if %ERRORLEVEL% NEQ 0 goto compilerError

User's Guide
%CompSwitches% -f

set ALDECERRORLEVEL=0 goto Finish

# handle potential exceptions :vlibError echo Error while executing vlib. set ALDECERRORLEVEL=1 goto Finish

:compilerError echo Error while executing compiler. set ALDECERRORLEVEL=1 goto Finish

:otherError echo Error while a command. set ALDECERRORLEVEL=1 goto Finish

:Finish

Set Linting Options


In the most cases, default settings are enough to get started with the software. Besides ready-to-use default settings, ALINT features extensive set of options and properties that can be used for advanced linting engine configuration (general overview is given below, see the General Category for details).

29

ALINT

User's Guide

Local and Global Design Preferences There are two types of preferences: local and global ones. Global Preferences apply to all the designs, but they can be overridden with the Local Preferences whenever it is necessary (see the Setting Preferences chapter for details). Global Preferences can be accessed from the Tools | Preferences menu by selecting the Linting | General option. Local Preferences (see Figure 1) can be accessed for each particular design by selecting the Properties... from the drop-down menu in the Design Manager.

Figure 1. The Local Preferences window

Active Policy Selection Active policy should be selected for the linting session. It can either be chosen from the list of pre-defined policies or created manually (see the Policy Editor description for details on how to create a policy using the GUI, or Policy Configuration Files chapter for policy syntax reference, in case if it is created manually). It is also possible to set policy as active using Configuration Viewer pop-up menu. By default setting, the DEFAULT policy is active (it includes all the available Verilog and VHDL design rules that concern the RTL descriptions).

Reporting Mode Setup The number of reported warnings can either be limited per rule or in total. For example, limiting the number of warnings per rule can be extremely useful while linting large design (allows to quickly face only with several violations of the same type and further decide whether it is necessary to scan the rest of the design for this particular problem). The name of the resulting database with ALINT violations can be changed from the default alint.avdb. It is also possible to choose whether or not to report violations to the Console (being disabled it can speed up the linting process on huge designs with >10K of violations), output text file or .avdb file.

30

ALINT

User's Guide

Clocks, Resets and Blackboxes Specification It is recommended to change these settings in the Local Preferences (design units and signal names may vary depending on particular design). In the Linting | Entries option (see Figure 2), you can specify design clocks, resets and units that should not be analyzed (blackboxes). So using the "Show entries for" drop-down list, the following entries can be specified: design units to skip from checking: list the design units that should be skipped during the linting (for example top.clk_gen) global clock signals (for example, top.clk_gen.CLK_A); global reset signals (for example, top.RST); policy/ruleset search directories (for examples, if a policy is specified by the -alint_policy switch but cannot be detected in the current directory, this policy will be searched in the policy search directories).

Figure 2. The Linting Entries Properties window NOTE: It is possible to exclude certain files from the compilation or just from linting. For more details see Design Manager Section

Run Linting
Linting process is distributed between two sessions: compilation- and elaboration-time linting. Both sessions may be started from the menu Linting.

31

ALINT
Compilation-time Linting Either the whole design or particular set of files can be selected for compilation-time linting:

User's Guide

1. In the Design Manager window right-click on the design(s)/file(s) name. The drop-down menu will appear (see Figure 1). 2. From the drop-down menu select the Compilation-time Linting option. The selected design(s)/file(s) will be compiled.

Figure1. The drop-down menu of the Design manager

Elaboration-time Linting When a design is compiled it is possible to run elaboration-time linting. For that you should do the following: 1. From the Linting menu select the Elaboration-time Linting option. The top-level selection window will appear (see Figure 2). 2. From this window select the top level unit(s). Checking Save choice for active design option sets Top-level design unit option of the design properties and selected unit will be used during all the next sessions of elaboration-time linting. 3. Click the OK button to run linting. The elaboration-time linting progress can be observed in the Console: once it is completed the message about the AVDB file generation will appear.

32

ALINT

User's Guide

Figure 2. The Elaboration-time Linting window It is also possible to lint a design from the Quick Launch Panel window. You can click the Run Linting | Compilation-time button - the compilation-time linting will be performed, or if the design has already been compiled you can click the Run Linting | Elaboration-time button and the elaboration-time linting will be started. NOTE: Top-level module is detected automatically for Verilog designs only. The top-level selection window will appear for VHDL and mixed designs unless Top-level design unit option is not specified.

Analyze the Results


By default, the result of the linting process is an .avdb file (database with reported violations). Once AVDB file is generated, working with violation messages becomes more convenient. Such database may be analyzed using the Violation Viewer, there are several ways to open an .avdb file: 1. From the File | Open menu 2. From the File Browser window 3. From the Design Manager window The database is represented in the following manner (see Figure 1):

33

ALINT

User's Guide

Figure 1. The Violation Viewer window

Cross-probing Double-clicking a violation brings you directly to appropriate place in the source code (see Figure 2):

34

ALINT

User's Guide

Figure 2. Cross-probing: violation in the code For convenient cross-probing process, it is recommended to use the undocking feature: 1. From the violation database click the Undock button (see Figure 1). The Violation Viewer window will be undocked from the ALINT window. 2. In the undocked Violation Viewer window select the violation you want to see in the code and double-click it. The source code file with the marked violation will be opened. Also the violated rule description will be opened in the Rule Description Viewer. 3. Find the convenient position of the undocked Violation Viewer window and enable the Stay on Top button it will allow you to see the code and the violation simultaneously.

Filters You can narrow the list of violations according to certain criteria using filters. For that you should do the following: 1. In the Violation Viewer click the Filters button (see Figure 1)

35

ALINT

User's Guide

2. From the appeared Filters dialog window (see Figure 3) select the criteria and its value to be used as a filter in the Violation Viewer, then click Add Filter button to add the filter to the list 3. Select Severity range using drop-down lists and Rule level using check-boxes 4. Click the Apply button to save filters 5. Click the Reset button to reset filters 6. Click the Hide Filters button to hide the dialog window

Figure 3. The Filters dialog

Violation Statuses You can manage the violations by assigning different statuses to them. The following statuses are available from the drop-down menu (see Figure 1): New Read Fixed Violation is new (not considered yet). Violation is considered. Once selected, the appearance of the object is changed from bold to regular font. Violation is considered and fixed. Once selected, the appearance of the object is changed from regular to stroked through.

36

ALINT
Irrelevant

User's Guide
Violation is considered as not relating to the matter. Once selected, the appearance of the object is changed from regular to grayed.

The default violation status is New. It may be changes to Read, Fixed or Irrelevant by the right-click: it will show the pop-up menu (see Figure 4), listing the available statuses (Read, Fixed or Irrelevant).

Figure 4. The Violation statuses pop-up menu To filter violations according to their status use the appropriate button on the Violation Viewer panel (see Figure 1): to see only violations with the New status to see only violations with the Read status to see only violations with the Fixed status to see only violations with the Irrelevant status NOTE: When filters are applied only filtered violations are exported to the selected format (.txt, .html, .cvs, .avdb).

Flatten/organize button You can organize the violations hierarchy using the Flatten/Organize button (see Figure 1). It allows to show or hide intermediate hierarchy levels (see Figure 5)

37

ALINT

User's Guide

Figure 5..Flatten the violation database structure

Figure 6. Organize the violation database structure

Export to Other Formats AVDB file contents may be saved either as text, or CSV or HTML report and also saved to another AVDB file. It may be done both for the entire file or for the part of it. The drop-down button of the Violation Viewer toolbar suggests GUI options to make an AVDB file export (see Violation Viewer section for details). This actions are also possible using following commands: avdb2txt command to print filtered subset of violations in desired order, avdb2html - to generate HTML report, avdb2csv - to generate CSV spreadsheet report, avdbcopy - to generate another AVDB file.

38

ALINT
AVDB Files Comparison The resulting AVDB file can be compared to another AVDB file:

User's Guide

1. Select the Linting | Compare AVDB Files ... menu item; the AVDB Compare dialog window will appear (see Figure 7). 2. Press More Options button to select appropriate options (filters, files to compare, etc.).

Figure 7. The AVDB Compare dialog window

39

ALINT

User's Guide

Framework Basics

Design and Workspaces

What is a Workspace?

ALINT allows collecting both individual designs and their resources (source files, etc.) into group of projects referred to as a workspace. A workspace allows working with several projects simultaneously since it acts as a container for ALINT designs. Once you collect all the designs and define your working environment, you can manage all the attached designs, switch between them, set active design, set compilation options individually for each design, merge subsequent designs in order to build a top-level project employing design partitions, etc. A workspace can contain one or more designs, however, their names must be unique within one workspace. It means that you will not be able to add designs of the same name to the same workspace. To create a workspace select the Workspace command from the File | New menu. The workspace definition is stored in the workspace file (.rwsp) that contains information about all the designs attached to the workspace (including physical paths to design description files (.rdsn) representing individual projects). To open an existing workspace select the Workspace option from the File | Open menu. To close a workspace use the Workspace command from the File | Close menu. Once a workspace is loaded, you can view and modify its structure using the Design Manager. For the additional information on performing design operations, refer to the Basic Workspace and Design Operations topic.

Workspace Configuration You can also configure your workspace, i.e. you can define compilation options individually for each design or the entire workspace, specify where linting results of individual designs will be saved, what kind of additional reports (plain text report, AVDB) will be created during the linting, etc. A workspace configuration is based on the design properties specified individually for each member of your workspace. To modify a workspace configuration run the Configuration Manager from the context menu of the workspace object in the Design Manager window.

What is a Design?

ALINT allows collecting individual files (HDL source files, macros, scripts, etc.) into a collection of project resources referred to as a design. A design allows grouping and working with a number of files being a part of a project although it may contain resources stored in different locations or even shared with other projects. Once you collect all design files, you can add, modify, save, or remove them from an active design, compile sources, execute macros and scripts or finally assign your entire design global settings used during compilation or elaboration.

40

ALINT

User's Guide

A design can be a part of a workspace and within its boundaries you can work with an unlimited number of designs. However, designs should be attached to the same workspace. Besides using the same design names within the same workspace is not allowed. ALINT allows you to work with one workspace at a time. The design you are currently working with (e.g. you are going to lint it) is referred to as an active design. You can change active designs in ALINT until the workspace is closed. To create a design select the Design command from the File | New menu. Design definition is stored in the design file (.rdsn) that contains information about all the project settings and files attached to the design To open an existing design select the Design option from the File | Open menu. Once the design is loaded, you can view and modify design structure using the Design Manager. For the additional information on performing design operations, refer to the Basic Workspace and Design Operations topic.

Benefits of Workspaces and Designs

The ALINT users can benefit from the following features when using workspaces and designs:

Workspace Workspace can contain one or more designs. Designs within workspace can be linted all at once (all the files in all designs, except for the excluded ones). It is also possible to lint single file, all files in design, all designs, and finally all the primary designs and after that other designs which depend on the primary designs. Workspace allows switching between designs. Both working directory and working library are set automatically. Existing designs stored previously in separate locations can be combined logically into workspace representing top-level of a hierarchical project. There is no need to copy individual designs to a workspace folder. The workspace configuration allows defining linting settings for the entire workspace. There is default workspace configurations - Alint. You can use default settings of pre-defined configuration or customize options for individual designs.

Design Design allows grouping and working with number of files (HDL source files, output files with linting results, macros, scripts, etc.) stored in different locations, there is no need to copy them to a local directory. Design allows to set common options for all the sources included to linting. ALINT allows to set an active design. It automatically sets an active working library associated with this design. If two or more designs were created in the same folder, the Library Manager shows all the libraries connected with the designs, but only one pair is selected as working one. If designs are created in different folders, then setting an active design results in showing only one library in the Library Manager window.

41

ALINT

User's Guide

Dependences between designs allow to set proper compilation order for all the projects attached to the workspace.

Design Libraries

Design library in ALINT is a repository of compiled design units. All units must be compiled before design can be elaborated. Each library can store units resulting from compilation the VHDL entities or the Verilog modules. By default ALINT design is assigned to one library. When a new design is created, ALINT automatically creates a library that then is set as an active library. Such library is always mapped with the name inherited from the design name. Active design library is created in the same location as the .rdsn design file, i.e. in the directory defined by the $dsn variable. The name of the current working (active) library is defined by the $worklib variable. If a design uses several libraries and several configurations were specified for the workspace, then it is possible to associate an active library with Workspace Configuration. When the current configuration is changed ALINT also automatically sets new working library.

Design Dependencies

ALINT allows defining dependencies between multiple designs within a workspace. Dependencies can be defined in the Design Manager window when the workspace is loaded. Once they are specified, the workspace/design compilation order is also defined implicitly. When you intend to run compilation of the entire workspace, ALINT enables two kinds of dependencies among designs being compiled: Dependency between the selected design and other projects that are dependent on the design. Running the compilation process with this type of design relations first starts compilation of the selected project and when it is completed successfully then other designs are compiled. In order to compile designs in this order, choose the Compilation-time Linting with Dependencies | Selected and Dependent Design(s) option from the context menu of the design objects displayed in the Design Manager window. Dependency between the selected design and other designs that the current design is dependent on. When you start compiling designs by using such variant of dependency, the selected design compilation is preceded by the compilation of related projects. The compilation of the selected design starts after the other projects have been compiled successfully. The workspace can be compiled in this order when the Compilation-time Linting with Dependencies | Selected and Referred Design(s) option is selected. You can define the design dependencies in the Dependencies window. In order to open this dialog box, choose the Dependencies option from the context menu of the workspace or design object displayed in the Design Manager window. The Dependencies window lists all the designs attached to the workspace in the form of a symbolic structure representing associations among individual designs. Each tree-based structure shows dependency between the selected design and other designs. The structure of each dependency tree consists of parent design and child design(s). Design dependencies resulting from user-defined structure affect the order the designs compilation when the workspace compilation is run.

42

ALINT

User's Guide

Note however that the compilation of the top design is always preceded by the compilation of the designs representing branches of the dependency tree. In order to guarantee that all the designs within a workspace may have their dependencies properly defined, the Dependencies window always lists as many dependency structures as designs attached to the workspace. Thus, every design can be set as parent only once (in its own structure; in other structures the branch representing this design is grayed out) but at the same time it can be selected as dependent (child) design in any branch of remaining structures. If you open the Dependencies window and work with several designs, you can change items in the window and specify both design dependencies for the workspace and file dependencies in any design.

File Dependencies

ALINT allows defining dependencies between files within design. Dependencies can be defined in the Design Manager window when a design is loaded. Once they are specified, the source file compilation order is also defined implicitly. When you intend to compile files, ALINT enables two kinds of dependencies among the sources: Dependency between the selected file and other sources that are dependent on it. Running the compilation process with this type of file relations first starts compilation of the selected file and when it completes successfully other sources are compiled. In order to compile the files in this order, choose the Compilation-time Linting with Dependencies | Selected and Dependent File(s) option from the context menu of the file displayed in the Design Manager window. Dependency between the selected file and other sources that this file is dependent on. When you start compiling files by using such variant of dependency, compilation of the selected file is preceded by compilation of related sources. The compilation of the selected file starts provided that other sources have been compiled successfully. The files can be compiled in this order when the Compilation-time Linting with Dependencies | Selected and Referred File(s) option is selected. You can define file dependencies in the Dependencies window. In order to open this dialog box, choose the File Dependencies option from the context menu of the file displayed in the Design Manager window. The Dependencies window lists all the files attached to the active design that can be associated with the selected file. Each dependency list consists of parent file (the one you have selected) and child file(s). Dependencies resulting from user-defined selection affect the order the files will be compiled. Note however that the compilation of a parent file is always preceded by the compilation of a child files. In order to guarantee that all the file dependencies are properly defined, the Dependencies window controls file associations and prevents recent parent files from being set on as dependent later. If you specify several dependency groups, checkboxes of the files that were parents in one dependency will be grayed out in another. If you open the Dependencies window and work with several designs, you can change items in the window and specify both file dependencies in any design and design dependencies for the workspace.

43

ALINT
Compilation-time Linting

User's Guide

ALINT allows running compilation-time linting for projects that can be either a formal collection of (re)source files forming a design (files can reside in one or more locations) or a set of files stored in a user-defined design directory. Both forms of resource organization are allowed, however working with designs is more efficient in large design containing hundreds of files. ALINT provides GUI tool that can be used for project management. The Design Manager allows creating and managing workspaces and designs, running compilation-time linting for source files. When you work with a design, the information about the working directory, library, and project sources is stored in the design file (.rdsn). This file is updated whenever the design or its settings are modified. Compilation-time linting may be run in 2 ways: In the command line:. using the acom or alog macro command or the design.file.compile command. The former allows you to customize parameters of compilation by specifying optional arguments while the latter compiles files with the settings specified in the '<design_name>' Properties window. In the GUI: using the Compilation-time Linting option, i.e. from the context menu in the Design Manager window. The source file must be included in compilation-time linting. NOTE: regardless the linting launching method, current working directory for the ALINT engine is pointed by the $dsn variable that is updated whenever you change an active design, i.e. the design that you are currently working with. The $dsn variable is not updated automatically when no workspace is loaded. When you work with a workspace containing several designs, compilation-time linting can be run for the entire design (Compilation-time Linting ) or for the selected files that belong to each design. You can also run linting for the entire workspace (Compilation-time Linting: Workspace ). The run linting commands are available in the context menu of the design or workspace object presented in the Design Manager window. Alternatively, the design.compile and workspace.compile commands can be used. If you want to run compilation-time linting for individual source files stored in design directory without loading any workspace, you can use the command line. For more information refer to the Compiling with acom and Compiling with alog topics. For the general information about the compilation in VHDL and Verilog refer to the VHDL Compilation and Verilog Compilation chapters, respectively.

Compilation-time linting Options Options for ALINT environment are stored in the Linting category of the Preferences dialog box. When you work with designs, compilation-time options are stored in the '<design_name>' properties window (default design settings are inherited from the global preferences during the design creation). They can be customized for individual designs. Otherwise, settings specified in this dialog box can be used as default only while run linting for a source file loaded to the HDL Editor. Alternatively, you can run compilation-time linting in the command line using the acom or alog commands. For more information on specifying design settings refer to the Setting Design Preferences topic.

44

ALINT
Setting Preferences

User's Guide

Global environment settings for ALINT are defined in the Preferences dialog box (Tools | Preferences). Properties specified in this dialog box can be used as default while working with individual files (i.e. when you do not work with workspace and design). They can also be inherited while creating a new design and then customized for individual workspace project . The following categories of global preferences are available in the Preferences dialog box: Environment Linting Tools The properties specified in the Compilation and Linting categories can be customized globally for the ALINT environment or individual designs of your workspace. The remaining categories are environment-specific and they are not accessible from the design level.

Global Preferences vs. Design Preferences When you do not work with workspaces and designs, the linting settings are read by ALINT directly from the global preferences defined in the Preferences dialog box. Otherwise, if you load a workspace containing one or more designs, the settings of each design can be defined individually. By default, when a new design is created, its settings are based on the global preferences. Selecting the Properties option from the context menu of design object displayed in the Design Manager window allows you to change defaults and adapt new settings to project requirements. The '<design_name>' properties dialog box provides the Compilation and Linting categories (the remaining categories are available in the global preferences) that enable the same set of options as the Preferences dialog box. By default the check boxes located on the right side of the dialog box are selected, which means that the local (design) settings are inherited from the global preferences. If you need to change defaults, you should clear appropriate check box(es) on the right side and specify the set of properties by using the enabled controls. However, any changes in the compilation or linting settings introduced in the '<design_name>' properties dialog box are saved to the design file (.rdsn) after the File | Save Workspace command is executed.

Configurations

ALINT is equipped with pre-defined set of options for compilation and elaboration sessions in the GUI mode. A group of such session-specific settings is referred to as Configuration. Configuration can be specified for a design or a workspace. A set of session-specific settings defined for a design is referred to as Design Configuration. As you can work with many designs within a workspace, you can mix Design Configurations, which in consequence results in creation of combination of settings that can be used for the workspace. A set of the design-specific configurations is referred to as Workspace Configuration. The Workspace and Design Configurations can be used when a workspace is loaded. ALINT provides the Configuration Manager for creating and managing workspace and design configurations.

45

ALINT
Workspace Configurations

User's Guide

A Workspace Configuration is a set of the selected active Design Configurations. When you work with several designs, you may need to run compilation and/or elaboration of individual designs with different settings, generate design-specific reports, or run additional design tools producing auxiliary data used then to analyze or optimizing your design. ALINT offers alint pre-defined Workspace Configuration. You can also create new Workspace Configurations and customize a process of designs linting. To create a new configuration you should do the following: 1. From the workspace context menu or from the toolbar of the Design Manager window select the Configuration Manager option 2. Expand the Workspace configuration list box in the Configuration Manager window and select the <Edit...> option 3. Click on the New Configuration option 4. In the Configuration name field enter the name of the new Workspace Configuration . In the Copy settings from list box select a configuration (defined previously); the newly created configuration should copy settings from. Applying changes and closing New Configuration and Edit Design Configuration windows completes the process of the Workspace Configuration creation . New configuration is available in the Workspace configuration list box in the Configuration Manager window. Note that specifying Design Configurations or selecting a Workspace Configuration in this window does not result in setting activity of a configuration for the current workspace. If you want to set a configuration as an active one, you should select it from the pull-down menu in the Design Manager window. Additionally, if there are several libraries attached to a design, you can set an active library separately for each Workspace Configuration.

Design Configurations A Design Configuration is a local user-defined version of the global environment preferences specified in the Preferences window. NOTE: When creating a new design, Design Configuration is an exact copy of settings inherited from the global environment preferences. In ALINT designs can use original (default) global settings during the linting process or they can be customized according to the design requirements. By default the '<design_name>' properties window enables two pre-defined configuration templates representing specific design settings. You can compile and lint projects using the original design properties inherited from the global settings or define your own preferences. If your design requires non-default settings, you can customize and save them as a new Design Configuration. A new configuration should be created and associated with a design in order new settings to take effect during the linting process. To use a user-defined Design Configuration you should do the following: 1. Create new configuration

46

ALINT
2. Select newly created configuration in the '<design_name>' properties window 3. Specify design settings To create New Design Configuration can be created in the Configuration Manager window:

User's Guide

1. Double-click on one of the Design Configurations listed in the Configuration column 2. Expand the pull-down menu and select the <Edit...> option. It will open the Edit Design Configuration window. 3. Click on the New Configuration button and enter the name of the new Design Configuration in the Configuration name field. 4. Apply changes and close the New Configuration and Edit Design Configuration windows The newly created configuration always inherits design settings from one of the existing configurations. You can select it in the Copy settings from list box. The Configuration Manager window displays new configuration in the Configuration column assigned to the project from the Design column. NOTE: Selected Design Configurations are associated with the current Workspace Configuration set in the Workspace configuration list box. Changing this configuration impacts the selection of the Design Configurations. Since each new Design Configuration is based on the settings of one of the existing (usually pre-defined) configurations by default, then when you want to apply a new design options, you need to choose new Design Configuration in the '<design_name>' properties window and then modify project preferences. Closing the window will save the changes in design properties. Design Configuration can be selected from the Design settings for pull-down menu located above the Category pane.

Workspace and Design Operations in GUI

Workspaces and designs can be managed in the ALINT environment using the menu commands and the Design Manager. The Design Manager window facilitates creation and modification of workspaces and designs. It also allows you to view and manage workspaces, attached designs, and their resources.

Creating New Workspace A workspace can be created in 2 ways: Selecting the Workspace command from the File | New menu. Selecting the Create Workspace option from the context menu of the Design Manager window. This options is available in the pop-up menu only if no workspace is loaded. Both methods run the Create New Workspace Wizard that collects basic information required to create new workspace, i.e. workspace name and its location. Additionally, you can also create a workspace in a separate

47

ALINT
folder or create an empty workspace.

User's Guide

If you run the wizard when a workspace is loaded, then current workspace will be closed and new one will be created. NOTE: If you disable the Create Empty Workspace option, the workspace wizard will be followed by the design wizard. This way you can create both new workspace and new design (attached to this workspace) simultaneously.

Opening Existing Workspace Workspace can be loaded in several ways: From the File | Open menu: by selecting the Workspace command. From the context menu of the Design Manager window: by selecting the Open Workspace option. From the File menu or the context menu of the Design Manager window: by selecting the Recent Workspaces command. This option allows opening up to 10 recently loaded workspaces. Alternatively, you can quickly access the list of the recently opened workspaces by clicking on the Recent Workspaces button located on the upper-right corner of the Design Manager window.

The workspace is loaded with all the attached designs. The Library Manager shows libraries attached to the active design.

Creating New Design A new design can be created in several ways: From the File | New menu in the Design Manager window: select the Design command . From the context menu of the Design Manager window: select the Create New Design option. This options is available in the pop-up menu only if no workspace is loaded. From the context menu of the workspace object presented in the Design Manager window: select the Add | New Design option . This options is available only if a workspace is loaded. These methods run the Create New Design Wizard that collects basic information required to create new design, i.e. design name and its location. Additionally, you can also create design in separate folder. Additionally, ALINT allows building design by using: The Create Design option from the context menu of a folder (or its contents) presented in the File Browser window. When this method is selected, the selected folder (along with its contents) is added to the existing workspace as a new design. If no workspace is loaded, it is created along with the new design.

48

ALINT
Adding Existing Design to Workspace Design can be added to workspace by the following actions:

User's Guide

Selecting the Design command from the File | Open menu. The command will automatically add a design to the current workspace. Selecting the Add | Existing Design option from the context menu of the workspace object presented in the Design Manager window. This options is available only if a workspace is loaded.

Adding Files to Design You can add files to the design by the following actions: Selecting the Add | Existing File option from the context menu of the design object presented in the Design Manager window. Selecting the Add | New File option from the context menu of the design object presented in the Design Manager window.

Setting a Design as an Active To set a design as an active you should do the following: From the context menu of the design object presented in the Design Manager window select the Set Design as Active option.

Compiling Design A design can be compiled using: The Compilation-time Linting option from the context menu of the design object presented in the Design Manager window. The Compilation-time Linting with Dependencies option from the context menu of the design object presented in the Design Manager window.

Compiling Workspace A workspace can be compiled by the following: From the context menu of the workspace object presented in the Design Manager window select the Compilation-time Linting option.

49

ALINT
Workspace and Design Operations in Command-line

User's Guide

This section provides an overview of selected operations usually performed while managing workspaces and designs.

Workspace Operations The following workspace-related operations can be performed using the ALINT command line: Creating a workspace: workspace.create <path name> Closing current workspace: workspace.close [-save] Opening existing workspace: workspace.open <path name> <path name> specifies path to the design that you want to open. Opening recent workspace: workspace.recent.<number> <number> specifies the number of the recently opened workspace. Compiling a workspace with previously defined settings. Workspace configurations allow you to define compilation settings for the entire workspace: workspace.compile Manipulating configurations: Creating new configuration based on the current workspace configuration: workspace.configuration.create <configuration name> Removing a configuration workspace.configuration.remove <configuration name> Setting the configuration for the current workspace: workspace.configuration.setactive <configuration name> Manipulating dependencies: workspace.dependencies workspace.dependencies.add <design1> <design2> workspace.dependencies.remove <design1> <design2>

50

ALINT
Manipulating designs: Creating new design in the current workspace: workspace.design.create {<design name>} {<path name>} Adding existing design to the current workspace: workspace.design.add Creating new design in the current workspace: workspace.design.remove <design name> Setting an active design: workspace.design.setactive <design name> Creating a new design in the selected folder: workspace.design.createfromdisk <path name>

User's Guide

If there is a workspace in the specified folder then a new workspace and a new design will be created with the same names as the folder name. ALINT recognizes files in the selected directory and adds them to design. Generating an XML dump with a list of configurations, designs, and design structures: workspace.dump Saving a workspace workspace.save

Design Operations The design-related operations can be performed using the ALINT command line. The compilation arguments passed to the compiler are read from the '<design_name>' properties window. To open the window select the Properties option from the context menu of design object displayed in the Design Manager window. The following operations may be performed: Adding files to the design: design.file.add [-design <design name>] [<path name>] [-design <design name>] specifies name of inactive design that you want to add files to. If you omit this argument, ALINT adds the file to the active design. [<path name>] specifies the path to the files that you want to add to the design. Example: design.file.add -design tutorials Files/Aldec/ALINT/examples/vhdl/blackjack/src/bjack.vhd" Compiling selected files in the design: design.file.compile [-design <design_name>] <file> Compiler uses arguments set in the design properties. "C:/Program

51

ALINT
Compiling designs: Compiling the specified design: design.compile <design name> Compiling the design with dependencies - selected and dependant design(s): design.compilewithdependent <design name> Compile the design with dependencies - selected and referred design(s): design.compilewithreferred <design name> Manipulating directories: Creating new empty subdirectory in the current directory: design.directory.create <directory name> Removing directory: design.directory.remove <directory name> Manipulating files: Creating a new file: design.file.create <file name> Setting file properties:

User's Guide

design.file.property <file name> <property name> [<property value>] You can define absolutely new property for file. If property value is omitted, command displays current value. Example: design.file.property bjack.vhd new_property true Removing file from the design: design.file.remove <file name> Showing design properties window: design.properties [-design <design_name>] <property_page_path> Example: design.properties -design blackjack /compilation/vhdl/advanced Setting design properties design.property <design name> <property name> [<property value>] If a property value is omitted, the command displays current value. Example: design.property compilation/verilog/generate-debug-information true

52

ALINT
Opening the Design Manager window design.view.activate

User's Guide

NOTE: Names of design properties can be found in the *.pref files stored in the \config\preferences subdirectory. Manual editing of the *.pref files is forbidden.

53

ALINT

User's Guide

Design Libraries

Overview

Library in ALINT is a repository of compiled design units. All the design units must be compiled before the linting process can be executed. Each library can store (any mixture of) the following unit types: VHDL configurations, entities and packages Verilog modules and primitives Library units can be listed with the adir command or displayed by the Library Manager (see Library Contents in the Library Manager section) or in the Elaboration-time Linting dialog box.

Library Files

Library on disk consists of number of files. These files are usually stored in separate subdirectory. Library index file with the .lib extension Three files with the .mgf extension. File names start with 0, 1, and 3, for example: 0work.mgf, 1work.mgf, and 3work.mgf Auxiliary files generated by the Verilog compiler Library directory may also contain temporary files generated by compilers. Empty library, i.e. a newly created library or library which content was removed, may consist of .lib file only.

Library Mapping

A set of library files on disk (.lib file, .mgf files, etc) is not visible to the ALINT environment as a library until, it is mapped to a logical name. Compilers, elaborator, macro commands and GUI access libraries via their logical names. A logical name must be mapped to one library index file. An index file can, however, be mapped to many logical names. Library mappings are stored in the library configuration files (library.cfg). Library configuration files should not be edited manually. They are updated automatically by ALINT, whenever it is necessary. For example, when a new library is created (either with the alib command or graphical interface), mapping for that library is inserted automatically to the appropriate library.cfg file (usually library.cfg file in the current working directory). Library mapping in the library.cfg file has the following format. <logical_name> = "<library_index_file>" Possible mapping for library ieee is shown below:

54

ALINT
ieee = "./ieee/ieee.lib"

User's Guide

Location of the library index file (i.e. the file with .lib extension) may be either absolute or relative. The name of the index file may be followed by an optional whitespace and a timestamp. Library mappings may be listed with the alist command or displayed in the Library Manager.

Library Visibility Rules

ALINT reads the list of libraries from the library.cfg file in the current directory. After the current working directory is changed, either with cd command or with GUI, the list of libraries is reread from the library.cfg file in the directory you changed to. If the library.cfg file does not exist in the current directory, the list of libraries is read from the library.cfg file located in the vlib subdirectory of the ALINT installation directory.

Links Besides the library mappings, the library configuration files (library.cfg) may also contain links to the other library.cfg files. Libraries mapped in the library.cfg that is linked to from the current directory are also visible in the current directory. If linked library.cfg file contains links to the other directories, such links are expanded recursively. Cyclic links (A links to B, B links to A) are not allowed. A link to a directory is marked in the library.cfg file with the $INCLUDE entry, for example: $INCLUDE = "C:/Libs/Vendor/library.cfg" Each library.cfg file created by ALINT contains one special $INCLUDE that points to the vlib/ subdirectory of the ALINT installation directory. This automatically inserted entry guarantees that libraries visible from the vlib/ subdirectory (for example the ieee library) are also visible in any other directory. The location of the vlib/ subdirectory is not specified with an absolute path. Instead, the $ALINTCONLIBRARYCFG string is used: It is assumed that the $ALINTCONLIBRARYCFG string points to the vlib/ subdirectory of the currently running copy of ALINT. If you use two versions of ALINT installed in two different locations, each copy of ALINT will use libraries from its own vlib/ subdirectory.

Duplicated Library Names If the same library logical name is mapped in the library.cfg file in the current directory and in some other library.cfg file linked to from the current directory, then the mapping from the current directory is the priority. If a logical name is used in several linked library.cfg files (but not in the library.cfg from the current directory), then mapping from the most recently linked library.cfg file is used. (Library linking order is the same as the order of the corresponding $INCLUDE entries in the library.cfg file.)

Global Libraries

55

ALINT

User's Guide

Libraries visible from the vlib/ subdirectory in the ALINT installation directory, that is libraries mapped in the vlib/library.cfg file or in the library.cfg files linked from the vlib/library.cfg (if any) are global. Such libraries are visible by default from any working directory. The following global libraries are installed by default: aldec (library with various utility routines and interfaces to third party tools) assertions (library required for interoperability between PSL/OVA and VHDL) ieee ieee_proposed std synopsys vital2000 vital95 vl (library required for mixed designs elaboration) vtl (Verification Template Library) vtl_debug (Verification Template Library in debug version)

ALINT assures the visibility of global libraries with the following policies: If there is no library.cfg file in the current directory, the list of libraries is read from the vlib/library.cfg file. When a new library.cfg file is created, a link to the vlib/library.cfg is always inserted in the newly created library.cfg file.

Refreshing Library Contents

Library refreshing is performed on libraries compiled by an older version of ALINT so that those libraries can be used with the current version. Library refreshing is needed if the design libraries format is changed from the subsequent ALINT releases. Such changes are frequently caused by performance optimizations. If the previously compiled libraries are no longer compatible with the current version of ALINT, the design elaboration will fail. The below error message indicates that libraries were created by an older version of the compiler: ELBREAD: Warning: Files created by the old version of the compiler found. ELBREAD: Error: Library 'work' has incompatible format. Recompile all library units. ELBREAD: Error: Elaboration process completed with errors. Before using such library you should update it. It can be done using the refresh functionality available in both the VHDL compiler and the Verilog compiler. To refresh library contents, use the following commands: -- VHDL acom -refresh <library_name> // Verilog alog -refresh <library_name>

56

ALINT

User's Guide

Instead of refreshing library, you can also recompile it from the sources. However, it requires access to all the source files and, possibly, compilation scripts.

Commands for Library Management

This section introduces commands for library management (alib, alist, amap, and adel). For a detailed information on the syntax of the discussed commands, see the command reference section.

Creating a New Library To create a new library, type the following command at the ALINT prompt: alib <pathname> where: <pathname> specifies the library location on the disk. This can be either the name of a directory or the name of the library index file. If only a directory name is specified, ALINT creates the library index file (.lib) inside this directory. The basename of the library index file is the same as the name of the directory and .lib is used as an extension. Instead of specifying the name of the library directory, it is also possible to specify the name of index file (.lib). The name may be preceded with a directory path. The path may be absolute or relative. The name of the directory does not have to be the same as the basename of the library index file.

Setting a Working Library The name of the working library is stored in the worklib variable. Assigning a value to the worklib variable sets the working library. The working library can be set by typing the following command at the ALINT prompt: set worklib <work> In ALINT graphic interface, the working library can be set in the Library Manager. To set the working library, select it in the Library Manager, right-click, and choose the Set as Working Library command from the pop-up menu.

Listing Library Contents To list library units contained within a library, type the following command from ALINT prompt: adir -lib <library_name> where -lib <library_name> specifies the logical name of the library to be listed. To list the contents of the current working library, type: adir

57

ALINT

User's Guide

Deleting a Library Unit In the ALINT Console type the following command: adel [-lib <library_name>] <design_unit> [<arch_name> ...] where: -lib <library_name> specifies the logical name of the library that contains the unit to be deleted. If omitted, the current working library specified by the $worklib variable is assumed. <design_unit> is the name of an entity, package, configuration or module to be deleted. <arch_name> is the name of the architecture to be deleted. If this parameter is specified, the command removes the specified architecture but leaves the entity if there is another architecture associated with the entity. If it is omitted, all architectures of the specified entity along with the entity itself will be deleted. This argument can be used only if the <design_unit> parameter denotes a VHDL entity. For full syntax, see adel command. Examples adel -lib test vc1 structure Removes the architecture structure of the entity vc1 from the library test. adel -lib test vc2 Removes the entity vc2 and all its architectures from the library test. adel auxiliary_pack Removes the package auxiliary_pack from the current working library.

Emptying a Library To remove all units from the library use the following command: adel [-lib <library_name>] -all For full syntax, see adel command. Examples adel -lib bjack -all Removes all units from the bjack library. adel -all Removes all units from the current library.

58

ALINT

User's Guide

Attaching a Library To attach a library means to create a mapping for library files (.lib, .mgf, etc.) that already exist on disk. You can attach libraries that are invisible to ALINT from the current directory (i.e. libraries that have no mapping) or libraries that are already mapped and can be accessed by their logical names. (Note that each physical library can be mapped to many logical names.) To attach a library (i.e. map a logical name into a library index file), type the following command in the ALINT Console: amap <logical_name> <physical_name> where: <logical_name> is logical name of the library to be mapped or remapped <physical_name> is the name of the library index file with a full path and the .lib extension. If you omit the extension, the last section of the path will be interpreted as the directory name and the index file (with the same name as the directory name and the extension .lib) will be searched for inside this directory. If you do not specify the path, the current working directory is assumed. For full syntax, see amap command. Example The following command: amap test /home/designs/test1/test.lib maps logical name test to library index file /home/designs/test1/test.lib.

Detaching a Library To detach a library means to remove the mapping for it without changing the library files (.lib, .mgf, etc.) on disk. To detach a library, use the following command: amap -del <logical_name> where <logical_name> is the logical name of the library to be detached. The above command deletes a logical name mapped to a library, library files remain intact. For full syntax, see amap command. Example The following command: amap -del test detaches a logical library test.

59

ALINT

User's Guide

Listing Mapped Libraries From the ALINT prompt type the following command: alist

Linking Libraries To add a link to libraries mapped in a library.cfg file located elsewhere in the directory tree, use the following command: amap -link <directory_path> Example The following command: amap -link /home/Aldec/ALINT/examples/samples/blackjack_vlog adds a link to a library.cfg file located in the bjack_vlog directory. All libraries visible in the bjack_vlog directory will be now visible in the current directory as well.

Unlinking Libraries To remove a link to libraries mapped in a library.cfg file located elsewhere in the directory tree, use the following command: amap -unlink <directory_path> Example The following command: amap -unlink /home/Aldec/ALINT/examples/samples/blackjack_vlog removes a link to libraries mapped in the library.cfg file located in the bjack_vlog directory. All libraries mapped in the bjack_vlog directory are now accessible in the current directory as well.

60

ALINT

User's Guide

Tcl and Macros

Overview

A macro in ALINT is a set of commands stored in a file, typically with the .do or .tcl extension. Macros can be used to automate tasks that would otherwise require extensive manual labor. They are indispensable in batch mode operations. ALINT executes macros using the Tcl interpreter. The Tcl interpreter is embedded in the application and extended with commands for controlling both the linting engine and the GUI. The embedded Tcl interpreter version number is 8.4.19. This chapter provides a brief introduction to Tcl and its deployment in ALINT. For the list of commands available in ALINT, see the Command Reference chapter.

Executing Macros

The easiest way to execute a Tcl macro is by using the GUI. To run a macro, select it in the Design Manager window or the File Browser window, right-click, and choose Execute from the pop-up menu. The Execute option is available for files with the .do extension as well as .tcl and .tk extensions. You can also run macros by using the Tools | Execute command from the menu. The command displays the Execute Macro dialog box where you can set select the file to execute. The file type filter in the dialog box must be set either to Macro Files (*.do) or Tcl Files (*.tcl, *.tk) depending on the name of the file to execute.

Executing Macros loaded in the HDL Editor If a macro file is loaded in the editor, you can execute it by clicking the Execute Macro button. The HDL Editor also allows you to execute a selected part of a macro. This option comes in very handy for executing only a number of commands from the macro.

The do Command vs the source Command The GUI executes macros by invoking the do command in the background. The do command is a command implemented by ALINT. The Tcl also provides the source command that can also be used for executing macros. Commands do and source differ with respect to the following: It is possible to pass arguments to a macro executed with the do command, for example: do run_test.do quiet test12 The arguments can be accessed inside the macro as variables named $1, $2, .... The source command, when invoked with additional arguments following the name of the macro triggers an error.

61

ALINT

User's Guide

The output of the do command is more verbose than the output of the source command. This is helpful when logging macro execution to a log file. The result of the Tcl info script command differs depending on whether the macro containing info script is executed with the source or do command. If there is an active invocation of the source command, then info script returns the name of the innermost macro evaluated with source. Macros executed with the do command do not affect the result of info script. Given macro run.do with the following contents: puts ">> [info script] <<" the command source run.do will produce >> run.do << If the macro is executed with the do command, then info script will return an empty string resulting in the following output: >> << Note that calls to do and source can be arbitrarily nested. This does not invalidate the rule that info script returns the name of the innermost macro evaluated with source.

Tcl Syntax Basics

The following rules define the syntax and semantics of the Tcl language: 1. Commands A Tcl script is a string containing one or more commands. Semi-colons and newlines are command separators unless quoted as described below. Close brackets are command terminators during command substitution (see below) unless quoted. 2. Evaluation A command is evaluated in two steps. First, the Tcl interpreter breaks the command into words and performs substitutions as described below. These substitutions are performed in the same way for all commands. The first word is used to locate a command procedure to carry out the command, then all of the words of the command are passed to the command procedure. The command procedure is free to interpret each of its words in any way it likes, such as an integer, variable name, list, or Tcl script. Different commands interpret their words differently. 3. Words Words of a command are separated by white space (except for newlines, which are command separators). 4. Double quotes

62

ALINT

User's Guide

If the first character of a word is double-quote (") then the word is terminated by the next double-quote character. If semi-colons, close brackets, or white space characters (including newlines) appear between the quotes then they are treated as ordinary characters and included in the word. Command substitution, variable substitution, and backslash substitution are performed on the characters between the quotes as described below. The double-quotes are not retained as part of the word. 5. Braces If the first character of a word is an open brace ("{") then the word is terminated by the matching close brace ("}"). Braces nest within the word: for each additional open brace there must be an additional close brace (however, if an open brace or close brace within the word is quoted with a backslash then it is not counted in locating the matching close brace). No substitutions are performed on the characters between the braces except for backslash-newline substitutions described below, nor do semi-colons, newlines, close brackets, or white space receive any special interpretation. The word will consist of exactly the characters between the outer braces, not including the braces themselves. 6. Command substitution If a word contains an open bracket ("[") then Tcl performs command substitution. To do this it invokes the Tcl interpreter recursively to process the characters following the open bracket as a Tcl script. The script may contain any number of commands and must be terminated by a close bracket ("]"). The result of the script (i.e. the result of its last command) is substituted into the word in place of the brackets and all of the characters between them. There may be any number of command substitutions in a single word. Command substitution is not performed on words enclosed in braces. 7. Variable substitution If a word contains a dollar-sign ("$") then Tcl performs variable substitution: the dollar-sign and the following characters are replaced in the word by the value of a variable. Variable substitution may take any of the following forms: $name Name is the name of a scalar variable; the name is a sequence of one or more characters that are a letter, digit, underscore, or namespace separators (two or more colons). $name(index) Name gives the name of an array variable and index gives the name of an element within that array. Name must contain only letters, digits, underscores, and namespace separators, and may be an empty string. Command substitutions, variable substitutions, and backslash substitutions are performed on the characters of index. ${name} Name is the name of a scalar variable. It may contain any characters whatsoever except for close braces. There may be any number of variable substitutions in a single word. Variable substitution is not performed on words enclosed in braces. 8. Backslash substitution If a backslash ("\") appears within a word then backslash substitution occurs. In all cases but those described below the backslash is dropped and the following character is treated as an ordinary character and included in the word. This allows characters such as double quotes, close brackets, and dollar signs to be included in words without triggering special processing. The following table lists the backslash sequences that are handled specially, along with the value that replaces each sequence.

63

ALINT
\a Audible alert (bell) (0x7). \b Backspace (0x8). \f Form feed (0xc). \n Newline (0xa). \r Carriage-return (0xd). \t Tab (0x9). \v Vertical tab (0xb). \<newline>whitespace

User's Guide

A single space character replaces the backslash, newline, and all spaces and tabs after the newline. This backslash sequence is unique in that it is replaced in a separate pre-pass before the command is actually parsed. This means that it will be replaced even when it occurs between braces, and the resulting space will be treated as a word separator if it isn't in braces or quotes. \\ Backslash ("\"). \ooo The digits ooo (one, two, or three of them) give an eight-bit octal value for the Unicode character that will be inserted. The upper bits of the Unicode character will be 0. \xhh The hexadecimal digits hh give an eight-bit hexadecimal value for the Unicode character that will be inserted. Any number of hexadecimal digits may be present; however, all but the last two are ignored (the result is always a one-byte quantity). The upper bits of the Unicode character will be 0. \uhhhh The hexadecimal digits hhhh (one, two, three, or four of them) give a sixteen-bit hexadecimal value for the Unicode character that will be inserted.

64

ALINT

User's Guide

Backslash substitution is not performed on words enclosed in braces, except for backslash-newline as described above. 9. Comments If a hash character ("#") appears at a point where Tcl is expecting the first character of the first word of a command, then the hash character and the characters that follow it, up through the next newline, are treated as a comment and ignored. The comment character only has significance when it appears at the beginning of a command. 10. Order of substitution Each character is processed exactly once by the Tcl interpreter as part of creating the words of a command. For example, if variable substitution occurs then no further substitutions are performed on the value of the variable; the value is inserted into the word verbatim. If command substitution occurs then the nested command is processed entirely by the recursive call to the Tcl interpreter; no substitutions are performed before making the recursive call and no additional substitutions are performed on the result of the nested script. Substitutions take place from left to right, and each substitution is evaluated completely before attempting to evaluate the next. Thus, a sequence like set y [set x 0][incr x][incr x] will always set the variable y to the value, 012. 11. Substitution and word boundaries Substitutions do not affect the word boundaries of a command. For example, during variable substitution the entire value of the variable becomes part of a single word, even if the variable's value contains spaces.

ALINT Variables

ALINT reserves a number of variable names. These variables can be used to control the GUI and the linting engine and to read information about the current state of the application such as the location of the design folder.

Tcl Commands for Checking and Setting Variables The list of variable names and values can be printed with the set command used without any arguments. set This command is a custom extension to the native Tcl set command. (The Tcl set command requires at least one argument - the variable name.) Other Tcl commands and language constructs that can be used to set and query variable names are discussed below. To list all variable names, type: info vars The list may contain ALINT predefined variables, variables set by the user, and variables set by the Tcl interpreter.

65

ALINT
To print a variable value, type: puts $<var_name> for example: puts $aldec

User's Guide

The puts command will not work for variables that are arrays. To list key-value pairs in the array, use: array get <variable_name> Note that the variable name must not be preceded with the dollar ($) sign. To pretty-print key value pairs, use the following foreach loop: foreach { key value } [array get <variable_name> ] { puts "$key = $value" } This can be used to print variables predefined by Tcl, such as the $tcl_platform variable or user-defined variables. Note, however, that none of the ALINT variables is an array.

List of ALINT Variables Variable Name $aldec $alint_flow_temp_dir $argc $argv auto_index $curdir $dsn env $errorInfo $messageprefix $osver Description The location of ALINT installation directory. The location of a directory which contains a linting flow and its phases for current design. The number of arguments passed to a macro. Arguments passed to a macro. Use native Tcl commands to select a specific argument. For example, to select the first argument, use lindex $argv 0. To iterate over all arguments, use a for each loop, and so on. Returns the Tcl library index file and its location. The location of the current directory. The directory containing the .rdsn file with the last active design. The environment variables and their locations. The information about errors occurred during the control of GUI and linting engine. Shows the prefix used for messages in Tcl. The current operating system. Specifies whether dialog boxes should be shown. Quiet can be set to off to prevent automated linting runs being stopped by interactive prompts. Quiet can be set with either the set command (set quiet on, set quiet off) or with the dedicated quiet command. Returns the Tcl interactive channel name. Shows the path to the directory, where the Tcl library is located. The current level of Tcl patch.

$quiet

$tcl_interactive $tcl_library $tcl_patchLevel

66

ALINT
tcl_platform $tcl_version $transcript

User's Guide
The information about the Tcl platform: the name and version of OS, which is used, byte order, word size, user name. Returns the version number of Tcl. The current state of the transcript. See more details in transcript command. The name of the working library.

$worklib

This variable may also affect the list of libraries searched by alog. See alog -l for details. The directory containing the .rwsp file with the currently loaded workspace. The variable is not set until workspace is not opened.

$wsp

Example: puts $alint_flow_temp_dir In the above example the command returns a location directory of the linting flow and its phases for current design. Example: array get tcl_platform In the above example the command returns the operating system version, byte order, information about the machine ALINT is running on, used platform and OS name, user name and the word size.

Command Arguments in a Variable

Running the linting process often requires executing the same commands all over again. For example, the alint command (i.e. the command that runs the ALINT engine and checks RTL design rules at the compilation and elaboration stages) may be called 100 times. The invocations of the alint command will often use the same arguments and differ only by the name of source files, for example: alint -alint_policy default -alint_avdb my_results.avdb my_rs.v alint -alint_policy default -alint_avdb my_results.avdb my_dffs.v #... alint -alint_policy default -alint_avdb my_results.avdb my_disp.v When command arguments change, each command invocation needs to be updated. Such approach is error prone and makes the macro files hard to maintain. The maintenance becomes even more tedious when the same commands are used across many macro files and each file needs to be updated when a command option changes. The problem can be solved by storing arguments in a variable and then using the variable in the command invocation instead of specifying the arguments directly. To store the arguments, use the Tcl set command, for example: set alintopt {-alint_policy default -alint_avdb my_results.avdb}

67

ALINT

User's Guide

Note that the set command expects two arguments. Therefore, the arguments for alint must be enclosed in braces (or quoted). The $alintopt variable can be then used in the alint command invocation. (The name of the variable is arbitrary.) The call to alint must be preceded by the Tcl eval command.

Using eval to Expand Arguments Assuming that variable $alintopt is set to -alint_policy default -alint_avdb my_results.avdb, the following command will NOT work as expected: alint $alintopt my_rs.v The Tcl interpreter will substitute variable $alintopt with its value; however the value will be treated as one argument (even though it contains spaces). To ensure proper variable expansion, use eval, for example: eval alint $alintopt my_rs.v The call to eval can be omitted for commands that call stand-alone executables such as alib (calls vlib on Linux or vlib.exe on Windows), alist (calls vlist or vlist.exe), or the compilers (call vlog, vcom or vcom.exe, vlog.exe). This is because the expansion will be performed by the operating system shell when the executable is started. The eval command is part of a standard Tcl distribution. It can be used for argument expansion both with ALINT commands and core Tcl commands.

Using Tcl Lists for Storing Command Arguments Instead of using Tcl eval, you can use a Tcl list for storing arguments. The following will work: set alintopt [list -alint_policy default -alint_avdb my_results.avdb] alint $alintopt my_rs.v This is not a standard Tcl mechanism and will only work with ALINT commands. (It will not work with core Tcl commands.) Note that the square brackets with the Tcl list command cannot be replaced by a string with the list representation. That is, neither set alintopt {-alint_policy default -alint_avdb my_results.avdb} nor set alintopt "-alint_policy default -alint_avdb my_results.avdb" can be used instead of set alintopt [list -alint_policy default -alint_avdb my_results.avdb]

68

ALINT
Sharing a Variable across Multiple Macros

User's Guide

Let us assume that you have created 100 macros, one for each source file. The linting options (i.e. options passed to the alint command) are the same in each macro. To avoid having to repeat the options in each macro, do the following: 1. Create a new file, for example variables.do. 2. Use the set command to store the linting options in variable $alintopt in file variables.do, for example: set alintopt {-alint_policy default -alint_avdb my_results.avdb} (Variable and file names and alint options are arbitrary.) 3. Source file variables.do at the beginning of each macro. source variables.do 4. Variable $alintopt is now available in each macro that sources variables.do and can be used when running the linting process, for example: eval alint $alintopt my_rs.v The setup shown above allows you to store linting settings in one place, i.e. in file variables.do. Changing that file will affect all macros that source it and use variables defined in it (e.g. the $alintopt variable).

More Information on Tcl

More information on Tcl and Tcl built-in commands can be found on http://www.tcl.tk. Click the Documentation link and then Manual pages and Tcl Commands. Tcl built-in commands include: after, append, array, bgerror, binary, break, catch, cd, clock, close, concat, continue, eof, error, eval, exec, exit, expr, fblocked, fconfigure, fcopy, file, fileevent, filename, flush, for, foreach, format, gets, glob, global, history, if, incr, info, interp, join, lappend, library, lindex, linsert, list, llength, load, lrange, lreplace, lsearch, lsort, namespace, open, package, pid, pkg_mkIndex, proc, puts, pwd, read, regexp, registry, regsub, rename, resource, return, scan, seek, set, socket, source, split, string, subst, switch, tclvars, tell, time, trace, unknown, unset, update, uplevel, upvar, variable, vwait, and while. Optional items in syntax descriptions (on the tcl.tk site) are surrounded by question marks, for example: if expr1 ?then? body1 elseif expr2 ?then? body2 elseif ... ?else? ?bodyN?

Command Substitution

As described in the Tcl Syntax Basics, a command placed in square brackets is being evaluated first and then the result of the command replaces the square brackets and the command, for example: set guipid [ pid ]

69

ALINT

User's Guide

The Tcl pid command returns the process ID of the current process. The returned value is assigned to the guipid variable . Another example of using Tcl command expansion is shown below: set files [ glob -nocomplain src/*.vhd ] The glob command returns the names of the files that match a pattern (src/*.vhd). The list of file names is assigned to the files variable .

Substitution of ALINT Commands Several ALINT commands return results that can be used in the command expansion, for example workspace.isopened. Other ALINT commands always return an empty string. To store the object type description use the following command: set cntdesc [describe sim:/top/uut/cnt ] The output of commands that can be used for command expansion (describe) appears on the Console only if the commands are not nested inside other commands.

Handling Script Execution Errors

When the Tcl interpreter in ALINT encounters an error, it prints the error message to the Console and aborts the execution of the macro. Such errors can include the following: a failure to compile a source file, a failure to open a file for reading or writing using the VHDL open routine, etc. The macro can trap such errors and handle them one way or another. For example, a verbose warning message can be printed to the Console and then the execution of the macro can continue. You can trap execution errors either with the Tcl built-in catch command or with the onerror command.

Using the catch Command The catch command executes the script that follows and never raises an error even if an error is encountered during the execution of the script, for example: if { [ catch { vsim -alint top} ] } { puts stderr "Error during elaboration-time linting." puts stderr "Aborting the macro execution." # # Other commands to handle the error. # abort } The catch command in the example above will recursively call the Tcl interpreter requesting the execution of the vsim -alint top command. If an error happens during the execution of the vsim command, it will be

70

ALINT

User's Guide

intercepted by the catch command and then catch will return a true value to the if command via the command expansion mechanism ([]). The catch command can execute an arbitrary number of commands, for example: if { [ catch { acom src/gates.vhd acom src/disp.vhd acom src/ctl.vhd } ] } { puts stderr "VHDL Compilation failure." # # Other commands to handle the error. # abort } For more details on using the catch command, see any of the on-line Tcl references, for example the reference on the http://www.tcl.tk website.

Using the onerror Command The onerror command is a ALINT extension to the Tcl syntax. The script inside the onerror command is executed when an error is encountered elsewhere in the macro, for example: onerror { puts stderr "Verilog compilation failure." # # Other commands to handle the error. # abort } alog src/gates.v alog src/disp.v alog src/ctl.v The onerror statement can be used an arbitrary number of times in a macro. When an error is encountered, the commands from the last successfully interpreted onerror statement will be executed. The command string in the onerror statement can include the resume command. The resume command resumes macro execution at the next command after the statement that caused the error.

Executing External Programs and System Commands

The Tcl interpreter in ALINT allows you to execute external programs as well as run commands implemented in the system shell (bash, csh, cmd.exe) and not available as stand-alone executables. A program or a shell command can be launched with either of the three Tcl commands available in ALINT: exec, runexe, and sh. The exec command is a native Tcl command (i.e. it is available in a standalone Tcl interpreter). Commands runexe and sh are extensions implemented in ALINT. The differences in the command behavior are described

71

ALINT
below:

User's Guide

Blocking and Non-blocking Commands The exec command blocks ALINT until the program it started exits. The command shown below starts the Windows Calculator (calc.exe): exec calc The exec command blocks ALINT GUI until the Calculator is closed. To avoid blocking the GUI, you could use the runexe or sh command instead, for example: runexe calc The command will return immediately after the Calculator is started.

Command Output The output of programs started with the exec or the sh commands (if any) is printed to the ALINT Console. For example, the Windows systeminfo program prints information about the machine ALINT is running on. You could invoke the systeminfo using either the exec or the sh commands, for example. exec systeminfo The behavior of the runexe command is different. Instead of printing the output to ALINT Console, it starts the cmd.exe window and executes the systeminfo program inside the cmd.exe window. The window is closed right after the systeminfo is completed. Under Linux the runexe command does not launch a new terminal window. Instead the program output is printed to the terminal where ALINT was started. The behavior of the runexe command can be changed (both on Linux and Windows) by using the -capture argument. When -capture is used the runexe command captures program output (both STDOUT and STDERR) and redirects it to the ALINT console.

Shell Commands Many commands available at the OS prompt are built into the shell (bash, csh, cmd.exe) and are not available as stand-alone executables. For example the ulimit command is built into the Bash shell and the dir command into cmd.exe. If you try to run a shell built-in command using the exec or the runexe command, the following error message will be printed: # SCRIPTER: Error: couldn't execute "<command_name>": no such file or directory To run a built-in command, use the sh command, for example: sh ulimit

72

ALINT

User's Guide

The sh command will start the default shell and pass the command in. To achieve the same effect using the runexe command, you would have to explicitly invoke the shell and pass the name of the shell built-in command as a command line argument, for example: runexe -capture bash -c ulimit (The syntax for passign arguments differs between shells.) Note that the output of the command also has to be explicitly captured using the -capture argument.

Summary The table below summarizes the behavior of exec, runexe, and sh commands discussed so far: Blocks exec runexe sh YES NO, unless used with -wait unless used with -capture NO ALINT Console YES Output ALINT Console Terminal/cmd.exe NO Shell Commands NO

Tcl and HDL Identifiers

Both VHDL and Verilog allow identifiers with any graphics ASCII characters. Such identifiers are started with backslash and terminated with backslash (VHDL) or white space (Verilog). Backslash has a special meaning in Tcl (see the Tcl Syntax Basics section), therefore the characters in the extended/escaped identifiers have to be properly escaped or braced. Additionally, Verilog simple identifier can contain the $ sign anywhere but at the very first character of the identifier. Because the dollar sign and the characters that follow it are subject to Tcl variable substitution (see the Tcl Syntax Basics section) such identifiers also need escaping.

VHDL Extended Identifiers VHDL extended identifiers are always terminated with a backslash, therefore they cannot be enclosed in braces. This is a limitation of the Tcl syntax - Tcl does not allow braces around the strings terminated with a single backslash. (A brace preceded by a backslash (\}) is treated as an ordinary character rather than the closing brace. The backslash in front of the closing brace cannot be escaped by another backslash because two backslashes inside braces are treated as two distinct characters.) Instead of enclosing extended identifiers with braces you should escape both the opening and the closing backslash, for example: \\my extended identifier\\ Additionally, the following characters inside extended identifiers need to be escaped: Opening and closing brackets: [ and ].

73

ALINT
Dollar sign: $. Backslashes: \.

User's Guide

A backslash inside a VHDL extended identifier must be doubled. Even though a double backslash counts as a single character inside the extended identifier, it is shown using a double backslash in the GUI. When referencing such signals in Tcl, each such backslash must be additionally escaped. \\backslash \\\\ inside\\ The table below shows sample VHDL declarations and their equivalent Tcl names. Table 1: VHDL Declaration signal \my identifier\ : bit; signal \backslash \\ inside\ : bit; signal \brackets [ ]\ : bit; Tcl Name \\my identifier\\ \\backslash \\\\ inside\\ \\brackets \[\]\\

Verilog Simple and Escaped Identifiers Verilog escaped identifiers are started with backslash and terminated with white space. Neither leading backslash nor terminating white space are considered to be a part of the identifier. Therefore an escaped identifier that consists only of alphanumeric characters, underscores, and the dollar sign ($) is the same as the basic identifier, for example: wire \w ; is the same as wire w; Verilog identifiers can appear in Tcl in 3 forms: No quoting/bracing is necessary. It happens when the identifier does not contain any characters that are subject to the Tcl substitution, i.e. $ (variable substitution), [ ] (command substitution), \ (backslash substitution), for example: Table 2: Verilog Declaration reg myreg; reg \myreg#1 ; reg \myreg%1 ; reg \myreg{1} ; myreg myreg#1 myreg%1 myreg{1} Tcl Name

NOTE: Braces are allowed at the beginning of the name - except for opening brace . An escaped identifier {myreg} cannot be used in a Tcl script without escaping braces because the Tcl treats

74

ALINT

User's Guide

the braces as the word delimiters rather than a part of the identifier. You could, however, use sim:/tb/{myreg} in Tcl because opening brace is no longer located at the beginning of the word. The identifier can be enclosed in braces. Braces prevent Tcl variable and command expansion so they can be used if the escaped identifier contains $, [, or ]. You should enclose the complete hierarchical name in braces, not only the last segment with the object name. For example, to refer in Tcl to a$b object located in the design region sim:/tb, you should use {sim:/tb/a$b}, not sim:/tb/{a$b}. Tcl name sim:/tb/{a$b} designates object {a$b} rather than a$b. NOTE: a$b is a Verilog simple name, not an escaped name (the $ sign is allowed in Verilog simple identifiers). In several cases special characters in the escaped identifier must be escaped with a backslash in Tcl. For example, to refer to an object declared as: reg \\aa\ ; use the following Tcl name: \\a\\

Dragging Objects to the Console and the HDL Editor You can drag an object from a debugging window to the Console or the HDL Editor. ALINT will paste the complete hierarchical name of the dropped object and will try to escape the name correctly so that it can be used in a Tcl script.

The startup.tcl Macro

The startup.tcl macro located in the scripts/ subdirectory in the ALINT installation directory is executed automatically when ALINT starts. The welcome messages shown in the Console at startup are printed by echo commands placed in the startup.tcl macro. You can customize ALINT by adding your own commands to the startup.tcl macro. Such commands can configure the GUI, set required variables, define custom procedures, etc. Rather than editing the startup.tcl macro, you can create your own Tcl script that will be called by the startup.tcl macro. This solution should be used if one installation of ALINT is shared by many users and you want to allow per-user customization. Each user who wants to execute custom commands at startup needs to do the following: Create a Tcl script with arbitrary content. Set environment variable ALDEC_STARTUPTCL to point to the script created in the previous step. The script specified by the user will be executed when ALINT starts up. The code responsible for executing the script is placed in the startup.tcl macro: if [ string length [ array get env ALDEC_STARTUPTCL ]] { source $env(ALDEC_STARTUPTCL) }

75

ALINT

User's Guide

The if statement verifies if environment variable ALDEC_STARTUPTCL is set. If it is, the script executes the source command. (This is a native Tcl command). The command reads the contents of the file and passes it to the Tcl interpreter.

tcllib Library

Tcllib, the standard Tcl library, is a collection of common utility functions and modules all written in high-level Tcl. These modules provide a wide variety of functionality, from implementations of standard data structures to implementations of common networking protocols. The official tcllib documentation is available on-line at the http://www.tcl.tk/software/tcllib/. The tcllib library, version 1.11.1, is located in the scripts/ subdirectory in the ALINT installation directory. You can check the version of each package using package require <package_name> code. Example package require nmea Returns the version number of the package nmea.

Selected Modules The tcllib library extends Tcl in a number of areas such as file manipulation, file processing, networking, encryption, mathematics, object oriented programming, and so on. Below you can see some modules, included in the ALINT installation. Package Name aes asn base32 base64 bench blowfish cache cmdline control counter crc csv des dns Short Description Advanced encryption standard; an ASN.1 encoder and decoder; a base32 encoder and decoder; a base64 encoder and decoder; benchmark tool; blowfish encryption; asynchronous in-memory cache; a command line argument processor similar to opt; procedures for control flow structures; provides a counter facility and can compute statistics and histograms over the collected data; checksum-calculation routines (crc32, cksum, sum); functions to handle CSV (comma-separated values) data; DES and 3DES encryption; dns- and resolver library-related functions;

76

ALINT
fileutil ftp ftpd fumagic log map mapproj math md4 md5 md5crypt mime rc4 rcs report ripemd sasl sha1 snit stooop struct textutil tie transfer treeql uev units Example package require crc32 crc::crc32 "Hello, World!" Tcl implementations of some standard Unix utilities; Tcl interface to the FTP protocol; implementation of functions needed for an FTP server; file utilities; functions to log messages with various facilities and levels; mapping utilities; map projection routines; common math functions like min, max, and others; md4 hashing functions; md5 hashing functions; md5 based password hashing; a MIME encoder and decoder; implementation of the RC4 stream cipher; RCS low level utilities; provides objects which can be used to generate and format reports; RIPEMD message-digest algorithm Simple Authentication and Security Layer implementation; sha1 hashing functions; snit's not incr Tcl, OO system; simple Tcl-only object oriented programming scheme provides C++/Java-like OOP interfaces; Tcl implementations of common data structures (tree, graph,etc); string manipulation library; framework for creating persistent Tcl arrays; data transfer facilities; tree query language; user events; convert and manipulate quantities with units;

User's Guide

Perform a 32bit cyclic redundancy check and returns a checksum value calculated using the CRC-32 algorithm. package require math::statistics ::math::statistics::random-normal 1 2 10 Return a list of "number" random values satisfying a normal distribution with given mean(1) and standard deviation(2).

77

ALINT

User's Guide

78

ALINT

User's Guide

Configuring ALINT

Overview
ALINT operates with rules, rulesets and policies. A rule is a basic unit. Rules can be grouped into rulesets. Rules and rulesets can be combined to form policies. Rule Rule is a software-based procedure performing check of the input model versus common accepted design practice, typical coding or design mistake or corporate style convention. Ruleset The ruleset is a named set of rules. The ruleset is treated by ALINT as a single object, thus allowing user to operate (e.g. in GUI) with a set of rules simultaneously. ALINT comes with several built-in rulesets. Custom rulesets can be created using the Ruleset Editor. The ruleset files have the .alintruleset extension. The name of a ruleset and the corresponding ruleset file should be identical. Rulesets may inherit other rulesets. Policy Policy is a top level ALINT configuration object that defines rules to be checked during the linting process. It is a collection of rulesets, rules and their parameters (settings). Rules may be used in a policy either individually or inside the rulesets. ALINT comes with several built-in policies. Custom policies can be created using the Policy Editor. The ALINT policy files have the .alintpolicy extension. The name of the policy and the corresponding policy file should be identical. A policy may inherit another policy.

Rule Parameters Rule parameters may be configured after the rule is added to the policy. It may be configured using the Rule Parameters Editor: double-click on a rule name in the Policy Editor - the Rule Parameters Editor will be opened.

Parameter types ALINT engine supports three types of rule parameters: Number Integer decimal numbers, either negative, zero or positive. Text ASCII strings which may be either some predefined words or custom text (e.g. regular expression). List Parameter that accepts one or more values of the same type (i.e. number or text). The range of possible values for any parameter is hard-coded in a rule checker function inside a rule plug-in. Default parameter values may be observed in the Rule Plug-in Viewer section.

79

ALINT

User's Guide

Rulesets and Policies Built-in rulesets and policies can be observed in the Configuration Viewer. Custom rulesets and policies can be created either in GUI (recommended) or manually: GUI: see the Ruleset Editor and Policy Editor sections. Manually (by editing a text file): see the Ruleset Configuration and Policy Configuration sections for .alintruleset and .alintpolicy files syntax description.

NOTE: It is recommended to use GUI to create custom policies -- the advantages are: Intuitive approach and drag-n-drop features enabled -- rules or pre-defined groups (e.g. from Design Methodology Topics classification) help to set up a new policy very quickly. Context-dependent access to description and configuration of each rule -- brief code samples and comments help to quickly understand what particular rule is about.

80

ALINT

User's Guide

Available Rule Plug-ins

Overview

Design checking policies are composed basing on the rules that are available in particular ALINT configuration. By default ALINT is delivered with pre-installed rule plug-ins, whereas advanced, optional rule plug-ins, are available on request.

Contact Aldec support for more information about available plug-ins.

Pre-installed Rule Plug-ins

By default ALINT is delivered with the following rule plug-ins pre-installed: ALDEC_VHDL - detailed documentation is available in Help | Rule Plug-ins | Aldec VHDL Rules ALDEC_VLOG - detailed documentation is available in Help | Rule Plug-ins | Aldec Verilog Rules

These plug-ins contain simple basic design rules that are not included in any other rule plug-in (see Optional Rule Plug-ins for details). A rule is typically added to ALDEC_VHDL and/or ALDEC_VLOG rule plug-ins whenever it is requested from the field.

Optional Rule Plug-ins

The following rule plug-ins are not included in the default installation of ALINT and available upon request: DO-254 rule plug-ins The RTCA DO-254 document (Design Assurance Guidance for Airborne Electronic Hardware") is a recent standard that was developed by the avionics industry to establish hardware deployment guidelines and ensure safety of in-flight hardware. More details are available at www.do254.com. DO254_VLOG and DO254_VHDL rule plug-ins are recommended as an additional mean of safety assurance for the design of complex electronic hardware. These plug-ins contain the most essential design rules that highly tuned to the needs of DO-254 projects as well as to safety-critical designs. The most important design areas are addressed: coding practices, design reviews, and safe synthesis. DO254_VHDL -- the most essential subset of VHDL design rules targeted to safety-critical designs.

81

ALINT

User's Guide

DO254_VLOG -- the most essential subset of Verilog design rules targeted to safety-critical designs. Additionally DO-254 plug-ins can be considered as cheaper alternative to robust STARC plug-ins. RMM rule plug-in The plug-in automates design rules and guidelines that are provided in the Reuse Methodology Manual (RMM) document. RMM contains detailed guidelines and design examples on planning, specifications, design practices, coding, testing, and documentation. ALINT with RMM plug-in helps to guide all levels of ASIC engineers and ensure that reusable functionality is integrated into SoC designs. RMM plug-in is based on RTL coding guidelines from Reuse Methodology Manual, 3rd edition. This is dual language plug-in - both RMM_VLOG and RMM_VHDL rules are included. STARC rule plug-ins Semiconductor Technology Academic Research Center (STARC) was established in December 1995. STARC is a consortium of major Japanese ASIC foundries that has established a set of design rule guidelines for corporations to follow based on a set of best-design practices. Actually STARC plug-ins contain automated design guidelines covering wide range of design issues -- from naming conventions and synthesizability to advanced topics such as optimizations, clock domain crossings, and design for test. STARC_VHDL -- "STARC RTL Design Style Guide for VHDL", First Edition. STARC_VLOG -- "STARC RTL Design Style Guide for Verilog HDL", Second Edition.

82

ALINT

User's Guide

Policy and Ruleset Files Syntax

Ruleset Configuration Files

This clause describes the .alintruleset files syntax.

Ruleset definition ruleset_definition ::= RULESET [ruleset_identifier] { [ ruleset_field {ruleset_field} ] } .alintruleset file can contain only one ruleset definition. ALINT engine searches for the <ruleset_name>.alint ruleset file in the ruleset search directory(ies) that can be specified using the -alint_ruleset_path <search_dir> (multiple search paths can be specified, if necessary). There are several built-in rulesets that can be browsed using the alint.ruleset.list console command. There are the following restrictions for ruleset identifier: Ruleset identifier should match the name of the file that contains the ruleset, e.g. there should be rtl_design_rules ruleset in the rtl_design_rules.alintruleset file. It is important to note that ruleset names are register-independent on Windows but sensitive to letter case on Linux (RTL_design_RULES.alintruleset and RTL_design_rules.alintruleset are different files). Ruleset identifier should not match any of built-in ruleset names, e.g. it is prohibited to use STARC_VLOG_RTL_RULES for ruleset naming.

Ruleset fields ruleset_field ::= inherit_ruleset_specification | rules_set_change inherit_ruleset_specification ::= INHERIT ruleset_identifier

Ruleset can inherit another ruleset all the rules are automatically added then. In order to be inherited by another ruleset, custom ruleset should be located in the current directory or specified in the ruleset search directories list (-alint_ruleset_path command line switch).

rules_set_change ::=

RULES operation rule_link

83

ALINT
| RULES operation [rule_link { , rule_link}] operation ::= += Examples Ruleset can inherit other ruleset and extend the initial set of rules, e.g.: RULESET MY_RTL_RULES { INHERIT ALDEC_VLOG_DEFAULT_RULES

User's Guide

RULES += [ STARC_VLOG.1.5.1.1, STARC_VLOG.1.5.1.2, STARC_VLOG.1.5.1.3 ] }

Policy Configuration Files

This section describes the .alintpolicy files syntax.

Policy definition policy_definition ::= POLICY [policy_identifier] { [ policy_field {policy_field} ] }

.alintpolicy file can contain only one policy definition and only one active policy may be used during particular linting session. Such a policy is specified using the -alint_policy <policy_name> argument for the alint, alog or acom commands. ALINT engine searches for the <policy_name>.alintpolicy file in the policy search directory(ies) that can be specified using the -alint_policy_path <search_dir> (multiple search paths can be specified, if necessary). There are several built-in policies that can be browsed using the alint.policy.list console command. There are the following restrictions for custom policy identifier: Policy identifier should match the name of the file that contains the policy, e.g. there should be rtl_design policy in the rtl_design.alintpolicy file. It is important to note that policy names are register-independent on Windows but sensitive to letter case on Linux (RTL_design.alintpolicy and rtl_design.alintpolicy are different files).

84

ALINT

User's Guide

Policy identifier should not match any of the built-in policy names, e.g. it is prohibited to use STARC_VHDL_RTL for policy naming. If policy does not contain any fields, it is considered as empty (no rules are activated during the linting process).

Policy fields policy_field ::= inherit_policy_specification | use_rule_specification | use_ruleset_specification | rule_cfg_section inherit_policy_specification ::= INHERIT policy_identifier | INHERIT DEFAULT Policies are inherited with all the individual rules configurations, if any. Policy that inherits another one can override rules configurations. In order to be inherited by another policy, custom policy should be located in the current directory or specified in the policy search directories list (-alint_policy_path command line switch).

use_rule_specification ::=

USE rule_link | USE [ rule_link { , rule_link} ]

rule_link should be composed basing on the rule plug-in name and appropriate rule identifier, e.g. STARC_VLOG.1.1.1.1 or ALDEC_VLOG.7001.

use_ruleset_specification ::= USE RULESET ruleset_identifier

In order to be used by policy, custom ruleset should be located in the current directory or specified in the ruleset search directories list (-alint_ruleset_path command line switch).

rule_cfg_section ::= RULE_CONFIGURATION rule_link { [ rule_cfg_field { , rule_cfg_field} ]

85

ALINT
} rule_cfg_field ::= enable_setting | severity_setting | rule_param_change enable_setting ::= ENABLED = ON | ENABLED = OFF severity_setting ::= SEVERITY = severity_keyword severity_keyword ::= INFORMATION | WARNING ..| CRITICAL | ERROR

User's Guide

rule_param_change ::= rule_param_id operation rule_param_change_suffix operation ::= = | += | -= rule_param_change_suffix ::= "param_value" | [ "param_value" { , "param_value" } ] | [ ] Examples Policy can inherit another policy with all the rules configurations and override particular ones, when necessary, e.g.:

POLICY MY_RTL1 { INHERIT STARC_VHDL_RTL RULE_CONFIGURATION STARC_VHDL.1.1.1.7 { REGEXP_NEG_LOGIC = "^NG_\w+"

86

ALINT
} RULE_CONFIGURATION STARC_VHDL.1.1.1.1 { ENABLED = "OFF" } } Policy can be composed of rules and rulesets, e.g.:

User's Guide

POLICY MY_RTL2 { USE RULESET STARC_VHDL_RTL_RULES USE ALDEC_VLOG.7001 USE [ STARC_VLOG.2.2.2.1, STARC_VLOG.2.2.2.2 ] RULE_CONFIGURATION ALDEC_VLOG.7001 { SEVERITY = ERROR } }

87

ALINT

User's Guide

Running analysis

Overview
Linting process is distributed between two sessions: Compilation-time linting: console, GUI. Run compilation-time lnting first to check the design for basic rules that do not require knowledge about the design hierarchy. Advanced data sets are collected during the compilation-time linting session and available once it is completed. Elaboration-time linting: console, GUI. Run the elaboration-time linting session to check advanced rules that require parameter values and knowledge about the design hierarchy. Examples 1. Compilation-time only rule: ALDEC_VHDL.2305: Empty blocks should not be used in the RTL description. 2. Elaboration-time only rule: ALDEC_VLOG.7001: Use 2DFF synchronizers for clock domain crossing paths. 3. A rule which may be postponed to elaboration stage (if a loop iteration count is defined by a parameter value): ALDEC_VLOG.1007: At least one loop iteration is required

Linting Activation Methods

Both stages linting - alint command If the user is involved in iterations of code correction, ALINT provides a dedicated alint command to allow model checking using simply one command. The alint command needs to know which files to compile and the name of the top level. Linting-specific arguments can be supplied to control rules checking process. Syntax: alint [<filename(s)>] [-f <filename>] [-worklib <library_name>] [<alint_options>] [-alog <alog_options>] [-acom <acom_options>] [-asim <asim_options>]

88

ALINT

User's Guide

Think of alint as of packing both compilation-stage and elaboration-stage checks into one command that can be quickly called from the console command history. Console users may find it convenient for frequent ALINT invocation during a sequence of "sources edit - sources check" iterations. Since after elaboration (that is implicitly performed by alint) work library data (such as design structure) is available for browsing, some things are restricted, e.g. change directory with cd command, etc. The easiest way to check some source file is to simply specify its name after alint command. Arguments -f <filename> Specifies a plain text file with a list of arguments. Argument -f and a text file can be used instead of or in addition to arguments specified directly on the command line. Arguments specified in the file can be separated with spaces, tabs, and new lines. Similar to alog -f or acom -f. -worklib <library_name> Defines a library which is used as destination library for the compilation (both VHDL and Verilog design units) and searched for top-level design unit during the elaboration stage. Examples: alint tx_reg.v This command will perform both compilation-stage and elaboration-stage checks for all modules described in "tx_reg.v" Verilog source file. alint -alog tx_reg.v -asim tx_reg This command will perform both compilation-stage and elaboration-stage checks for the module "tx_reg" described in "tx_reg.v" Verilog source file. alint -f args.txt This command will apply arguments specified in args.txt plain text file. NOTE: The linting process may be invoked from the operating system shell with running stand-alone vlint executable.

Linting during compilation ALINT compiles source files with the alog or acom command, and the simplest way to turn on linting during compilation is to add the -alint argument to the alog or acom command line. Syntax: alog -alint [-alint_elabchecks] [<alint_options>] <alog_options> acom -alint [-alint_elabchecks] [<alint_options>] <acom_options> Most ALINT options are common for all ALINT activation modes.

89

ALINT
Arguments -alint Turns on ALINT checking. Without this switch, all other ALINT-specific options make no sense. -alint_elabchecks Causes ALINT engine to store data necessary for elaboration-stage checks in working library. Example: alog my_src.v -alint -alint_elabchecks

User's Guide

The example above performs a regular compilation of my_src.v Verilog source file, compilation-stage checks using the default ALINT configuration, and generation of data for elaboration-stage checks.

Linting during elaboration Some ALINT rules cannot be checked using only the compiled model data. Some rules may require final parameter values used in Verilog module (generics in VHDL), or model structure after generate constructs are processed, or model hierarchy (to determine which module is the top level), etc. If the data necessary for elaboration-stage checks was previously generated during source compilation stage with the -alint -alint_elabchecks arguments, then it is possible to continue model linting during elaboration. Syntax: asim <asim_options> -alint [<alint_options>] Most ALINT options are common for all ALINT activation modes. ALINT arguments may be positioned anywhere in the asim command line but after the -alint switch. ALINT will extract previously saved model data (from the working library data generated during compilation-stage checks), get model properties (such as top level, parameter values) from elaboration engine, and use it all in checker functions previously postponed to elaboration stage. Example: asim tx_top -alint The top level tx_top will be elaborated and checked for rule violations which could not be found during compilation.

Options for ALINT Session


Options to control rule checking are common for all ALINT activation methods, unless other is specified.

90

ALINT

User's Guide

NOTE: In alint command linting arguments should be specified at the beginning (before the -alog, -acom or -asim section). NOTE: In alog or asim commands, linting arguments may be specified anywhere in the command line, but in acom command they must precede all source file names. Linting session will start only if the -alint argument is specified in the beginning. Specifying any ALINT session option (-alint_...) in these commands without the -alint option (that starts the linting session itself) is an error. Syntax alint_options ::= alint_option [ alint_option ] [...] alint_option ::= -alint_avdb <AVDB_file_name> -alint_exclusions <filename> -alint_gclk <clock_signal> -alint_gclkjoin <clock_signal_1> <clock_signal_2> -alint_grst <reset_signal> -alint_incremental -alint_maxwarn <maximum_number_of_warnings> -alint_maxrulewarn <maximum_number_of_warnings_for_one_rule> -alint_nopragmas -alint_plugins_file <_name> -alint_policy_path <config_file> -alint_policy <policydirectory> -alint_pva <synthesis_method> -alint_report <output_target> -alint_ruleset_path <directory> -alint_skipfile <skip_file> -alint_skipunit <design_unit> -alint_synthesislog <filename>

Arguments -alint_avdb <AVDB_file_name> Sets the target AVDB file, which will contain saved violation reports. AVDB file (ALINT Violations Data Base) is a database containing ALINT violations detected during single linting session. This database allows post-linting debug, eliminating the need for running ALINT again and again to recall the violations collected in other parts of project. Syntax: -alint_avdb <filename.avdb> Filename should be valid for the current operating system. It is suggested to add the .avdb extension to let ALINT Design Manager recognize the file type. Examples: alint -alint_avdb my_violations1.avdb -alog my_source.v -asim my_top

91

ALINT
or alog my_source.v -alint -alint_avdb my_violations1.avdb asim my_top -alint -alint_avdb my_violations1.avdb

User's Guide

This will result in saving all detected violations to the my_violations1.avdb database file. Generated AVDB file will contain violations detected during compilation of the my_source.v file, and elaboration of the my_top module. Once having the results of linting session saved to AVDB database file, working with the detected violations becomes more convenient. For example, it is possible to display custom subset of violations in the desired order using the avdb2txt command (see AVDB Files Listing). or to compare results of different linting sessions using the avdbcompare command (see AVDB Files Comparison). It is also possible to generate colorful HTML report using the avdb2html command, or generate CSV spreadsheet report using the avdb2csv for further processing in third-party software. -alint_exclusions <filename> Defines the name of .alintexclusions file. Exclusions file configure specified rules check for particular design elements (files, units, instances). Syntax: -alint_exclusions <filename> This option is used both at compilation and elaboration stages. See Exclusions Files section for details. Examples: alint -alint_exclusions exclude_it.alintexclusions -alog my_source.v -asim my_top or alog my_source.v -alint -alint_exclusions exclude_it.alintexclusions asim my_top -alint -alint_exclusions exclude_it.alintexclusions Exclusions file exclude_it.alintexclusions is used for both compilation and elaboration linting sessions. -alint_gclk <clock_signal> Allows to specify global clock signal. This information is needed for chip-level clock-dependent rules, such as ALDEC_VLOG.7001 rule. If no signal was specified as global clock, and clock-dependent rules are enabled in active policy, then ALINT will try to detect such signals automatically (see Design Global Clock section for details). Syntax: -alint_gclk <signal_name> Signal name must be hierarchical. This option is actual only at elaboration stage (i.e. it is available only in alint and asim commands, it is not available in alog and acom commands). Specified signal must be an external port.

92

ALINT
Examples: alint -alint_gclk top1.clk -alint_gclk top2.clk -asim top1 top2 asim top1 top2 -alint -alint_gclk top1.clk -alint_gclk top2.clk In the above examples two signals were specified as global clocks top1.clk and top2.clk. -alint_gclkjoin <clock_signal_1> <clock_signal_2>

User's Guide

Indicates ALINT engine to consider the FFs controlled with the specified clock signals as belonging to the same domain. This information has an influence at automatic clock domain generation process. Syntax: -alint_gclkjoin <signal_name> <signal_name> Signal name must be hierarchical. The argument is available during the linting at elaboration stage (i.e. with asim and alint commands). Examples: alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclkjoin top.clk1 top.clk2 -asim top asim top -alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclkjoin top.clk1 top.clk2 In the above examples two signals were specified as global clocks top.clk1 and top.clk2 and the signals were joined into the single domain. If there are 3 and more global clock signals that should be joined into a single domain, then -alint_gclkjoin argument is specified multiple times. Examples: alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclk top.clk3 -alint_gclkjoin top.clk1 top.clk2 -alint_gclkjoin top.clk1 top.clk3 -asim top asim top -alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclk top.clk3 -alint_gclkjoin top.clk1 top.clk2 -alint_gclkjoin top.clk1 top.clk3 In the example above signals top.clk1, top.clk2, and top.clk3 specified as global clocks are joined into the single domain. -alint_grst <signal_name> Allows to specify global reset signal. This information is needed for chip-level reset-dependent rules, such as STARC_VLOG.1.3.2.2. If no signal is specified as global reset, and reset-dependent rules are enabled in active policy, then ALINT will try to detect such signals automatically (see Design Global Reset section for details). Syntax: -alint_grst <signal_name>

93

ALINT

User's Guide

Signal name must be hierarchical. This option is actual only at elaboration stage (i.e. it is available only in alint and asim commands, it is not available in alog and acom command). Specified signal must be an external port. Examples: alint -alint_grst top1.rst -alint_grst top2.reset -asim top1 top2 asim top1 top2 -alint -alint_grst top1.rst -alint_grst top2.reset In the above examples two signals were specified as global resets: top1.rst and top2.reset. -alint_incremental Allows caching the results of the elaboration-time session. If no essential changes in the design structure are made, then the results from the previous elaboration-time session are taken. This speeds up the recurrent design analysis. Usage of this argument may cause stability issues, so avoid this argument if any. -alint_maxwarn <maximum_number_of_warnings> Controls the maximum number of total ALINT warning messages output. When linting a large design user may want to see only several rule violation messages that were found, not all of them. Syntax: -alint_maxwarn { <number> | none } Parameters description: <number> - sets the maximum number of message printed during one linting session: an integer number starting from 0, in decimal format. none - no limit, messages for all found violations will be output. The default ALINT behavior corresponds to -alint_maxwarn 500. Examples: alint -alint_maxwarn 20 -alog my_module.v -asim my_module In the above example warning messages limit is set to 20. alint -alint_maxwarn none -alog my_module.v -asim my_module In the above example warning messages limit is disabled. -alint_maxrulewarn <maximum_number_of_warnings_for_one_rule> Controls the maximum number of ALINT warning messages output for a single rule. When linting a large design user may want to see only several violation messages that were found for one rule, not all of them. Syntax:

94

ALINT
-alint_maxrulewarn { <number> | none } Parameters description:

User's Guide

<number> - sets the maximum number of messages for one rule printed during one linting session: an integer number starting from 0, in decimal format. none - no limit, messages for all found violations of the rule will be printed. Note that total number of messages still can be limited by -alint_maxwarn option. The default ALINT behavior corresponds to -alint_maxrulewarn 100. Examples: alint -alint_maxrulewarn 5 -alog my_module.v -asim my_module In the above example warning messages limit for each rule is set to 5. alint -alint_maxrulewarn none -alog my_module.v -asim my_module In the above example warning messages limit for each rule is disabled. -alint_nopragmas Disables reaction on //@alint pragmas inside Verilog comments. Disables reaction on --@alint pragmas inside VHDL comments. This is a compilation-only argument (i.e. it is available only in alog, acom and alint commands, it is not available in asim command). -alint_plugins_file <config_file> Defines a path to the additional configuration file for ALINT rule plug-ins in the format shown in the section Rule Plugins Registration. Syntax: -alint_plugins_file <config_file> Example: alint -alint_plugins_file "my.plugins" -alog my_source.v -asim my_top or alog my_source.v -alint -alint_plugins_file "my.plugins" asim my_top -alint -alint_plugins_file "my.plugins"

This will result in checking my_source.v file at compilation stage, and checking of my_top module at elaboration stage, using user-defined rule plug-ins from my.plugins file in addition to pre-installed plug-ins.

95

ALINT
-alint_policy <policy_name>

User's Guide

Specifies an active policy for a linting session (single launch of compilation, elaboration or alint command). Syntax: -alint_policy <policy_name> Specified policy file must be located in one of the policy search directories. Policy directories may be specified with -alint_policy_path argument. Available policies may be seen in GUI using Configuration Viewer. See Policy Editor section for custom policies creation. Examples: alint -policy relaxed2 -alog my_source.v -asim my_top or alog my_source.v -alint -alint_policy relaxed2 asim my_top -alint -alint_policy relaxed2 This will result in checking my_source.v file at compilation stage, and checking of my_top module at elaboration stage, using relaxed2 as an active policy. It is supposed that relaxed2.alintpolicy file exists in the working directory. -alint_policy_path <directory> Defines a policy search directory. Multiple policy directories may be specified using multiple -alint_policy_path arguments. These directories are used by the ALINT engine to look for the active policy specified in the -alint_policy argument and its inherited policies, in case they are not found in the working directory. Examples: alint -alint_policy_path /home/designs/alint_cfg -alint_policy relaxed1 -alog my_source.v -asim my_top or alog my_source.v -alint_policy_path /home/designs/alint_cfg -alint_policy relaxed1 asim my_top -alint_policy_path /home/designs/alint_cfg -alint_policy relaxed1 This will result in checking my_source.v file at compilation stage, and checking of my_top module at elaboration stage, using relaxed1 as an active policy. It is supposed that relaxed1.alintpolicy file exists either in the working directory or in the /home/designs/alint_cfg directory. -alint_pva <synthesis_method> Controls the processing of previous value assignments, like: if (EN) Q <= D;

96

ALINT
else Q <= Q; // previous value assignment Syntax: -alint_pva { omit | feedback } Parameters description: omit - previous value assignment infers a latch feedback - previous value assignment infers a combinational feedback loop The default ALINT behavior corresponds to -alint_pva omit. Examples: alint -alint_pva feedback -alog my_source.v -asim my_top or alog my_source.v -alint -alint_pva feedback asim my_top -alint -alint_pva feedback

User's Guide

This will result in checking my_source.v file at compilation stage, and checking of my_top at elaboration stage, using feedback synthesis method for previous value assignments. -alint_report <output_target> Sets the target for reporting violations as plain text. To get opportunity of more convenient violations analysis use AVDB file (see -alint_avdb description). Syntax: -alint_report { <filename> | console | null } Parameters description: <filename> - the target is a text file (valid file name should be specified) console - the target is the Console null - no target (no messages will be printed) The default ALINT behavior corresponds to -alint_report console. Examples: alint -alint_report my_report.txt -alog my_source.v -asim my_top or alog my_source.v -alint -alint_report my_report.txt asim my_top -alint -alint_report my_report.txt

97

ALINT

User's Guide

This will result in checking my_source.v file at compilation stage, and checking of my_top at elaboration stage, using my_report.txt file as an output target for ALINT violation messages. -alint_ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -alint_ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in an active policy specified in the -alint_policy argument, in case they are not found in the working directory. Examples: alint -alint_ruleset_path /home/designs/alint_cfg -alint_policy relaxed1 -alog my_source.v -asim my_top or alog my_source.v -alint_ruleset_path /home/designs/alint_cfg -alint_policy relaxed1 asim my_top -alint_ruleset_path /home/designs/alint_cfg -alint_policy relaxed1 This will result in checking my_source.v file at compilation stage, and checking of my_top module at elaboration stage, using relaxed1 as an active policy. It is supposed that all rulesets (.alintruleset files) used in the relaxed1 policy exist either in the working directory or in the /home/designs/alint_cfg directory. -alint_skipfile <skip_file> Defines a file that will not be analyzed by ALINT. This means, that all the design units included into this file are treated as black boxes by linting engine, so no linting checks are performed for them. This is a compilation-only argument (i.e. it is available only in alog, acom and alint commands, it is not available in asim command). Syntax: -alint_skipfile <skip_file> Examples: alog -alint -alint_avdb bjack_mixed.avdb -alint_elabchecks {./src/bcd2led.v} {./src/blackjack.v} -alint_skipfile "./src/bcd2led.v" According to this command line both bcd2led.v and blackjack.v file sources are compiled to the working library. The bcd2led.v file is skipped from linting, so the linting checks are performed only for the blackjack.v. The linting results are stored at the bjack_mixed.avdb file. Same behavior can be achieved using an ALINT command: alint -alint_avdb bjack_mixed.avdb -alint_elabchecks -alint_skipfile "./src/bcd2led.v" -alog {./src/blackjack.v} {./src/bcd2led.v} -alint_skipunit <design_unit> The -alint_skipunit argument defines a design unit that will not be analyzed by ALINT. It provides same functionality as -alint_skipfile argument but allows specifying particular design unit that should be skipped.

98

ALINT

User's Guide

This is a compilation-only argument (i.e. it is available only in alog, acom and alint commands, it is not available in asim command). Syntax: -alint_skipunit <design_unit> The -alint_skipunit argument accepts design units of the following types: unit_name ::= { module_name | entity_name | "entity_name(architecture_name)" | "entity_name(configuration_name)" | package_name } Verilog module is the only possible design unit in the Verilog designs. VHDL design entity is defined by entity declaration together with corresponding architecture body. Entity can be considered as separate design unit (independently from architecture or configuration). " e n t i t y _ n a m e VHDL architecture body defines the body of design entity and can be considered architecture_name" as separate design unit. Please note that architecture name cannot be specified without the entity name. module_name entity_name " e n t i t y _ n a m e Binding of VHDL component instances to design entities is performed by configuration_name" configuration specifications. Please note that configuration alone cannot be considered as a separate design unit. package_name A VHDL package declaration defines the interface to a package and it is considered together with the package body.

Examples: Assume that the gates.v Verilog source file includes three modules: OR2, AND2 and INV. The following command line is used to compile this file: alog -alint -alint_avdb "./alint.avdb" -alint_elabchecks {./src/gates.v} -alint_skipunit INV According to this command line all design units of the gates.v source file are compiled. The linting results are saved to the alint.avdb file. It contains the compilation-time violations reported on the OR2 and AND2 modules. But the information about the compilation time violations of the INV module is not available. Same behavior can be achieved using an ALINT command:

99

ALINT

User's Guide
alint -alint_avdb "./alint.avdb" -alint_elabchecks -alint_skipunit INV -alog {./src/gates.v}

The compilation and elaboration-time linting results are saved to the alint.avdb file. It contains the information about compilation and elaboration-time violations reported on the OR2 and AND2 modules. No linting results for the INV module are available . NOTE: There are several ways to disable rule checks and to suppress undesired linting warnings in ALINT. See the Disable Checks for Particular Context section for details. -alint_synthesislog <filename> Lists external and internal clocks/resets that were detected in the design; clock domain crossings accompanied by the detailed information on source-destination and on destination-source registers; instances and the number of equivalent logic gates required to implement each instance; storage element inferences and top-level interface port connections analysis. Syntax: -alint_synthesislog <filename> This option is actual only at elaboration stage (i.e. it is available only in alint and asim commands, it is not available in alog and acom commands). Examples: alint -alint_synthesislog synthesis_log.txt -asim top1 top2 asim top1 top2 -alint -alint_synthesislog synthesis_log.txt Above examples list advanced clock tree data to the synthesis_log.txt file.

Activation Examples
Example of linting during compilation: alog module_ABC.v -alint -alint_policy RTL_code -alint_maxwarn 25 -alint_elabchecks The example above compiles module_ABC.v source file and checks its code according to settings defined the RTL_code policy. ALINT will print up to 25 warnings, even if more violations are found. Source file module_ABC.v will be compiled into the working library with all data needed for further ALINT elaboration-stage checks (-alint_elabchecks option is present). Example of linting during elaboration: asim module_ABC -alint -alint_policy RTL_code -alint_maxwarn 25 The example above elaborates module_ABC module to perform elaboration-stage checks according to the data collected during compile-time checking of this module. ALINT uses settings defined in RTL_code policy, and will print up to 25 warnings, even if more violations are found.

100

ALINT
Example of both stages linting:

User's Guide

alint -alint_policy RTL_code -alint_maxwarn 25 -alog module_ABC.v -asim module_ABC From the linting point of view, this example does the same checking as the first 2 examples. However, it does not generate full-featured library data from module_ABC.v (some library-dependent features may not work). This command performs only complete design rules checking of the module_ABC model. Therefore it is faster than the sequence of the first two commands. If your target is design rules checking only - use the alint command.

When elaboration is necessary Note that many ALINT rules require checking during both stages - compilation and elaboration. For example, constants are checked during the compilation, but parameters - at elaboration time). Consider the rule which checks that constant should not be assigned to a flip-flop output. It may be checked either on compilation or elaboration stage, depending on the process that infers a flip-flop. Example of flip-flop inferring process (Verilog): always @( posedge CLK or posedge RST ) if (RST) Q <= 0; else Q[3:0] <= D[3:0]; This process assigns 4 bits of signal D to 4 bits of signal Q under synchronous control. After compilation of this description ALINT engine already knows that no constant is assigned here, thus no rule violation will be reported for this flip-flop inference. But in the following situation (assume that "P" is a Verilog parameter) the checker cannot tell after the compilation if there is a violation or not, because parameter may be redefined after the compilation: parameter P = 1; always @( posedge CLK or posedge RST ) if (RST) Q <= 0; else Q[3:0] <= D[P:0]; If parameter "P" is initialized with value "3", then there will be no rule violation, like in the previous case. But if "P" is initialized with, for example, "1" - then two upper FF bits (Q[3:2]) will be assigned with zeroes because of zero-padding in Verilog, and rule violation will be reported for them. Since final parameter value is known only at the model elaboration stage, the checker function that verifies the mentioned rule should be invoked at both compilation and elaboration stages. If some rule requires checking in all possible situations (i.e. during elaboration also), there are 2 ways: 1. Invoke ALINT session once using alint command (it performs both stages): alint module_ABC.v

101

ALINT
or alint ... -alog module_ABC.v -asim module_ABC 2. Invoke ALINT session twice using "alog - asim" sequence: First invoke linting during compilation with -alint_elabchecks option specified: alog module_ABC.v -alint -alint_elabchecks ... Then invoke linting during elaboration: asim module_ABC -alint ...

User's Guide

Linting Activation from GUI


Various means are provided to run Linting from GUI. Linting process is distributed between two sessions: compilation- and elaboration-time linting. Both sessions may be started from the Linting menu or Quick Launch Panel. It is possible to run Compilation-time Linting from pop-up menu in Design Manager (see Figure 1) and to run Elaboration-time Linting from Library Manager using pop-up menu as well. Compilation-time Linting menu item starts checking an active design or workspace depending on Execute linting for option (Preferences | Tools | Quick Launch Panel | General).

102

ALINT

User's Guide

Figure 1. The Compilation-time Linting of the design Elaboration-time Linting menu item opens window for choosing top level design unit (see Figure 2).

103

ALINT

User's Guide

Figure 2. The Elaboration-time Linting window NOTE: It is not possible to select top-levels from different libraries for elaboration-time linting (the OK button will be disabled in such case). All the top-levels should be from one library. Therefore use a wrapper that instantiates top-levels from different libraries as a workaround to this restriction. For instance, glbl should always be specified alongside with a top-level(s) in each design that uses Xilinx primitives. The wrapper for such case can be as follows: module super_top; glbl glbl(); top top(); endmodule This wrapper should be compiled to a library which will be a source for the top-level selection, e.g.: vlog super_top.v -l xilinx_library The OK button starts elaboration-time linting. Once finished, you can review the results (see the Violation Viewer section for details). Click the Options... button will allow to set up linting options of the design Properties. Setting the preferences is available from the Tools | Preferences menu.

104

ALINT
Linting Options

User's Guide

Most options from General and Advanced categories of design Properties are inherited from global Preferences (Linting | General and Linting | Advanced pages). However there are three options in design Properties that are design specific: General Category Top-level design unit Defines top-level unit for elaboration-time linting of the design. when the option is set, it is not necessary to specify top-level every time when linting is executed. Advanced Category Flow file Defines the name of the flow file that should be attached to the current design and displayed in the Flow Manager window. Exclusins File Defines the name of .alintexclusions file. Exclusions file configure specified rules check for particular design elements (files, units, instances).

Figure 3. The Linting | Advanced window

105

ALINT

User's Guide

Global preferences linting entires are available at Linting | Entries page. Design specific entries are the following: Design units to skip from checking Specifies design unit to be skipped from checking . This is a compilation-time option. Global clock signals Specifies global clock signal required chip-level checks. Global reset signals Specifies global reset signal required chip-level checks.

Figure 4. The Linting | Entries window

106

ALINT

User's Guide

VHDL

Overview

The VHDL source files are compiled with the acom command. NOTE: The vcom command is a synonym for acom. The vcom command can be invoked directly from the operating system shell. The acom command works incrementally. Source files can be compiled one by one. Each successful invocation of acom adds new design units to the target library. The following is a typical tool chain: Prepare a library (alib) Compile (acom) Elaborate (asim)

Compilation-time linting for VHDL sources is run with acom -alint. The following is a typical tool chain: Prepare a library (alib) Run the linting process: Two commands Compilation-time: acom -alint -alint_elabchecks -f files.lst Elaboration-time: asim -alint top_level NOTE: if -alint_elabchecks is not used then the linting process will not be finalized for those rules that were postponed to elaboration stage (e.g. postponed due to parameter dependency)

All-in-one command alint -acom -f files.lst -asim top_level

Those steps can be performed either by using the GUI or with macro commands.

Compilation in GUI VHDL files opened in the HDL Editor can be compiled using the Compilation-time Linting button on the toolbar or pressing the F11 button. Also you can compile VHDL files using the Compilation-time Linting

107

ALINT

User's Guide

command from the right-click context menu. These options are equivalent of the hde.compile command from the Console window. See Integration with the Compiler topic for details. If VHDL files were added to a design, they can be compiled in the Design Manager window using the Compilation-time Linting for Selected File(s) option from the context menu or in the Console window using the design.file.compile command. See Workspace and Design Operations in GUI for more details.

Setting Compilation Options Relevant compilation options can be set either in the GUI or specified in the command line as command arguments. Options set in the GUI, i.e. in the Preferences dialog box or the design Properties dialog box affect GUI options or dot-commands that control the GUI interface. The ALINT GUI translates compilation settings from the Preferences dialog box into the compiler command-line arguments. Options set in the GUI have no effect on the low-level commands such as acom. When the compiler is invoked directly, either in a macro or by typing the acom command at the ALINT prompt (or the OS prompt), all arguments need to be specified manually. See Setting Preferences topic for details. Compiling with acom

The acom command compiles VHDL source files into a platform dependent binary code. The acom command works incrementally. Source files can be compiled one by one. Each successful invocation of acom adds new design units to the target library. Compiled units are stored in a library and are reusable. The simplified syntax of the acom command is presented below: acom [-work <library>] <filename> [<filename>...] -work <library_name> Specifies the logical name of the library into which library units resulting from the compilation will be placed. If omitted, the current working library is assumed. The name of the current library is stored in the $worklib ALINT variable. If the -work argument is omitted and the working library is not set, the compiler will report an error. <filename> The name of the source file to be compiled. You can specify several file names separated with spaces. NOTE: The vcom command is a synonym of acom. It can be invoked directly from the operating system shell. The following example shows how to create a library and compile the gates.vhd file from the src/ directory. # create library bjack alib bjack # set bjack as working library set worklib bjack

108

ALINT
# invoke the compiler acom src/gates.vhd For the full syntax see the acom command.

User's Guide

Run compilation-time linting with acom The acom command with the -alint switch is used to run compilation-time linting for VHDL source files. Compiled units are stored in a library and are reusable. The simplified syntax of the is presented below: acom [-work <library>] -alint [alint_options] <filename> [<filename>...] -work <library_name> Specifies the logical name of the library into which library units resulting from the compilation will be placed. If omitted, the current working library is assumed. The name of the current library is stored in the $worklib ALINT variable. If the -work argument is omitted and the working library is not set, the compiler will report an error. <filename> The name of the source file to be compiled. You can specify several file names separated with spaces. -alint Enables checks by the ALINT engine. [alint options] Options to control rule checking by ALINT engine. The following example shows how to create a library and run compilation-time linting for the gates.vhd file from the src/ directory. # create library bjack alib bjack # set bjack as working library set worklib bjack # invoke the compilation-time linting acom -alint -alint_elabchecks src/gates.vhd For the full syntax see the acom command.

Library Usage

A library used by the VHDL compiler can be a working library, a resource library, or both. A working library is the one into which the library units resulting from the source files compilation are placed. A resource library is a library containing library units that are referenced within the compiled source file. Only one library may be the working one during the compilation. But any number of libraries (including working library) may be referenced as resource libraries.

109

ALINT

User's Guide

Working Library By default the acom command compiles source files into the default working library. The name of the default working library is stored in the $worklib variable. The working library can also be specified with the -work argument for the compiler (acom), for example: acom -work basic src/gates.vhd The argument for the compiler takes precedence over the $worklib variable. If the $worklib variable is not set and the -work argument is not used, the compiler compiles the source files to the work library. If the work library does not exist, the compiler reports an error.

Resource Libraries Logical names of resource libraries are listed in the library clause preceding a design unit in VHDL source code. The following clause makes design units residing in the SIMPRIM library visible to the design unit that follows the statement: library SIMPRIM; Each design unit is to be preceded by the following implicit statements (even if they do not appear in source code): library STD, WORK; use STD.STANDARD.all; The first statement makes design units residing in the STD library and in the working library visible to the compiler. The logical name WORK always stands for the current working library, that is the library into which the source file is to be compiled, irrespectively of the actual logical name of the library. The second statement makes all the declarations in the STANDARD package from the STD library visible for the compiler.

Order of Analysis

The order of source files analysis is a consequence of visibility rules established in VHDL. A primary design unit must be compiled prior to the compilation of any corresponding secondary unit. For example, an entity declaration should be compiled prior to the compilation of its architecture bodies. A primary unit which name is referenced within a given design unit must be compiled prior to the compilation of the given design unit. For example an entity instantiated as a component in another architecture body should be compiled prior to the compilation of this architecture body. In other case, the second design unit depends on the first one. If a design unit has been modified and recompiled, all the dependent design units must also be recompiled. If a design unit contains an unresolved binding, the compiler prints a warning.

110

ALINT

User's Guide
acom src/blackjack.vhd # Compile... # ACOM: File: src\blackjack.vhd # ACOM: Compile Entity "bjack" # ACOM: Compile Architecture "STRUCTURE" of Entity "bjack" # ACOM: Warning: ELAB1_0026: c:/ALINT/examples/vhdl/samples/blackjack_vhdl/src/blackjack.vhd : (146, 0): There is no default binding for component "BJACK_C".(No entity named "BJACK_C" was found). # ACOM: Compile success 0 Errors 1 Warnings Analysis time : 0.0 [s] # ...done

After compiling the missing design unit (for example the BJACK_C entity) you have to recompile other units in which the missing unit was instantiated (for example the bjack entity).

Netlist Compilation Mode

The compiler supports fast VHDL compilation mode called netlist compilation. This mode reduces compilation time for big netlists. This mode is enabled automatically for architectures with large number of instantiations and signal assignments at the condition that the line count in the architecture body is greater than 10 000. Small files are always compiled in the regular mode. The netlist mode imposes certain restrictions on the syntax of the analyzed source code, for example VHDL blocks and generate statements are not supported. When the compiler encounters such unsupported statement then it automatically disables the netlist compilation mode and switches back to the regular mode. NOTE: The source code generated by synthesis and place and route usually meets the demands for the netlist compilation.

Disable Netlist Compilation Mode You may disable the netlist compilation with the -nonetlist argument for the acom command. This is useful only in situations when the compiler switches back from the netlist mode to the regular mode. This is indicated by the following message in the console: The compiler has detected errors or VHDL constructs preventing compilation in the netlist mode. The unit will be re-compiled in the normal mode. The -nonetlist argument prompts the compiler not to try the netlist compilation mode but to run the compilation in the regular mode. It reduces compilation time through avoid an attempt for netlist compilation.

Relaxing LRM Requirements

The -relax argument for the acom command relaxes some LRM requirements allowing you to compile code that would otherwise trigger a compiler error. A list of relaxed rules is provided below. Note that the set of relaxed rules depends on the VHDL version the compiler conforms to (1993 or 2002 and newer). The VHDL version is,

111

ALINT
where applicable, indicated by the corresponding compiler argument (-93, -2002, or -2008).

User's Guide

Visibility Rules When compilation is run in the -93 mode, units from the current working library are not visible to the compiler unless an explicit use clause is provided. The code in the listing below will not compile cleanly even if entity en exists in the working library. (Note that the use clause has been commented out.) --use work.en; entity test is end entity test; architecture test of test is begin U1 : entity en; end architecture test; When the -relax argument is used in the -93 mode, units from the working library become visible even without the use clause. When the compiler is running in the -2002 or -2008 mode, units from the working library are visible even if the -relax argument is omitted. In other words, the visibility rules in the -2002 and -2008 modes are the same as in the "relaxed" -93 mode.

32-bit Integers The LRM defines integer type as type INTEGER is range -2147483648 to 2147483647; Consequently, assigning values greater than 2147483647 (16#7FFFFFFF# ) is illegal, for example: signal s : integer:= 16#FFFFFFFF#; The compiler detect that the literal is out of range and reports an error. Argument -relax changes the compiler behavior so that 32-bit literals are treated as two's complement numbers. (In the declaration shown above signal s will be initialized to -1.)

Choices in the Case Statement The LRM requires all choices in a case statement to be locally static. The following code is illegal and will not compile because the second choice is a variable: process is variable vi, vc : integer; begin case vi is when 0 => null; when vc => null;

112

ALINT
when others => null; end case; wait; end process;

User's Guide

When you invoke the compiler with the -relax argument, the compiler error will be changed into a warning. (The warning explains that one of the choices is not locally static and therefore duplicate choices cannot be detected.) A similar principle applies to discrete ranges. Discrete ranges denoting choices in the case statement must be locally static. The following code is illegal and will not compile because the second range (1 to vc) is not locally static. process is variable vi, vc : integer; begin case vi is when 0 => null; when 1 to vc => null; when others => null; end case; wait; end process; You can change the compiler error into a warning by using the -relax argument. The compiler will warn that it cannot detect duplicate choices. NOTE: When non-locally-static choices are used, the compiler cannot detect if all possible values of the case expression are covered by case alternatives. Therefore, choice others must be present, whenever such non-locally-static choices are used.

Case Expression Type The case expression must be of a locally static type. The example below shows a case expression (addr) whose type (std_logic_vector (bus_size - 1 downto 0), where bus_size is a generic) is not locally static. library ieee; use ieee.std_logic_1164.all; entity example is generic ( bus_size : integer; addr_size : integer := 4 ); end example; architecture example of example is signal addr : std_logic_vector (bus_size - 1 downto 0); begin process is begin case addr (addr_size -1 downto 0) is when "000" => report "Choice 000";

113

ALINT
when "001" => report "Choice 001"; when others => null; end case; wait; end process; end architecture example; The compiler cannot determine the range of the addr vector and reports the following error. Case expression must be of a locally static subtype. When compilation is run with the -relax argument, the error is changed into a warning.

User's Guide

A similar example of a non-static case expression is shown in the listing below. (a, b, c, and d are input ports of the std_logic type.) case std_logic_vector'(a & b & c & d) is when "0000" => e<= "1000"; when "1100" => e<= "0100"; when "0110" => e<= "0010"; when "0011" => e<= "0001"; when others => e<= "0000"; end case; Such case statement can be compiled only if -relax is passed to the compiler.

Selected Signal Assignment The LRM requires choices and discrete ranges in the selected signal assignment to be locally static. Assuming that signals sel, p1, p2, and o are declared as follows: signal sel, p1, p2 : integer; signal o : std_logic_vector (1 downto 0); the assignment in the listing below is syntactically incorrect because the first two choices (when 0 to p1 and when p2) are not locally static. with sel select o <= "00" when 0 to p1, "01" when p2, "10" when others; The code can be compiled, when the -relax option is in effect. The compiler will warn that it cannot detect duplicate choices.

Non-conforming Subprogram Specifications The LRM requires the conformance of the subprogram specification in the subprogram declaration and in the subprogram body. Using the -relax argument relaxes the conformance rules with respect to the following:

114

ALINT

User's Guide

The default parameter value may appear only at the subprogram declaration and be omitted in the subprogram body, for example: package pack is procedure p (i: in integer := 2); end package; package body pack is procedure p (i: in integer) is begin end procedure p; end package body; The parameter direction may be omitted in the body if the direction in the declaration matches the default (in), for example: package pack is procedure p (i: in integer); end package; package body pack is procedure p (i : integer) is begin end procedure p; end package body; The parameter class may be omitted in the body if the class in the declaration matches the default (constant), for example: package pack is procedure p (constant i: in integer); end package; package body pack is procedure p (i : integer) is begin end procedure p; end package body; All examples in the list above can be compiled only when the -relax option is in effect. Otherwise, the compiler reports that the specifications are non-conforming and errors out.

VHDL Versions

ALINT can compile and check VHDL descriptions that conform to IEEE Std 1076-1993 (VHDL 1993) and IEEE 1076-2002 (VHDL 2002). Additionally, ALINT supports VHDL 2008 constructs. The default compiler mode is VHDL 2002. You can change the mode of operation either by passign the required argument to the VHDL compiler (i.e. the acom command) or by setting the appropriate option in the Preferences window or the project Properties window. Changing the GUI settings affects the command line generated for the compiler, either by the GUI or the design.compilation-time linting and workspace.compilation-time linting commands. The

115

ALINT

User's Guide

acom command itself does not read GUI settings so changing preferences in the GUI will have no effect on macros using the acom command directly.

VHDL 1993 The compiler (acom) can be switched to the VHDL 1993 mode with the -93 argument. When using GUI, the design.compilation-time linting or workspace.compilation-time linting commands, make sure that the standard version is set to 1076-1993 on the Linting | Languages | VHDL | General page in the Preferences window or the design Properties window. You may want to switch the compiler to the VHDL 1993 mode when compiling VHDL 1993 compliant code that uses shared variables. If the compilation is run in the default 2002 mode, the compiler will produce a warning whenever a shared variable is used that is not of a protected type.

VHDL 2002 VHDL 2002 (IEEE Std 1076-2002) is the successor to VHDL '93 (IEEE Std 1076-1993). The most significant changes in VHDL 2002 are the addition of protected types and modified rules for using shared variables. VHDL 2002 is the default mode of operation. The compiler (acom) invoked without any mode specific options will run in VHDL 2002. Likewise, the default GUI setting on the Linting | Languages | VHDL | General page in the Preferences window and the design Properties window is 1076-2002.

VHDL 2006 The term VHDL 2008 is used throughout ALINT to refer to the language defined by IEEE Std 1076-2008. The compiler (acom) can be switched to the VHDL 2008 mode with the -2008 argument. When using GUI, the design.compilation-time linting or workspace.compilation-time linting commands, make sure that the standard version is set to 1076-2008 on the Linting | Languages | VHDL | General page in the Preferences window or the design Properties window. Note that languages defined by drafts preceding IEEE Std 1076-2008, for example Draft IEEE P1076-2006/D3.2, are referred to as VHDL 2006.

VHDL Reference Guide Both VHDL 2002 and VHDL 2008 constructs supported by ALINT are listed in the VHDL Reference Guide. (The guide can be accessed from the Help menu.)

Mixing Various VHDL Versions VHDL files that conform to different versions of the VHDL standard must be compiled with separate invocations of the compiler. The units resulting from compilation can co-exist in one library. There are no limitations with regard to instantiating VHDL units compiled in different compiler modes, for example a unit compiled in the -2008 mode (and using VHDL 2008 language features) can be instantiated in a unit

116

ALINT
compiled in the -93 mode.

User's Guide

Certain limitations apply to using packages. VHDL units compiled in the -93 mode can use packages compiled in the -2002 or -2008 mode as long as those packages do not contain protected types. Packages containing protected types and packages referencing packages containing protected types are invisible to the compiler running in the -93 mode. A reference to package p containing protected types triggers the following error in the -93 mode: Unknown identifier `p'. Units compiled in different compiler modes (-93, -2002, and -2008) can be used in one design and elaborated.

Packages from the IEEE Library VHDL 2008 introduces several significant changes to the IEEE library. To prevent the user from having to remap the IEEE library each time before changing the compiler mode, ALINT comes with just one IEEE library whose contents adjust automatically to the compiler mode. The library can be used both with VHDL 93/2002 compliant code and with code using features from the draft of the VHDL 2008 specification. Depending on the mode, the compiler will have access either to VHDL 93/2002 compliant or VHDL 2008 compliant packages. The following packages are affected: Packages std_logic_1164, numeric_std, and numeric_bit package differ between VHDL 93/2002 and VHDL 2008. The Library Manager and the adir command show VHDL 2008 compliant package contents. The std_logic_textio package is empty in the 2008 mode. The Library Manager and the adir command show the package contents available in the 93/2002 mode. An attempt to use any subprograms from that package in the 2008 mode will trigger a compiler error. The numeric_bit_unsigned and numeric_std_unsigned packages can be used only in the 2008 mode. The fixed_pkg and fixed_float_types packages can be used only in the 2008 mode.

117

ALINT

User's Guide

Verilog

Overview

Verilog source files are compiled with the alog command. The following is a typical tool chain: Prepare a library (alib) Compile (alog) Elaborate (asim) Compilation-time linting for Verilog source is run with the alog -alint. The following is a typical tool chain: Prepare a library (alib) Run the linting process: Two commands Compilation-time: alog -alint -alint_elabchecks -f files.lst Elaboration-time: asim -alint top_level NOTE: if -alint_elabchecks is not used then the linting process will not be finalized for those rules that were postponed to elaboration stage (e.g. postponed due to parameter dependency)

All-in-one command alint -alog -f files.lst -asim top_level

Compilation commands in the GUI always invoke the compiler (i.e. the alog command) in the background. Compilation can be started by the GUI in the following ways: Clicking the Compilation-time Linting button in the HDL Editor (after a file has been opened). Selecting a file in the Design Manager and using a command from the pop-up menu (Compilation-time Linting for Selected File(s) or commands from the Compilation-time Linting with Dependencies submenu). Selecting a design in the Design Manager and using a command from the pop-up menu (Compilation-time Linting: Design(s) or commands from the Compilation-time Linting with Dependencies submenu). Selecting a workspace in the Design Manager and using the Compilation-time Linting: Workspace command from the pop-up menu. After the GUI starts the compilation process, the actual command line for the compiler (alog) is shown in the Console window. The command line includes compiler options and a list of source files. Linting options can be set in the Linting | Languages | Verilog category in the Preferences dialog box or the design Properties dialog box.

118

ALINT

User's Guide

Setting linting options in the GUI determines which options will be passed to the compiler by the GUI when compilation is invoked by a GUI action such as clicking the Compilation-time Linting button. However, linting options in the GUI do not affect macro execution or the operation of the alog command typed into the Console window.

Compiling with alog

The alog command compiles Verilog source files into platform dependent binary code. Compiled units are stored in a library and are reusable. This applies both to the top-level modules and the submodules. A simplified syntax of the alog command is presented below: alog [-work <library>] <filename> [<filename>...] -work <library> Specifies the logical name of the library where the units resulting from the compilation will be placed. If omitted, the current working library is assumed. The name of the current library is stored in the $worklib ALINT variable. If the -work argument is omitted and the working library is not set, the compiler reports an error. <filename> The name of the source file to be compiled. You can specify several file names separated with spaces. NOTE: The vlog command is a synonym for alog. The vlog command can be invoked directly from the operating system shell. The following example shows how to create a library and compile the gates.v file from the src/ subdirectory. # create library v_bjack alib v_bjack # set v_bjack as your default working library set worklib v_bjack # invoke the compiler alog src/gates.v For the full syntax see the alog command.

Run compilation-time linting with acom The alog command with the -alint switch is used to run compilation-time for Verilog source files. Compiled units are stored in a library and are reusable. A simplified syntax of the alog command is presented below: alog [-work <library>] -alint [alint_options] <filename> [<filename>...]

119

ALINT
-work <library>

User's Guide

Specifies the logical name of the library where the units resulting from the compilation will be placed. If omitted, the current working library is assumed. The name of the current library is stored in the $worklib ALINT variable. If the -work argument is omitted and the working library is not set, the compiler reports an error. <filename> The name of the source file to be compiled. You can specify several file names separated with spaces. -alint Enables checks by the ALINT engine. [alint options] Options to control rule checking by ALINT engine.

The following example shows how to create a library and run compilation-time linting for the gates.v file from the src/ subdirectory. # create library v_bjack alib v_bjack # set v_bjack as your default working library set worklib v_bjack # invoke the compilation-time linting alog -alint -alint_elabchecks src/gates.v For the full syntax see the alog command. Resource Libraries

The Verilog compiler (the alog command) can search for the library units in external resource libraries. Resource libraries can be specified with the -l argument. In the following example the source files are compiled into two different libraries. The modules defined in the or2.v and and2.v files are reused in the control.v. The -l argument in the second invocation of the alog command instructs the compiler to search the gatelib library for unresolved references. # create libraries alib gatelib alib work # compile source files alog -alint -alint_elabchecks -work gatelib and2.v or2.v alog -alint -alint_elabchecks -l gatelib -work work control.v The alog command prints a warning if a module contains unresolved instantiations. The listing below shows a warning caused by unresolved reference to the xor2 module . # ALOG: Warning: VCP2515 c:/designs/gl/src/phy.v : (48, 1): Undefined module: xor2 was used. Port connection rules will not be checked at such instantiations.

120

ALINT

User's Guide

The missing units have to be compiled to the design library before simulation is initialized. Otherwise the elaboration process will fail. NOTE: The resource libraries can only be specified during the compilation. It is not possible to specify an external library to be searched for unknown units during the elaboration.

Verilog Source Libraries

The alog commands supports the following arguments for the management of source libraries. -v <lib_name> Sets asource library file name -y <lib_dir> Sets source library directory +libext+<suffix> Sets source library files extension Source libraries are entirely different from binary libraries used natively in ALINT. The notion of source libraries is borrowed from Verilog simulators legacy. If you have used the source libraries before you can continue to do it in ALINT. The compiler searches for the source libraries during the compilation if the compiled files contain unresolved references. If modules from the source libraries also contain unresolved reference then the compiler performs an additional iteration and searches for the source libraries again. The example below shows how to compile the control.v file from the current directory. The control.v file contains unresolved references to and2 and or2. Consequently, the compiler searches the src/ directory for the files named and2.v and or2.v. The src/ directory is specified with the -y argument, the +libext+ argument specifies the .v file extension. # prepare a library alib work set worklib work # compile source files alog -dbg -y src/ +libext+.v control.v The -y argument specifies a source file which should be searched for the unresolved modules. alog -v src/gates.v control.v

The `uselib Directive The functionality offered by the -v, -y and +libext+ arguments can be embedded in the Verilog source code with the `uselib directive. The `uselib directive is not part of the IEEE standard but is supported by most

121

ALINT
simulators available on the market. The `uselib directive requires an attribute and a value: `uselib <attribute>=<value> The attribute can be any of the following: dir file libext

User's Guide

The Table 1 below shows the`uselib directives and equivalent command line arguments for the Verilog compiler: Table 1: The `uselib directive `uselib dir=src `uselib file=gates.v `uselib libext=.v `uselib dir=src libext=.v Equivalent command line argument -y src -v gates.v +libext+.v -y src +libext+.v

Options

Options for Verilog can be set in the Preferences dialog box in several pages under the Linting | Languages | Verilog category. Linting options can be set under the Linting category. When you invoke linting using the Compilation-time Linting command in the HDL Editor or the Design Manager, ALINT reads the settings specified in the Preferences dialog box and generates the appropriate command line arguments (alog). Note that the options are read by ALINT GUI, not by the compilation engine itself. It is the GUI that translates the settings in the Preferences dialog box into the command-line. When the compilation engine is invoked directly, either in a macro or by typing the alog or (vlog) commands at the ALINT prompt (or the OS prompt), all the arguments need to be specified manually.

Verilog 2001

This section lists language constructs introduced in the Verilog 2001 (IEEE Std 1364-2001) that are supported by the Verilog compiler and the elaborator. To disable Verilog 2001 constructs and force Verilog'95 mode pass the -v95 argument to the alog command.

ANSI C Style Declarations The module header can use the ANSI C style input and output declarations:

122

ALINT
// Verilog 2001 module u1 ( output reg [3:0] y, input wire [3:0] a, input wire [3:0] b ); endmodule This is equivalent to the following definition in Verilog-95: // Verilog-95 module u1 (y, a, b); output [3:0] y; input [3:0] a; input [3:0] b; reg[3:0] y; wire [3:0] a; wire [3:0] b; endmodule (LRM 12.3.4) The UDP header can use ANSI C style input and output declarations: // Verilog 2001 primitive dff(output reg q, input d); table 0 : 0 : 1; endtable endprimitive This is equivalent to the following definition in Verilog-95: // Verilog-95 primitive dff(q, d); output q; reg q; input d; table 0 : 0 : 1; endtable endprimitive (LRM 8.1) Port and data type declarations can be combined into one statement, for example: // Verilog 2001 output reg q; input wire a, b; This is equivalent to the following definition in Verilog-95 // Verilog-95 output q; reg q;

User's Guide

123

ALINT
input a, b; wire a, b; (LRM 12.3.3) Tasks and functions can be declared using the ANSI C style declarations, for example: task tv2k (output a, input b, c, input integer d); begin //... end endtask In Verilog-95 an equivalent task should be defined as follows: task tv95; output a; input b, c, d; integer i; begin //... end endtask (LRM 10.2, 10.3) Verilog registers can be initialized at the time they are declared, for example: reg i = 0; This is equivalent to the following code in Verilog-95: reg i; initial i=0; (LRM 6.2.1)

User's Guide

Net Declarations Net declaration assignments are supported. A net declaration assignment allows a continuous assignment in the same statement that declares the net, for example: wire (strong1, pull0) net4 = enable; (LRM 6.1.1)

Generate Statement The genvar statement declares a variable for use in generate loops. The variable can only be used as the loop index. (LRM 12.1.3.1)

124

ALINT

User's Guide

A generate-loop construct allows to instantiate multiple variable declarations, modules, user defined primitives, gate primitives, continuous assignments and initial and always blocks using a for loop. The example below generates eight assign statements, one for each bit of a. genvar i; generate for (i=0; i<8; i=i+1) begin : genloop assign a[i] = ^ b[WIDTH-i:0]; end endgenerate (LRM 12.1.3.2) A generate-conditional construct allows to conditionally instantiate modules, user defined primitives, gate primitives, continuous assignments and initial blocks and always blocks. The expression in the if statement is evaluated at the time the design elaborated. The example below shows an implementation of a parameterized module. Depending on the value of the width parameter either m1 or m2 will be instantiated. parameter width = 9; generate if (width<8) m1 #(width) MULT (.in1(a), .in2(b), .out1(c)); else m2 #(width) MULT (.in1(a), .in2(b), .out1(c)); endgenerate (LRM 12.1.3.3) A generate-case construct (LRM 12.1.3.4) allows to conditionally instantiate modules, user defined primitives, gate primitives, continuous assignments and initial blocks and always blocks. The instantiation is based on the condition in the case construct. The condition must be deterministic at the time the design is elaborated. The example below shows the implementation of parameterized module. Depending on the p1 parameter value the module m1, m2 or m3 will be instantiated. generate case (p1) 1 : m1 U1 (a, b, c); 2 : m2 U1 (a, b, c); default : m3 U1 (a, b, c); endcase endgenerate (LRM 12.1.3.4)

Constant Functions Constant functions are supported. They can be used in complex calculation at elaboration time. The availability of constant functions facilitates generated instantiation and model parameterization.

125

ALINT

User's Guide

Constant functions cannot contain any hierarchical references. Functions invoked from the constant functions must also be constant and local to the module. The only system task that can be invoked in a constant function is he $display function (and it will be ignored when invoked at elaboration time). (LRM 10.3.5)

Automatic Tasks and Functions Automatic tasks and automatic functions are supported. Each call to an automatic task or function dynamically allocates a unique storage for all local declarations. A task or function can be made automatic by using keyword automatic introduced in Verilog 2001. task automatic t1 (input a); begin #10; $display ("a equals %d\n", a); end endtask Tasks declared without keyword automatic are static, i.e. all items declared locally are shared among all concurrent task invocations. Likewise, all functions declared without keyword automatic are static, i.e. all items declared locally are shared among all recursive function calls. (LRM 10.2.1, 10.3.1)

Parameters Module parameters can be defined in a list using the following syntax: module v2k #(parameter width=32, depth=8); endmodule In Verilog-95 an equivalent module would be defined as follows: module v95; parameter width=32, depth=8; endmodule (LRM 12.1) Parameter values can be explicitly assigned by name: ff #(.width(32), .depth(1)) UUT (q, d, clk, r); Verilog-95 allows parameter assignment by an ordered list: ff #(32, 1) UUT (q, d, clk, r); (LRM 12.2.2.2) Parameters can be sized and typed, for example:

126

ALINT
parameter real a=1.2; parameter signed [3:0] a; This applies to local parameters as well.

User's Guide

(LRM 3.11.1) The localparam keyword is supported. Local parameters cannot be modified with the defparam statement or by the parameter value assignment. module mult (I0, I1, L0); localparam width = 8; // ... (LRM 3.11.2)

Arrays, Bit-selects and Part-selects Multidimensional arrays are supported, for example: // two two-dimensional arrays reg [7:0]arr1[7:0][7:0]; reg arr2[7:0][7:0]; (LRM 3.10) Arrays of nets are supported. An array of nets can be declared with the following syntax: // 16 element array wire arr1 [15:0]; // 16 element array of 8 bit vectors wire [7:0] arr2 [15:0]; (LRM 3.10) Bit-selects and part-selects are supported. reg r[7:0][7:0]; reg [7:0]s[7:0]; initial begin r[1][1] = 1'b1; s[1][1] = 1'b1; // ... end Indexed part-selects are supported. For vectors where the msb is less than the lsb (e.g. [0:15]) the following syntax is used: little_vec [msb_base_expr +: width_expr] It selects the width_expr number of bits starting from bit msb_base_expr. The bit range is ascending. The [2 +: 3] part-select selects bits [2:4] (i.e. three bits starting from bit 2). For vectors where the msb is greater than the lsb (e.g. [15:0]) the following syntax is used:

127

ALINT
big_vec [msb_base_expr -: width_expr]

User's Guide

It selects the width_expr number of bits starting from bit msb_base_expr. The bit range is descending. The [4 -: 3] part-select selects bits [4:2] (i.e. three bits starting from bit 4). Expressions used in indexed part-selects must be constant expressions. This is a limitation of the current version of the simulator. LRM allows that the msb_base_exp and the lsb_base_exp vary at run time. (LRM 4.2.1)

Signed Arithmetic Signed arithmetic is supported. Registers, nets and ports can be defined as follows: reg signed [7:0] r; wire signed [7:0] w; input signed [31:0] i; The $signed and $unsigned system tasks are supported. (LRM 4.5) The s notation can be used in the base specifier, for example: r = -4'sd2; (LRM 4.5.1) Signed functions are supported, for example: function signed [7:0] fs; (LRM 10.3.1)

Unsized Integer Constants Unsized integer constants where the high order bit equals Z or X are extended to the size of the expression containing the constant, for example: module m32; reg [47:0] r; initial r = 'bX01; endmodule It yields r equal XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX01 or {46'bX, 2'b01}. In Verilog 95 X and Z values are extended only to 32 bits. If you compile module m32 shown above passign the -v95 argument to the alog command (-v95 forces compatibility with Verilog 95), the elaboration will yield r equal 0000000000000000XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX01 or {16'b0, 30'bX, 2'b01}. (LRM 2.5.1)

128

ALINT

User's Guide

Operators The power operator is supported. The operator is represented by a double asterisk (**): real i; initial i=2**8; (LRM 4.1.5) The arithmetic left and right shift operators (<<< and >>>) are supported. Both operators shift the left operand by the number of bit positions given by the right operand, for example: s = s>>>3; If s is signed, the right shift fills the vacated bit positions with the MSB. If it is unsigned, the vacated bit positions are filled with zeros. The left shift fills vacated positions with zeros. (LRM 4.1.12)

Event Control Signals on the sensitivity list can be separated with a comma: always @(rst, posedge clk) Verilog-95 requires using the or keyword instead: always @(rst or posedge clk) (LRM 9.7.4) The implicit event expression list ( @(*) or @* ) is supported. The implicit event expression adds all nets and variables which are read by the statement (or a statement group) to the event expression, for example: always @(*) y = (a & b) | (c & d) | e; An equivalent statement in Verilog-95 is shown below: always @(a or b or c or d or e) y = (a & b) | (c & d) | e; (LRM 9.7.5)

129

ALINT
Input-Output Tasks

User's Guide

String read and write tasks are supported. These include: $swrite, $swriteb, $swriteo, $swriteh, $sformat. The statement below writes the string "Hello world\n" to register str. $swrite (str, "Hello world\n"); (LRM 17.2.3) File input-output system tasks and functions are supported. These include: $fgetc, $ungetc, $fflush, $fgets $rewind, $fscanf, $sscanf, $fread, $ftell and $fseek. Additionally, the $fopen task supports the Verilog 2001 syntax, which allows specifying the type of the file descriptor. Files can be opened both for reading and writing. The example below shows how to print the contents of the stimulus.txt file. It is assumed that each line in the file is 32 characters long. task readfile; integer fd; reg[32*8:1] str; begin fd = $fopen("stimulus.txt", "r"); while ($fgets(str, fd)) $write("%s", str); $fclose (fd); end endtask (LRM 17.2.4) The $ferror function is supported. After a fileio routine detects an error, the $ferror function can be used to obtain more information about this error. integer errno = $ferror (fd, str); The error code is returned in errno. A string description of the error is written into str. (LRM 17.2.7) The %u (or %U) and %z (or %Z) format specifications are supported. Both are defined for writing data without formatting i.e. as binary values. The %u (or %U) specification transfers the 2 value binary representation of the specified data to the output stream. Any unknown or high-impedance bits are treated as zero. The %z (or %Z) specification transfers the 4 value binary representation of the specified data to the output stream. Both %u (or %U) and %z (or %Z) formats are typically used in the $fwrite system task, for example: always @(din) begin fh = $fopen ("raw.txt", "w"); $fwrite (fh, "%z", din); $fclose (fh); end The data is written in the endian format native to the operating system where the simulator is running. This means that the output of the $fwrite task will likely differ between SPARC and Intel architectures. (All

130

ALINT
platforms supported by ALINT are little endian.) The data is written in units of 32 bits. (LRM 17.1.1.2)

User's Guide

Compiler Directives The following directives for conditional compilation are supported: `ifndef <macro_name> `elsif <macro_name> Verilog-95 defined only `ifdef, `else and `endif directives. The `ifndef compiler directive checks for the definition of a macro_name. If the macro_name is not defined, the lines following the `ifndef directive are included in compilation. The `elsif directive is an equivalent of the `else `ifdef ... `endif sequence. It must be preceded by an `ifdef or `ifndef directive. (LRM 19.4) The `line directive is supported. The directive resets the current line number and the filename to the line number and the filename specified in the directive, for example: `line 18 "original.v" 0 Such functionality may be useful for tools that instrument Verilog code. (LRM 19.7)

Compiler Directives

ALINT supports all the compiler directives defined in the Chapter 19 of the Verilog 2001 standard (IEEE Std 1364-2001) and several non-standard directives. The non-standard directives are either directives listed in the Annex D to the standard, the Aldec proprietary directives, or the Verilog-XL compatible directives.

Compiler Directives from IEEE Std 1364-2001 ALINT supports all the compiler directives defined in the Chapter 19 of the standard. These are: `celldefine, `default_nettype, `define, `else, `endcelldefine, `endif, `ifdef, `include, `nounconnected_drive, `resetall, `timescale, `unconnected_drive, `undef. Note that compiler automatically defines the _VCP string so the code immediately following the `ifdef _VCP directive will be compiled even if the _VCP macro is not explicitly defined either with the `define _VCP macro or the +define command line option for alog.

131

ALINT
`ifdef _VCP // code compiled by Aldec's compiler `else // code seen by other tools `endif Search the documentation for the _VCP string for more usage examples.

User's Guide

Compiler Directives from Annex D to IEEE Std 1364-2001 ALINT supports the following listed defined in te Annex D to the standard (Annex D is not a part of the standard): `delay_mode_distributed, `delay_mode_path, `delay_mode_unit, `delay_mode_zero, `disable_message.

The `include.ova and include.psl Directives These directives are used for embedding OVA and PSL assertions in the source code. The example below shows how to include the lights.ova file in Verilog source. `include.ova "lights.ova"

The `library Directive The `library directive specifies binding information. It can only be used inside module definition. The syntax of the directive is: `library ("<instance>", "<library>") The first argument specifies the instantiation label. The other is the logical name of a compiled library. Logical libraries are visible in the Library Manager and printed with the alist command. (Do not confuse compiled libraries with source libraries managed with the `uselib directive.) In the example below the `library directive specifies that the U3 instance in the current module comes from the altera_exemplar library. // synopsys translate_off `library("U3","altera_exemplar") // synopsys translate_on AND2 U3 ( .IN1(NET425), .IN2(NET404), .Y(NET403) ); The `library directive is frequently used by code generation tools, for example the Block Diagram Editor included in Active-HDL.

132

ALINT
The `uselib Directive

User's Guide

The `uselib directive facilitates the management of Verilog source libraries. See Verilog Source Libraries for details.

The `verilog_comp_off and `verilog_comp_on Directives The `verilog_comp_off directive disables compilation until the `verilog_comp_on directive is found. The example below shows how to disable compilation of a block of code between `verilog_comp_off and `verilog_comp_on. `ifdef _VCP `verilog_comp_off `endif // code that will not be compiled // and simulated by ALINT `ifdef _VCP `verilog_comp_on `endif Both directives (`verilog_comp_off and `verilog_comp_on) were surrounded by `ifdef _VCP ... `endif directives. The _VCP macro is defined in the Aldec Verilog compiler only. This makes the code work cleanly with other tools (e.g. with synthesis tools).

Verilog-XL Compiler Directives The following Verilog-XL directives are irrelevant for ALINT. ALINT silently ignores them to facilitate compilation of legacy Verilog-XL code: `accelerate, `autoexpand_vectornets, `disable_portfaults, `enable_portfaults, `expand_vectornets, `noaccelerate, `noexpand_vectornets, `noremove_gatenames, `noremove_netnames, `nosuppress_faults, `remove_gatenames, `remove_netnames, `suppress_faults.

Strict LRM Mode

By default ALINT compiles Verilog files in the industry standard mode. The industry standard mode allows several constructs that are widely accepted by the tools available on the market but are outside the scope of the LRM. Note that a number of constructs that were not allowed by the Verilog 1995 LRM, such as a comma on the sensitivity list, were incorporated into Verilog 2001 syntax. Industry standard extensions to the LRM include: Using an empty slot in the list of ports for the module: module m1(i,,j);

133

ALINT
Using a comma instead of the or keyword on the sensitivity list: @(a, b, c) Using a parameter in the specify block. parameter mov=4'b1001; specify if (opcode==mov) (i1=>ol) = (6.5, 8.0); // ... endspecify Using an empty parameter list in the invocation of a user task: $usertask(); Using a reg argument for the %v escape sequence in the format specification:

User's Guide

reg r; initial $display("r strength value is %v", r); Using real constants, real expressions, bit-selects and part-selects as operands in timing check conditions. The LRM allows only scalar expressions and scalar constants. To force the strict LRM mode, pass the -j argument to the alog command. The strict LRM mode disables industry standard extensions.

Preprocessor Extensions

The Verilog compiler in ALINT supports both standard Verilog preprocessor and a C-like preprocessor. This section describes only the C-like preprocessor extensions. For a description of the standard Verilog preprocessor, see the Verilog LRM.

C-like #define Except for standard Verilog `define's, ALINT also supports C-like #define's. Verilog defines are expanded only if they start with the tick sign (`). C-like defines are expanded without any additional signs. This is demonstrated in the listing below. `define name1 n1 #define name2 n2 module `name1; endmodule module name1; endmodule module name2; endmodule

134

ALINT

User's Guide

The first line defines macro name1 using Verilog `define statement. Line two defines macro name2 with a C-like define. After compilation, the following modules will be added to the library: n1 This module results from the compilation of the following code: module `name1; endmodule Macro `name1 is expanded to n1 using a standard Verilog preprocessor. name1 This module results from the compilation of the following code: module name1; endmodule The name1 string is not expanded by the standard Verilog preprocessor because it is not preceded by the backtick (`). n2 This module results from the compilation of the following code: module name2; endmodule Macro name2 is expanded to n2 using the C-like preprocessor.

`if defined and #if defined Directives Except for the `ifdef directive described in the Verilog LRM, ALINT also supports the C-like `if defined and #if defined directives. These directives simplify writing of compound expressions. For example: #if defined (ALDEC) || defined (ALINT) module m_or; endmodule #endif #if defined (ALDEC) && defined (ALINT) module m_and; endmodule #endif Module m_or will be compiled if either ALDEC or ALINT are defined. Module m_and will be compiled when both ALDEC and ALINT are defined. Allowed operators include: &&, ||, >, <, <=, >=, ==, !=, +, -, *

135

ALINT
C-like #if, #elif, and #endif C-like #if, #elif, and #endif directives are allowed, for example: #if A=1 //... #elif B=1 //... #endif

User's Guide

C-like <include> There are two ways to specify include files in ALINT. `include "filename" This is a standard Verilog include directive. The included file is searched for in the same directory where the source file is located. Additional include directories can be specified with the -incdir or +incdir+ arguments for the Verilog compiler (alog). `include <filename> This is an extended, C-like, include statement. ALINT searches for files included with the `include directive using the +sysincdir+<directory> arguments for the Verilog compiler (alog).

SystemVerilog Extensions The `define macro text can include `` (a double backtick) and `" (a backtick followed by quotes). A double backtick can be used to delimit lexical tokens without introducing white space. For example: `define test(no) tb``no module `test(3); endmodule When the above code is compiled, module tb3 will be stored in the library. (Macro `test(3) expands to tb3.) Sequence `" changes the meaning of the quotation mark and allows the preprocessor to expand macro arguments inside a string literal. The difference between regular quotes and quotes preceded by a backtick is shown below: `define msg1(str) "The message is: str." `define msg2(str) `"The message is: str.`" The preprocessor will expand str only in the second macro (msg2). initial begin $display (`msg1(hello)); $display (`msg2(hello)); end When simulation is run, the following messages will be displayed:

136

ALINT
The message is: str. The message is: hello.

User's Guide

ALINT allows using this extension also in Verilog 95 (i.e. when the compiler is invoked with the -v95 argument) and in Verilog 2001 (-v2k).

Directives for Reporting Messages, Warnings, and Errors The following directives can be used to make the compiler report a message, a warning, or an error during runtime. `pragma message("<string>") `warning("<string>") `error("<string>") The above pragmas, combined with conditional directives can be used for source code checking during compilation. For example: `if BUFSIZE < 256 `error("The buffer size is to small."); `error("Set at least to 256 using +define+BUFSIZE=..."); `endif If BUFSIZE is less than 256, the compiler will report an error and compilation will be aborted.

C Style Macros

The Verilog compiler in ALINT supports two C style macros: The`__FILE__ and `__LINE__. The `__FILE__ macro expands to the string with the name of the source file. The `__LINE__ macro expands to the decimal constant with the current line number. The two macros are very convenient for printing messages from the source code. The code below includes the $display task that reports the file name and the line number in which an assertion happened: always @(clk) begin if (c==2) begin $display("%s(%d): %s",`__FILE__,`__LINE__,"assertion!"); end end Assuming that the $display task is located in the 20th line of file test.v, the following message will be printed to the console if the statement is executed: test.v(20): assertion!

137

ALINT

User's Guide

Note that the `__FILE__ and `__LINE__ macros are outside the scope of the LRM and limit the portability of your code.

138

ALINT

User's Guide

Working with Results

Overview
AVDB file is the result of compilation and elaboration stage linting. It is being created automatically according to settled preferences (see Save Linting Results) and contains all the violations that were detected while linting. AVDB file is created after running linting from GUI or after the following commands are being executed with -alint_avdb argument used: acom and asim - for VHDL alog and asim - for Verilog alint - for VHDL and/or Verilog It is possible to save AVDB files, convert them to different formats, filter and compare the results. See more details see in the Save Linting Results, Manage Linting Results, AVDB file Listing, AVDB Files Comparison, AVDB Files Copy and AVDB Files Clear sections. There is a convenient way to work with linting results stored in the AVDB file using GUI - Violation Viewer. This component provides a number of means to filter, sort, group violations, modify the database content (remove violations, apply statuses to them) and also convert content of the AVDB file to other formats.

Save Linting Results


The linting results may be saved in the following two formats: plain text and binary AVDB file (ALINT Violations Data Base contains ALINT violations detected during linting session.

Save linting results from Console To save linting results to the .txt file use the -alint_report switch. Specified report file will contain plain violations listing. Such form is difficult to analyze especially for large designs. Use AVDB file for storing linting results. To save linting results to the AVDB file use the -alint_avdb switch. Once AVDB file is generated, working with violation messages becomes more convenient. Use Violation Viewer to open and analyze such database. Results can be converted/filtered to other formats, such as .html, .txt, and .csv, using the following commands correspondingly: avdb2txt, avdb2csv and avdb2html.

Save linting results from GUI In GUI operation mode, the linting results can be managed via the Tools | Preferences... dialog box (Figure 1). Select the Linting | General window and set names for text or/and AVDB file reports. Absolute or relative path may be used. If a path is not specified then a file will be generated in the working directory.

139

ALINT

User's Guide

Figure 1. The Preferences | Linting | General window.

Automatic results update between linting sessions Text file (-alint_report) is simply appended once new linting session is started. But the following rules apply when dealing with .avdb files: compilation-time linting overrides both compilation-time and elaboration-time results by design unit names; elaboration-time linting overrides elaboration-time results only, by instance names; violations detected in new design units (i.e. units that were analyzed in the current session only) are appended; violations detected in old design units (i.e. units that were analyzed in the previous session only) are not changed. Examples: alint -alint_avdb test.avdb dff.v 1. Step #1: test.avdb is created:

140

ALINT
module dff (data, clk, rst, q); input data, clk, rst; output reg q; always @(posedge clk or negedge rst) // violation: polarity mismatch if (rst) q <= 0; else q <= data; endmodule

User's Guide

2.

Step #2: test.avdb is updated (previously detected violation is automatically deleted for design unit "dff"):

module dff (data, clk, rst, q); input data, clk, rst; output reg q; always @(posedge clk or negedge rst) // polarity fixed if (!rst) q <= 0; else q <= data; endmodule

Manage Linting Results

141

ALINT
View linting results

User's Guide

To view linting results and to see all the violations listed in AVDB file generated after linting it is convenient to use the Violation Viewer. To find more about the Violation Viewer, to see its structure and available functions refer to the Violation Viewer section.

Convert linting results It is possible to convert linting results from AVDB files to .txt, .csv, .html formats. It may be done both from the console and GUI. To convert AVDB file to other format from the console use the following commands:avdb2txt, avdb2csv, and avdb2html. For more information refer to the AVDB file Listing section. Refer to the Violation Viewer section to convert AVDB file from GUI.

Filter linting results To filter linting results in the AVDB file from the console refer to: the AVDB file Listing section - from the console the Violation Viewer section - from GUI

Compare linting results It is possible to compare results of 2 linting sessions, or in other words 2 AVDB files. The result of comparison is saved to AVDB file that has different format. This file is supported by GUI. However you can perform standard listing operations (see AVDB file Listing). Such comparison may be started both from GUI (see the AVDB Compare Dialog section) and from the Console (see the AVDB Files Comparison section).

Copy linting results It is also possible to copy violation database to another database of the same type. For more details refer to the AVDB Files Copy section.

AVDB Files Listing


Once AVDB file is generated, working with violation messages becomes more convenient. For example, it is possible to display filtered subset of violations in desired order - by using avdb2txt command, or compare results of different linting sessions by using avdbcompare command (see also AVDB Files Comparison), generate coloured HTML report using avdb2html command, generate CSV spreadsheet report using avdb2csv for further processing in third-party software, it is also possible to copy violation database to another database of the same type with avdbcopy command.

142

ALINT
Source AVDB file may be generated in 2 ways:

User's Guide

AVDB file may contain violations collected during a linting session(s) (for such generation of AVDB files refer to -alint_avdb switch description of alint, alog, acom or asim command) AVDB file may contain comparison result generated by avdbcompare command (see also AVDB Files Comparison)

All 3 commands for AVDB files listing (avdb2txt, avdb2csv, avdb2html) have similar syntax which is described below. The only differences are that avdb2csv and avdb2html do not output to the console (they require -report argument) and avdb2html does not have -summary argument.

Syntax: avdb2txt <filename.avdb> [options] [filters] [order] options ::= { -policy_path <directory> | -ruleset_path <directory> | -plugins_file <config_file> | -regex_filters | -report <filename> | -summary { origin | policy | rule | rulelevel | severity | source } }

avdb2csv <filename.avdb> -report <filename> [options] [filters] [order] options ::= { -policy_path <directory> | -ruleset_path <directory> | -regex_filters | -summary { origin | policy | rule | rulelevel | severity | source } | -separator "<separator_name> }

avdb2html <filename.avdb> -report <filename> [options] [filters] [order] options ::= { -policy_path <directory> | -ruleset_path <directory> | -regex_filters}

filters ::= { -instance <instance_name>

143

ALINT
| | | | | | | | | | | | | | | | -instance_regex {<instance_name>} -maxseverity { information | warning | critical | error } -minseverity { information | warning | critical | error } -maxrulewarn { <number> | none } -maxwarn { <number> | none } -policy <policy_name> -rule <rule_name> -rule_regex {<rule_name>} -rulelevel { rule | r1 | r2 | r3 | sug } -ruleset <ruleset_name> -source <filename> -source_regex {<filename>} -new { <number> | all } -changed { <number> | all } -revised { <number> | all } -unchanged { <number> | all }

User's Guide

| -unit <unit_name> | -unit_regex {<unit_name>} } order ::= { -order [criterion] | -order_asc [criterion] | -order_desc [criterion] } criterion ::= { origin | rule | rulelevel | severity | source }

Filter options present different filter types - they may be combined to broaden the filtration criteria. Any number of filters in different combinations may be specified to adjust the target listing. If no filters are displayed - simply all violation messages from the source AVDB database will be listed. Filters of different types narrow the search (e.g. -source & -unit), i.e. only violations satisfying all different type filters will be selected. Filters of the same type (e.g. -source & -source) broaden search inside this particular filter type, i.e. all violations satisfying at least one of the same type filters will be selected. Sort order options allow to sort selected violations by the specified criterion in ascending or descending order. -policy_path Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. Syntax: -policy_path <directory> If -policy_path switch is not specified, then specified policy must exist in the working directory. Example:

144

ALINT

User's Guide
avdb2txt my.avdb -report my.txt -policy_path /home/designs/alint_cfg -policy RTL_POL -policy DFT_POL

In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be listed. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist either in the working directory or in the /home/designs/alint_cfg directory. -ruleset_path Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. Syntax: -ruleset_path <directory> If -ruleset_path switch is not specified, then specified ruleset must exist in the working directory. Example: avdb2txt my.avdb -report my.txt -ruleset_path /home/designs/alint_cfg -policy RTL_rules -policy DFT_rules In the above example only violations of rules which belong to either of two specified rulesets ("RTL_rules" or "DFT_rules") will be listed. It is supposed that both RTL_rules.ruleset and DFT_ruleset.ruleset files exist either in the working directory or in the /home/designs/alint_cfg directory. -plugins_file <config_file> Defines a path to the additional configuration file for ALINT rule plug-ins in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. Syntax: -plugins_file <config_file> Example: avdb2txt my.avdb -report my.txt -rule MY_PLUGIN.RULE1 -plugins_file "my.plugins" In the above example only violations of "MY_PLUGIN.RULE1" rule will be listed. It is supposed that RULE1 belongs to plug-in MY_PLUGIN which is specified within file "my.plugins". -regex_filters Controls processing of all filters as regular expressions. Syntax: -regex_filters If -regex_filters switch is specified, then all arguments supplied in filter options will be treated as regular expression patterns, regardless of specified filter mode (usual or "_regex").

145

ALINT
Example: avdb2txt my.avdb -source {my_subdir/*.v} -module RX -module_regex {RAM_((1024)|(2048))} -regex_filters

User's Guide

In the above example all filters will be processed as regular expressions, even those without "_regex" suffix. Pay attention while using this switch. The above example is equal to the following (the first -source filter will not give the same result, since asterisk * has different meaning in wildcards and regular expression modes): avdb2txt my.avdb -source_regex {my_subdir/*.v} -module_regex RX -module_regex {RAM_((1024)|(2048))} -report Specifies the target file name, where ALINT violation messages should be listed to. Syntax: -report <filename> If -report switch is not specified, then AVDB listing will be displayed to the console. Example: avdb2txt my.avdb -report my_report.txt In the above example violations will be listed to "my_report.txt" file. -separator Sets the specified text as the separator for CSV format. Default separator is semicolon (";"). -summary Prints a summary according to specified criterion/criteria. Summary tree may be built combining several criteria. Syntax: -summary { origin | policy | rule | rulelevel | severity | source } If several criteria are specified - summary tree will be built according to an order of criteria specifications with -summary switches. Summary tree leaves and branches show numbers of violations accumulated for the last specified criterion. Examples: avdb2txt my.avdb -summary source -summary rule The above example shows which rules were violated in which source files. avdb2txt my.avdb -summary policy -summary source The above example shows which source files were linted using which policy. avdb2txt my.avdb -summary rulelevel -summary origin

146

ALINT
The above example groups problematic modules by the rule level.

User's Guide

NOTE: Each violation belongs either to instance or unit or artificial "--/* Global Scope */--" unit that contains global scope violations, such as illegal Verilog preprocessor usage. For example, the "unit" criterion includes compilation-time violations which belong to some module, not instance. -instance Selects all rule violations detected in specified instance. Syntax: -instance <instance_name> Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be listed (without violations from parent and child instances, or other instances of the same unit). Example: avdb2txt my.avdb -report my.txt -instance UUT -instance UUT.RX -instance UUT.RAM* In the above example list will contain only violations detected in either of two explicitly specified instances ("UUT" or "UUT.RX") and all violations from instances which names match UUT.RAM* pattern (for example "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc.). -instance_regex Selects all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. Syntax: -instance_regex {<instance_name>} Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be listed (without violations from parent and child instances, or other instances of the same unit). The argument must be enclosed in braces. Example: avdb2txt my.avdb -report my.txt -instance_regex {UUT(\.(RX)|(RAM\d*))?} In the above example list will contain only violations detected in instances which names match to specified regular expression, for example "UUT", "UUT.RX", "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc. -maxseverity Selects all rule violations with the severity less or equal to specified level. The option is followed by one of the predefined severity levels (without braces). Syntax: -maxseverity { information | warning | critical | error }

147

ALINT

User's Guide

If combined with other filters, -maxseverity limits their sets of selected violations to specified severity level from above. When combined with -minseverity, it creates a range of allowed severity levels for violations which should be listed. Severity level specified in -maxseverity cannot be less than a level specified in -minseverity. Example: avdb2txt my.avdb -report my.txt -maxseverity critical In the above example violations of rules with severity less or equal to "critical" ("critical", "warning" and "info") will be listed. -minseverity Selects all rule violations with the severity greater or equal to specified level. The option is followed by one of the predefined severity levels (without curly braces). Syntax: -minseverity { information | warning | critical | error } If combined with other filters, -minseverity limits their sets of selected violations to the specified severity level from below. When combined with -maxseverity, it creates a range of allowed severity levels for violations, which should be listed. The severity level specified in -minseverity cannot be greater than a level specified in -maxseverity. Example: avdb2txt my.avdb -report my.txt -minseverity warning -maxseverity error In the above example violations of rules with severity equal to "warning", "critical" and "error" will be listed. -maxrulewarn <maximum_number_of_warnings_for_one_rule> Limits the maximum number of total rule violations listed for a single rule. Similar to -alint_maxrulewarn ALINT option. Syntax: -maxrulewarn { <decimal_natural_number> | none }

Parameters description: <decimal_natural_number> - sets the maximum number of messages for one rule listed: an integer number starting from 0 none - no limit, messages for all violations of every rule will be listed; total number of messages still can be limited by -maxwarn option. The default avdb2txt behavior corresponds to -maxrulewarn 100. Examples:

148

ALINT
avdb2txt my.avdb -report my.txt -maxrulewarn 5 In the above example warning messages limit for each rule is set to 5. avdb2txt my.avdb -report my.txt -maxrulewarn none In the above example warning messages limit for each rule is absent. -maxwarn <maximum_number_of_warnings>

User's Guide

Limits the maximum number of total rule violations listed. Similar to -alint_maxwarn ALINT option. Syntax: -maxwarn { <decimal_natural_number> | none }

Parameters description: <decimal_natural_number> - sets the maximum number of messages listed in a report: an integer number starting from 0 none - no limit, messages of all violations will be listed The default behavior corresponds to -maxwarn 500. Examples: avdb2txt my.avdb -report my.txt -maxwarn 20 In the above example warning messages limit is set to 20. avdb2txt my.avdb -report my.txt -maxwarn none In the above example warning messages limit is absent. -policy Selects all violations of rules belonging to specified policy. Syntax: -policy <policy_name> Both built-in and custom rulesets may be used for filtering. Example: avdb2txt my.avdb -report my.txt -policy RTL_POL -policy DFT_POL In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be listed. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist in the working directory.

149

ALINT
-rule Selects violations detected for specified rule. Syntax: -rule <rule_name>

User's Guide

Rule name here consists may be either rule "external name" (e.g. "STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). "Internal" and "external" names may be looked up in the rules list of a rule plug-in (see Available Rule Plug-ins). Example: avdb2txt my.avdb -report my.txt -rule STARC_VLOG.2.3.* -rule STARC_VLOG.STARC_KEYWORDS In the above example list will contain only violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3. -rule_regex Selects violations detected for specified rule. Same as -rule but allows regular expression matching. Syntax: -rule_regex {<rule_name>} Rule name here may be either rule "external name" (e.g. "STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). Main ruleset corresponds to rule plug-in. "Internal" and "external" names may be looked up in the rules list of a rule plug-in (see Available Rule Plug-ins). The argument must be enclosed in braces. Example: avdb2txt my.avdb -report my.txt -rule_regex {STARC_VLOG\.2\.3} -rule_regex {STARC_VLOG\.\w+_KEYWORDS} In the above example list will contain only violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3. -rulelevel Selects all violations of rules corresponding to the specified rule level. Argument of this filter is a mnemonic of one of five rule levels. Syntax: -rulelevel { rule | r1 | r2 | r3 | sug } Mnemonics correspond to the following rule levels:

150

ALINT
rule - Rule r1 - Recommendation 1 r2 - Recommendation 2 r3 - Recommendation 3 sug - Suggestion

User's Guide

Example: avdb2txt my.avdb -report my.txt -rulelevel rule -rulelevel r1 In the above example only violations of rules with level equal to "Rule" or "Recommendation 1" will be listed. -ruleset Selects all violations of rules belonging to the specified ruleset. Syntax: -ruleset <ruleset_name> Both built-in and custom rulesets may be used for filtering. Example: avdb2txt my.avdb -report my.txt -ruleset RTL_RS -ruleset DFT_RS In the above example only violations of rules which belong to either of two specified rulesets ("RTL_RS" or "DFT_RS") will be listed. It is supposed that both RTL_RS.alintruleset and DFT_RS.alintruleset files exist in the working directory . -source Selects all rule violations detected in the specified source file. Syntax: -source <filename> Rule violations detected in the specified source file will be listed to the target. In case of using * and/or ? wildcards - enclose the argument in single-quotes ('<filename>') or double-quotes("<filename>"). Example: avdb2txt my.avdb -report my.txt -source rx.v -source tx.v In the above example only violations detected in either of two specified source files ("rx.v" or "tx.v") will be listed. -source_regex Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. Syntax:

151

ALINT
-source_regex '<filename>'

User's Guide

Rule violations detected in the specified source file(s) will be listed to the target. The argument must be enclosed in single-quotes ('<filename>') or double-quotes("<filename>"). Example: avdb2txt my.avdb -report my.txt -source_regex '\wx\.v' In the above example list will contain only violations detected in source files which names match specified pattern (for example "rx.v" or "tx.v"). -new Selects only new rule violations - i.e. internally marked as new in the source AVDB file. This filter may be applied only to AVDB file containing ALINT results comparison (see AVDB Files Comparison). There is also a possibility to limit the maximum number of new violations. Syntax: -new { <max_number> | all } If <max_number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value "all" is specified, then all new violations will be listed. If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdb2txt my.avdb -new all In the above example only new violations will be listed. avdb2txt my.avdb -new 150 In the above example only first 150 of new violations will be listed. Default order - by violation source point. avdb2txt my.avdb -new 150 -order_desc rulelevel In the above example only first 150 of new violations will be listed. Violations are sorted by the rule level in descending order. avdb2txt my.avdb -new 0 In the above example no new violations will be listed. Violations of other types will be listed, if any. -changed Selects only changed rule violations. This filter may be applied only to AVDB file containing a comparison result (see AVDB Files Comparison). There is also a possibility to limit the maximum number of changed violations. Syntax:

152

ALINT
-changed { <max_number> | all }

User's Guide

If <max_number> value is a positive integer number, then changed violations count will be limited to the specified value. If the predefined value "all" is specified, then all changed violations will be listed. If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdb2txt my.avdb -changed all In the above example all changed violations will be listed. avdb2txt my.avdb -changed 100 In the above example only first 100 of changed violations will be listed. Default order - by violation source point. avdb2txt my.avdb -changed 100 -module RX_TOP In the above example only first 100 of changed violations will be listed. Only violations from the "RX_TOP" module will be selected for listing. Sorting order is default - by violation source point, ascending. avdb2txt my.avdb -changed 0 In the above example no changed violations will be listed. Violations of other types will be listed, if any. -revised Selects only revised rule violations. This filter may be applied only to AVDB file containing a comparison result (see AVDB Files Comparison). There is also a possibility to limit the maximum number of revised violations. Syntax: -revised { <max_number> | all } If <max_number> value is a positive integer number, then revised violations count will be limited to the specified value. If the predefined value "all" is specified, then all revised violations will be listed. If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdb2txt my.avdb -revised all In the above example only revised violations will be listed. avdb2txt my.avdb -revised 200 In the above example only first 200 of revised violations will be listed. Default order - by violation source point. avdb2txt my.avdb -revised 200 -order_asc instance In the above example only first 200 of revised violations will be listed. Violations are sorted by instance name in ascending order.

153

ALINT
avdb2txt my.avdb -revised 0

User's Guide

In the above example no revised violations will be listed. Violations of other types will be listed, if any. -unchanged Selects only unchanged rule violations. This filter may be applied only to AVDB file containing a comparison result (see AVDB Files Comparison). There is also a possibility to limit the maximum number of unchanged violations. Syntax: -unchanged { <max_number> | all } If <max_number> value is a positive integer number, then unchanged violations count will be limited to the specified value. If the predefined value "all" is specified, then all unchanged violations will be listed. If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdb2txt my.avdb -unchanged all In the above example all unchanged violations will be listed. avdb2txt my.avdb -unchanged 50 In the above example only first 50 of unchanged violations will be listed. Default order - by violation source point. avdb2txt my.avdb -unchanged 50 -minseverity warning In the above example only first 50 of changed violations will be listed. Only violations of rules with severity level greater or equal to "warning" will be selected. Sorting order is default - by violation source point, ascending. avdb2txt my.avdb -unchanged 0 In the above example no unchanged violations will be listed. Violations of other types - i.e. "new", "changed" and "revised" will be listed, if any. -unit Selects all rule violations detected in specified unit. Syntax: -unit <unit_name> Rule violations from all instances of specified unit will be listed (not including violations detected in instantiated child units). Example: avdb2txt my.avdb -report my.txt -module MUX4 -module RX_top

154

ALINT

User's Guide

In the above example only violations detected in either of two specified modules ("MUX4" or "RX_top") will be listed. -unit_regex Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching. Syntax: -unit_regex {<unit_name>} Rule violations from all instances of specified unit will be listed (not including violations detected in instantiated child units). The argument must be enclosed in braces. Example: avdb2txt my.avdb -report my.txt -module_regex {MUX[24]} -module_regex {[RT]X_top} In the above example list will contain violations detected in only units which names match specified patterns. The first pattern matches "MUX2" and "MUX4". The second one matches "RX_top" and "TX_top". -order|-order_asc|-order_desc There is a possibility to control the order of violation messages output by applying certain sorting order switch: -order : sort in ascending order -order_asc : same as -order - sort in ascending order -order_desc : sort in descending order Syntax: -order [criterion] -order_asc [criterion] -order_desc [criterion] criterion ::= { origin | rule | rulelevel | severity | source } Sorting order criterion is a predefined word that specifies a violation property, by which the sorting should be performed. Default sorting order is by violation source point, ascending. Examples: avdb2txt my.avdb -order instance avdb2txt my.avdb -order_asc instance Two above examples have the same effect - violations listing will be sorted by names of instances in which violations were detected, in ascending order (-order and -order_asc are synonyms). avdb2txt my.avdb -order_desc source

155

ALINT

User's Guide

In the above example violations listing will be sorted by names of source files in which violations were detected, in descending order (from "Z" to "A"). NOTE: While sorting by the "origin" criterion - first will be displayed the compilation-time violations, then the elaboration-time violations .

AVDB Files Comparison


avdbcompare is a console command that compares contents of two AVDB files (for generation of AVDB files refer to description of -alint_avdb option in alint, alog, acom or asim commands). Violations collected during two linting sessions may be compared to analyze new, revised and changed violations. Different filters are possible. The result of comparison is saved to another AVDB file and plain text report. Syntax: avdbcompare <old_file.avdb> <new_file.avdb> [options] [filters] [order] options ::= { -policy_path <directory> | -ruleset_path <directory> | -plugins_file <config_file> | -o <filename> | -report { <filename> | console | null } | -regex_filters | -summary { <filename> | console | null } } filters ::= { -instance <instance_name> | -instance_regex <instance_name> | -maxrulewarn <amount> | -maxseverity { information | warning | critical | error } | -minseverity { information | warning | critical | error } | | | | | | | | | | | -policy <policy_name> -rule <rule_name> -rule_regex {<rule_name>} -rulelevel { rule | r1 | r2 | r3 | sug } -ruleset <ruleset_name> -source <filename> -source_regex {<filename>} -new { <max_number> | all } -changed { <max_number> | all } -revised { <max_number> | all } -unchanged { <max_number> | all }

| -unit <unit_name> | -unit_regex {<unit_name>} }

156

ALINT
order ::= { -order [criterion] | -order_asc [criterion] | -order_desc [criterion] } criterion ::= { origin | rule | rulelevel | severity | source }

User's Guide

Filter options present different filter types - they may be combined to broaden the filtration criteria. Any number of filters in different combinations may be specified to adjust the target listing. If no filters are displayed - simply all violation messages from both AVDB databases will be compared. Filters of different types narrow the search (e.g. -source & -unit), i.e. only violations satisfying all different type filters will be selected. Filters of the same type (e.g. -source & -source) broaden search inside this particular filter type, i.e. all violations satisfying at least one of the same type filters will be selected. Sort order options allow to sort selected violations by the specified criterion in ascending or descending order. -policy_path Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. Syntax: -policy_path <directory> If -policy_path switch is not specified, then specified policy must exist in the working directory. Example: avdbcompare my1.avdb my2.avdb -report my.txt -policy_path /home/designs/alint_cfg -policy RTL_POL -policy DFT_POL In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be compared. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist either in the working directory or in the /home/designs/alint_cfg directory. -ruleset_path Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. Syntax: -ruleset_path <directory> If -ruleset_path switch is not specified, then specified ruleset must exist in the working directory. Example:

157

ALINT
avdbcompare my1.avdb my2.avdb -report my.txt -ruleset_path /home/designs/alint_cfg -policy RTL_rules -policy DFT_rules

User's Guide

In the above example only violations of rules which belong to either of two specified rulesets ("RTL_rules" or "DFT_rules") will be compared. It is supposed that both RTL_rules.ruleset and DFT_ruleset.ruleset files exist either in the working directory or in the /home/designs/alint_cfg directory. -plugins_file <config_file> Defines a path to the additional configuration file for ALINT rule plug-ins in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. Syntax: -plugins_file <config_file> Example: avdbcompare my1.avdb my2.avdb -report my.txt -rule MY_PLUGIN.RULE1 -plugins_file "my.plugins" In the above example only violations of "MY_PLUGIN.RULE1" rule will be compared. It is supposed that RULE1 belongs to plug-in MY_PLUGIN which is specified within file "my.plugins". -o Specifies a target AVDB file, where comparison result should be stored to. This file may be used later for generating filtered/ordered text report using avdb2txt command. Syntax: -o <filename> If -o switch is not specified, then file with the name "<old_file>_<new_file>_compare_result.avdb" will be created, where <old_file> and <new_file> are names of the first and the second arguments of avdbcompare command. Examples: avdbcompare my1.avdb my2.avdb In the above example "my1_my2_compare_result.avdb" AVDB file will be produced. avdbcompare my1.avdb my2.avdb -o my_compare_result_2vs1.avdb In the above example "my_compare_result_2vs1.avdb" AVDB file will be produced. -report Specifies a target, where comparison text report should be displayed to: <filename> - any valid filename for a plain text file console - console null - nowhere, omit displaying text report

158

ALINT
Default value is console. Syntax: -report { <filename> | console | null } If -report switch is not specified, then comparison report will be displayed to the console. Examples: avdbcompare my2.avdb my1.avdb -report console

User's Guide

In the above example comparison report will be displayed to the console. This is the default behavior. avdbcompare my2.avdb my1.avdb -report null In the above example comparison report will not be displayed anywhere. avdbcompare my2.avdb my1.avdb -report my_compare_report.log In the above example comparison summary will be printed to "my_compare_report.log" as a plain ASCII text. If file with this name already exists - it will be appended. Comparison text report may be empty, if no differences were detected between two compared AVDB files, and -unchanged filter is not set. The report may also be empty if there are no different violations in the scope limited by applied filters, if any. If some differences were detected during comparison, then report may contain from 1 to 4 sections: New violations - violations which are present in the second AVDB file (it is supposed that newer AVDB file is specified as the second argument), but are not present in the first AVDB file (it is supposed that older AVDB file is specified as the first argument). Changed violations - violations of the same rules in the same places, but with changed parameter values (like number of illegal statements in a process, signal type, port mode or custom regexp pattern) and/or changed number of details in case of hierarchical message. Revised violations - violations which are present in the first AVDB file (it is supposed that older AVDB file is specified as the first argument), but are not present in the second AVDB file (it is supposed that newer AVDB file is specified as the second argument). Unchanged violations - violations, which are the same in both compared AVDB files. Note that violations of this kind by default are neither saved to result AVDB file nor displayed in a report. It is possible to save/display such violations by specifying -unchanged filter explicitly.

While other report sections show ALINT violation messages in their regular form, Changed violations section may show violation messages with the "OLD:" or "NEW:" prefixes to mark the violations from the first and the second AVDB file, like: OLD: ALINT: Warning: .... NEW: ALINT: Warning: .... This means that second (new) AVDB file has the same violation, but with different violation parameters. Example:

159

ALINT

User's Guide
OLD: ALINT: Warning: my_functions.v : (33, 1): "STARC_VLOG.1.1.3.3" Function name "ReconstructionFunctionForMultipurposeBidirectionalBus01" has 55 characters. It should be between 2 and 40 characters in length. Level: Rule. NEW: ALINT: Warning: my_functions.v : (33, 1): "STARC_VLOG.1.1.3.3" Function name "ReconstructionFunctionForMultipurposeBus01" has 42 characters. It should be between 2 and 40 characters in length. Level: Rule.

In the above example the violation of "STARC_VLOG.1.1.3.3" rule has changed between 2 AVDB files, because its two parameters have changed their values: the {ObjectName} parameter has changed from "ReconstructionFunctionForMultipurposeBidirectionalBus01" to "ReconstructionFunctionForMultipurposeBus01", and the {NameLength} parameter has changed from "55" to "42". If at least one parameter of the same rule violation has changed, then violation appears in "Changed violations" report section showing both old and new violation messages with respective "OLD:" and "NEW:" prefixes. A violation may also appear in Changed violations report section, when "details" messages count is different between 2 compared AVDB files, or at least one "details" message has different parameters comparing to its counterpart in another AVDB file. Example: ALINT: Warning: my_logic.v : (34, 1): "STARC 2.2.1.1" Possible latch inference for 2 signal(s). Level: Rule. See the details below: OLD: ALINT: Details: my_logic.v : (35, 1): Signal "q[3]" is not assigned in all cases. NEW: ALINT: Details: my_logic.v : (35, 1): Signal "q[0]" is not assigned in all cases. ALINT: Details: my_logic.v : (39, 1): Signal "out" is not assigned in all cases. In the above example the violation is the same, but its first detail is changed because its parameter {SignalName} has changed from "q[3]" to "q[0]". Thus, first "details" message is presented two times in the report: with the "OLD:" prefix and with the "NEW:" prefix, showing the state of this "details" message in the first (old) and in the second (new) AVDB files respectively. The second "details" message did not change between 2 AVDB files, so it is printed without any prefix, as well as main warning message. "Details" messages may also appear only in one of AVDB files. I.e. some "Details" message may not have its counterpart in the opposite AVDB file. In this case, they will be shown in a report only once with respective prefix. Examples: OLD: ALINT: Warning: my_logic.v : (34, 1): "STARC 2.2.1.1" Possible latch inference for 2 signal(s). Level: Rule. See the details below: NEW: ALINT: Warning: my_logic.v : (34, 1): "STARC 2.2.1.1" Possible latch inference for 1 signal(s). Level: Rule. See the details below: OLD: ALINT: Details: my_logic.v : (35, 1): Signal "q[3]" is not assigned in all cases. ALINT: Details: my_logic.v : (39, 1): Signal "out" is not assigned in all cases.

160

ALINT

User's Guide

In the above example one "details" message is revised (printed with the "OLD:" prefix), i.e. it appears only in the first (old) AVDB file, while it is absent in the second (new) one. The second "details" message is present in both AVDB files (and it has equal parameters in both). The main warning message is changed (and printed 2 times with respective prefixes), because its parameter {LatchSigCount} is different between 2 compared AVDB files: it is "2" in the first (old) AVDB file, and it is "1" in the second (new) AVDB file. OLD: ALINT: Warning: my_logic.v : (34, 1): "STARC 2.2.1.1" Possible latch inference for 1 signal(s). Level: Rule. See the details below: NEW: ALINT: Warning: my_logic.v : (34, 1): "STARC 2.2.1.1" Possible latch inference for 2 signal(s). Level: Rule. See the details below: NEW: ALINT: Details: my_logic.v : (35, 1): Signal "q[3]" is not assigned in all cases. ALINT: Details: my_logic.v : (39, 1): Signal "out" is not assigned in all cases. In the above example one new "details" message appeared (printed with "NEW:" prefix), i.e. it appears only in the second (new) AVDB file, while it is absent in the first (old) one. The second "Details" message is present in both AVDB files (and has equal parameters in both). The main warning message is changed because its parameter {LatchSigCount} is different between 2 compared AVDB files: it is "1" in the first (old) one, and "2" in the second (new) AVDB file. -regex_filters Controls processing of all filters as regular expressions. Syntax: -regex_filters If -regex_filters switch is specified, then all arguments supplied in filter options will be treated as regular expression patterns, regardless of specified filter mode (usual or "_regex"). Example: avdb2txt my.avdb -source {my_subdir/*.v} -module RX -module_regex {RAM_((1024)|(2048))} -regex_filters In the above example all filters will be processed as regular expressions, even those without "_regex" suffix. Pay attention while using this switch. The above example is equal to the following (the first -source filter will not give the same result, since asterisk * has different meaning in wildcards and regular expression modes): avdb2txt my.avdb -source_regex {my_subdir/*.v} -module_regex RX -module_regex {RAM_((1024)|(2048))} -summary Specifies a target, where comparison summary should be displayed to: <filename> - any valid filename for a plain text file console - the console

161

ALINT
null - nowhere, omit summary Default value is console. Syntax: -summary { <filename> | console | null } If -summary switch is not specified, then comparison summary will be displayed to the console. Examples: avdbcompare old.avdb new.avdb -summary console

User's Guide

In the above example comparison summary will be displayed to the console. This is the default behavior. avdbcompare old.avdb new.avdb -summary null In the above example comparison summary will not be displayed anywhere. avdbcompare old.avdb new.avdb -summary my_compare_summary.log In the above example comparison summary will be printed to "my_compare_summary.log" as a plain ASCII text. If file with this name exists - it will be appended. -instance Selects for comparison all rule violations detected in specified instance. Syntax: -instance <instance_name> Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be compared (without violations from parent and child instances, or other instances of the same unit). Example: avdbcompare old.avdb new.avdb -instance UUT -instance UUT/RX In the above example only violations detected in either of two specified instances ("UUT" or "UUT/RX") will be compared. -instance_regex Selects for comparison all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. Syntax: -instance_regex {<instance_name>} Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be compared (without violations from parent and child instances, or other instances of the same

162

ALINT
unit). The argument must be enclosed in braces. Example: avdbcompare old.avdb new.avdb -report my.txt -instance_regex {UUT(\.(RX)|(RAM\d*))?}

User's Guide

In the above example only violations detected in instances which names match to specified regular expression, for example "UUT", "UUT.RX", "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc. will be compared. -maxrulewarn Limits the quantity of warnings of the same rule. Limitation is made separately for each section. Syntax: -maxrulewarn <amount> Example: -maxrulewarn <amount> If <amount> is specified as 2, then each section (new, revised, changed, unchanged) can contain 2 violations of the same rule at most. -maxseverity Selects for comparison all rule violations with the severity less or equal to specified level. The option is followed by one of the predefined severity levels (without curly braces). Syntax: -maxseverity { information | warning | critical | error } If combined with other filters, -maxseverity limits their sets of selected violations to specified severity level from above. When combined with -minseverity, it creates a range of allowed severity levels for violations which should be compared. Severity level specified in -maxseverity cannot be less than the one specified in -minseverity. Examples: avdbcompare old.avdb new.avdb -maxseverity info In the above example only violations of rules with severity less or equal to "info" will be compared. avdbcompare old.avdb new.avdb -minseverity warning -maxseverity error In the above example only violations of rules with severity between "error" and "warning" will be compared. avdbcompare old.avdb new.avdb -minseverity info -maxseverity info In the above example only violations of rules with severity equal to "info" will be compared.

163

ALINT
-minseverity

User's Guide

Selects all rule violations with the severity greater or equal to specified level. The option is followed by one of the predefined severity levels (without curly brackets). Syntax: -minseverity { information | warning | critical | error } If combined with other filters, -minseverity limits their sets of selected violations to the specified severity level from below. When combined with -maxseverity, it creates a range of allowed severity levels for violations, which should be compared. The severity level specified in -minseverity cannot be greater than the one specified in -maxseverity. Examples: avdbcompare old.avdb new.avdb -minseverity info In the above example only violations of rules with severity greater or equal to "info" will be compared. avdbcompare old.avdb new.avdb -minseverity warning -maxseverity error In the above example only violations of rules with severity between "warning" and "error" will be compared. avdbcompare old.avdb new.avdb -minseverity info -maxseverity info In the above example only violations of rules with severity equal to "info" will be compared. -policy Selects all violations of rules belonging to a specified policy. Syntax: -policy <policy_name> Both built-in and custom rulesets may be used for filtering. Example: avdbcompare old.avdb new.avdb -policy RTL_POL -policy DFT_POL In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be compared. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy exist in the working directory. -rule Selects violations detected for specified rule. Syntax: -rule <rule_name>

164

ALINT

User's Guide

Rule name here consists of rule plug-in name (e.g. "STARC_VLOG") followed by either rule "external name" (e.g. "STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). Main ruleset corresponds to rule plug-in. "Internal" and "external" names may be looked up in the rules list of a rule plug-in (see Available Rule Plug-ins). Example: avdbcompare old.avdb new.avdb -rule STARC.2.3.3.1 -rule STARC.STARC_KEYWORDS In the above example only violations of two rules ("STARC.2.3.3.1" or "STARC.STARC_KEYWORDS") will be compared. -rule_regex Selects violations detected for specified rule. Same as -rule but allows regular expression matching. Syntax: -rule_regex {<rule_name>} Rule name here may be either rule "external name" (e.g. "STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). "Internal" and "external" names may be looked up in the rules list of a rule plug-in (see Available Rule Plug-ins)... The argument must be enclosed in braces. Example: avdbcompare old.avdb new.avdb -report my.txt -rule_regex {STARC_VLOG\.2\.3} -rule_regex {STARC_VLOG\.\w+_KEYWORDS} In the above example only violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3 will be compared. -rulelevel Selects all violations of rules corresponding to the specified rule level. Argument of this filter is a mnemonic of one of five rule levels. Syntax: -rulelevel { rule | r1 | r2 | r3 | sug } Mnemonics correspond to the following rule levels: rule - Rule r1 - Recommendation 1 r2 - Recommendation 2 r3 - Recommendation 3 sug - Suggestion

Example:

165

ALINT
avdbcompare old.avdb new.avdb -rulelevel rule -rulelevel r1

User's Guide

In the above example only violations of rules with rule level equal to "Rule" or "Recommendation 1" will be compared. -ruleset Selects all violations of rules belonging to the specified ruleset. Syntax: -ruleset <ruleset_name> Both built-in and custom rulesets may be used for filtering. Example: avdbcompare old.avdb new.avdb -ruleset RTL_RS -ruleset DFT_RS In the above example only violations of rules, which belong to either of two specified rulesets ("RTL_RS" or "DFT_RS") will be compared. It is supposed that both RTL_RS.alintruleset and DFT_RS.alintruleset files exist in the working directory. -source Selects all rule violations detected in the specified source file. Syntax: -source <filename> Rule violations detected in the specified source file will be selected for comparison. Example: avdbcompare old.avdb new.avdb -source rx.v -source tx.v In the above example only violations detected in either of two specified source files ("rx.v" or "tx.v") will be compared. -source_regex Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. Syntax: -source_regex {<filename>} Rule violations detected in the specified source file(s) will be listed to the target. The argument must be enclosed in braces. Example: avdbcompare old.avdb new.avdb -report my.txt -source_regex {\wx\.v}

166

ALINT

User's Guide

In the above example only violations detected in source files which names match specified pattern (for example "rx.v" or "tx.v") will be compared. -new Selects only new rule violations - i.e. detected only in the second specified (newer) AVDB file. There is also a possibility to limit the maximum number of new violations. Syntax: -new { <max_number> | all } If <max_number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value "all" is specified, then all new violations will be written to comparison result AVDB file (specified in -o) and/or comparison report (specified in -report). If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdbcompare old.avdb new.avdb -new all In the above example only new violations (all of the violations detected only in "new.avdb" and absent in "old.avdb") will be written to comparison result and/or comparison report. avdbcompare old.avdb new.avdb -new 150 In the above example only first 150 of new violations will be saved. avdbcompare old.avdb new.avdb -new 150 -order_desc rulelevel In the above example only first 150 of new violations will be saved. Violations are sorted by rule level in descending order. avdbcompare old.avdb new.avdb -new 0 In the above example no new violations will be either saved to comparison result AVDB file or displayed in a report (console or file). Violations of types "changed" and "revised" will be saved/displayed, if any. -changed Selects only changed rule violations - i.e. detected in both compared AVDB files, but with different parameter values, or details count. There is also a possibility to limit the maximum number of changed violations. Syntax: -changed { <max_number> | all } If <max_number> value is a positive integer number, then changed violations count will be limited to the specified value. If the predefined value "all" is specified, then all changed violations will be written to comparison result AVDB file (specified in -o) and/or comparison report (specified in -report). If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdbcompare old.avdb new.avdb -changed all

167

ALINT

User's Guide

In the above example all changed violations will be written to comparison result and/or comparison report. avdbcompare old.avdb new.avdb -changed 100 In the above example only first 100 of changed violations will be saved. avdbcompare old.avdb new.avdb -changed 100 -module RX_TOP In the above example only first 100 of changed violations will be saved. Only violations from the "RX_TOP" unit will be selected for comparison. Sorting order is default - by violation source point, ascending. avdbcompare old.avdb new.avdb -changed 0 In the above example no changed violations will be either saved to comparison result AVDB file or displayed in a report (console or file). Violations of types "new" and "revised" will be saved/displayed, if any. -revised Selects only revised rule violations - i.e. detected only in the first specified (older) AVDB file. There is also a possibility to limit the maximum number of revised violations. Syntax: -revised { <max_number> | all } If <max_number> value is a positive integer number, then revised violations count will be limited to the specified value. If the predefined value "all" is specified, then all revised violations will be written to comparison result AVDB file (specified in -o) and/or comparison report (specified in -report). If <max_number> is less than or equal to zero, then no violations of this kind will be selected. Examples: avdbcompare old.avdb new.avdb -revised all In the above example only revised violations (all violations detected only in "old.avdb" and absent in "new.avdb") will be written to comparison result and/or comparison report. avdbcompare old.avdb new.avdb -revised 200 In the above example only first 200 of revised violations will be saved. avdbcompare old.avdb new.avdb -revised 200 -order_asc instance In the above example only first 200 of revised violations will be saved. Violations are sorted by instance name in ascending order. avdbcompare old.avdb new.avdb -revised 0 In the above example no revised violations will be either saved to comparison result AVDB file or displayed in a report (console or file). Violations of types "new" and "changed" will be saved/displayed, if any. -unchanged Selects only unchanged rule violations - i.e. detected in both compared AVDB files, and with equal parameter values and details count. There is also a possibility to limit the maximum number of unchanged violations. By

168

ALINT

User's Guide

default, avdbcompare does not save/display unchanged violations, i.e. if -unchanged filter option is omitted - it means the absence of unchanged violations in result/report files. Syntax: -unchanged { <max_number> | all } If <max_number> value is a positive integer number, then unchanged violations count will be limited to the specified value. If the predefined value "all" is specified, then all unchanged violations will be written to comparison result AVDB file (specified in -o) and/or comparison report (specified in -report). If <max_number> is less than or equal to zero, then no violations of this kind will be selected - this is the default setting for this filter. Examples: avdbcompare old.avdb new.avdb -unchanged all In the above example all unchanged violations will be written to comparison result and/or comparison report. avdbcompare old.avdb new.avdb -unchanged 50 In the above example only first 50 of unchanged violations will be saved. avdbcompare old.avdb new.avdb -unchanged 50 -minseverity warning In the above example only first 50 of changed violations will be saved. Only violations of rules with severity level greater or equal to "warning" will be selected for comparison. Sorting order is default - by violation source point, ascending. avdbcompare old.avdb new.avdb -unchanged 0 In the above example no unchanged violations will be either saved to comparison result AVDB file or displayed in a report (console or file). Violations of other types - i.e. "new", "changed" and "revised" will be saved/displayed, if any. This is the default behavior of this filter. -unit Selects all rule violations detected in specified unit. Syntax: -unit <unit_name> Compilation-time violations from specified unit will be compared (not including violations detected in the instantiated child units, if any). Example: avdbcompare old.avdb new.avdb -module MUX4 -module RX_top In the above example only violations detected in either of two specified modules ("MUX4" or "RX_top") will be compared. -unit_regex Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching.

169

ALINT
Syntax: -unit_regex {<unit_name>}

User's Guide

Compilation-time violations from specified unit will be compared (not including violations detected in instantiated child units). The argument must be enclosed in braces. Example: avdbcompare old.avdb new.avdb -report my.txt -module_regex {MUX[24]} -module_regex {[RT]X_top} In the above example violations detected only in units which names match specified patterns will be compared. The first pattern matches "MUX2" and "MUX4". The second one matches "RX_top" and "TX_top". -order|-order_asc|-order_desc There is a possibility to control the order of violation messages output by applying certain sorting order switch: -order : sort in ascending order -order_asc : same as -order - sort in ascending order -order_desc : sort in descending order Syntax: -order [criterion] -order_asc [criterion] -order_desc [criterion] criterion ::= { origin | rule | rulelevel | severity | source } Sorting order criterion is a predefined word that specifies a violation property, by which the sorting should be performed. Default sorting order is by violation source point, ascending. Examples: avdbcompare my2.avdb my1.avdb -order origin avdbcompare my2.avdb my1.avdb -order_asc origin Two above examples have the same effect - violations listing will be sorted by names of instances in which violations were detected, in ascending order (-order and -order_asc are synonyms). avdbcompare my2.avdb my1.avdb -order_desc source In the above example violations listing will be sorted by names of source files in which violations were detected, in descending order (from "Z" to "A"). NOTE: While sorting by the "origin" criterion - first will be displayed the compilation-time violations, then the elaboration-time violations.

170

ALINT

User's Guide

AVDB Files Copy


avdbcopy is a console command that copies a binary database with ALINT violations (.avdb) to another binary database of the same type. Unless any options are specified, the file is fully copied. This command enables selection of necessary violations subset to another database for the further analysis. This feature is extremely useful from the performance standpoint huge database can be reduced basing on dedicated set of parameters. The database with warnings can be created when the -alint_avdb argument is passed to the alint, alog, or asim command.

Syntax: avdbcopy <src_file.avdb> <new_file.avdb> [-instance_regex <instance_name>] [-unit_regex <unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] [-policy_path <filename>] [-ruleset_path <filename>] [-plugins_file <config_file>] [-unit <unit>] [-instance <inst_name>] [-minseverity {info | warning | error}] [-maxseverity {info | warning / | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel {rule | r1 | r2 | r3 | sug}] -regex_filters ... | -help -instance_regex <instance_name> Selects all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. Syntax: -instance_regex {<instance_name>} Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be copied (without violations from parent and child instances, or other instances of the same unit). The argument must be enclosed in braces. Example: avdbcopy src_database.avdb target_database.avdb -instance_regex {UUT(\.(RX)|(RAM\d*))?} In the above example the violations detected in the instances that match the regexp-based pattern will be copied to the target file, for example "UUT", "UUT.RX", "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc. -unit_regex <unit_name> Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching. Syntax: -unit_regex {<unit _name>} Rule violations from all instances of specified unit will be copied (not including violations detected in instantiated child units). The argument must be enclosed in braces.

171

ALINT
Example:

User's Guide

avdbcopy src_database.avdb target_database.avdb -unit_regex {MUX[24]} -unit_regex {[RT]X_top} In the above example the violations detected in only unit which name match the specified patterns will be copied to the target file. -rule_regex <rule_name> Selects violations detected for specified rule. Same as -rule but allows regular expression matching. Syntax: -rule_regex {<rule_name>} Rule name here may be either rule "external name" (e.g. "STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). "Internal" and "external" names may be looked up in the rules list of a rule plug-in (Rule Plug-in Viewer). The argument must be enclosed in braces. Example: avdbcopy src_database.avdb target_database.avdb -rule_regex {STARC_VLOG\.2\.3} -rule_regex {STARC_VLOG\.\w+_KEYWORDS} In the above example only violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3 will be copied to the target file. -source_regex <source_name> Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. Syntax: -source_regex '<filename>' Rule violations detected in the specified source file(s) will be copied to the target database. The argument must be enclosed in single-quotes ('<filename>') or double-quotes ("<filename>"). Example: avdbcopy src_database.avdb target_database.avdb -source_regex '\wx\.v' In the above example the target file will contain only violations detected in source files which names match specified pattern (for example "rx.v" or "tx.v"). -policy_path <filename> Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. Syntax:

172

ALINT
-policy_path <directory> If -policy_path switch is not specified, then the specified policy must be in the working directory. Example: avdbcopy src_database.avdb target_database.avdb -policy_path /home/designs/alint_cfg -policy RTL_POL -policy DFT_POL

User's Guide

In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be copied. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist either in the working directory or in the /home/designs/alint_cfg directory. -plugins_file <config_file> Defines a path to the additional configuration file for ALINT rule plug-ins in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. Syntax: -plugins_file <config_file> Example: avdbcopy src_database.avdb target_database.avdb -rule MY_PLUGIN.RULE1 -plugins_file "my.plugins" In the above example only violations of "MY_PLUGIN.RULE1" rule will be copied to the target AVDB file. It is supposed that RULE1 belongs to plug-in MY_PLUGIN which is specified within file "my.plugins". -ruleset_path <filename> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. Syntax: -ruleset_path <directory> If -ruleset_path switch is not specified, then specified ruleset must exist in the working directory. Example: avdbcopy src_database.avdb target_database.avdb -ruleset_path /home/designs/alint_cfg -policy RTL_rules -policy DFT_rules In the above example only violations of rules which belong to either of two specified rulesets ("RTL_rules" or "DFT_rules") will be copied. It is supposed that both RTL_rules.ruleset and DFT_ruleset.ruleset files exist either in the working directory or in the /home/designs/alint_cfg directory. -unit <unit> Selects all rule violations detected in design unit.

173

ALINT
Syntax: -unit<unit>

User's Guide

Rule violations from all instances of design unit will be copied (not including violations detected in instantiated child units). Example: avdbcopy src_database.avdb target_database.avdb -report my.txt -unit MUX4 -unit RX_top In the above example only violations detected in either of two specified units ("MUX4" or "RX_top") will be copied to the target file. -instance <inst_name> Selects all rule violations detected in specified instance. Syntax: -instance <instance_name> Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be copied (without violations from parent and child instances, or other instances of the same unit). Example: avdbcopy src_database.avdb target_database.avdb -instance UUT -instance UUT.RX -instance UUT.RAM* In the above example the target file will contain only violations detected in either of two explicitly specified instances ("UUT" or "UUT.RX") and all violations from instances which names match UUT.RAM* pattern (for example "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc.). -minseverity Selects all rule violations with the severity greater or equal to specified level. The option is followed by one of the predefined severity levels (without curly brackets). Syntax: -minseverity { info | warning | critical | error } When combined with -maxseverity, it creates a range of allowed severity levels for violations, which should be listed. The severity level specified in -minseverity cannot be greater than a level specified in -maxseverity. Example: avdbcopy src_database.avdb target_database.avdb -minseverity warning -maxseverity warning In the above example only violations of rules with severity equal to "warning" will be copied to the target file.

174

ALINT
-maxseverity

User's Guide

Selects all rule violations with the severity less or equal to the specified level. The option is followed by one of the predefined severity levels (without curly brackets). Syntax: -maxseverity { info | warning | critical | error } When combined with -minseverity, it creates a range of allowed severity levels for violations which should be listed. Severity level specified in -maxseverity cannot be less than a level specified in -minseverity. Example: avdbcopy src_database.avdb target_database.avdb -minseverity warning -maxseverity error In the above example violations of rules with severity "error", "critical" and "warning" will be copied to the target file. -rule <rule_link> Selects violations detected for specified rule. Syntax: -rule <rule_name> Rule name here may be either rule "external name" (e.g."STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). "Internal" and "external" names may be looked up in the rules list of a rule plug-in (Rule Plug-in Viewer). Example: avdbcopy src_database.avdb target_database.avdb -rule STARC_VLOG.2.3.* -rule STARC_VLOG.STARC_KEYWORDS In the above example only violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3 will be copied to the target file. -policy <policy_name> Selects all violations of rules belonging to specified policy. Syntax: -policy <policy_name> Both built-in and custom policies may be used for filtering. Example: avdbcopy src_database.avdb target_database.avdb -policy RTL_POL -policy DFT_POL

175

ALINT

User's Guide

In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be copied to the target file. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist in the working directory. -ruleset <ruleset_name> Selects all violations of rules belonging to the specified ruleset. Syntax: -ruleset <ruleset_name> Both built-in and custom rulesets may be used for filtering. Example: avdbcopy src_database.avdb target_database.avdb -ruleset RTL_RS -ruleset DFT_RS In the above example only violations of rules which belong to either of two specified rulesets ("RTL_RS" or "DFT_RS") will be copied to the target file. It is supposed that both RTL_RS.alintruleset and DFT_RS.alintruleset files exist in the working directory . -rulelevel {rule | r1 | r2 | r3 | sug} Selects all violations of rules corresponding to the specified rule level. Argument of this filter is a mnemonic of one of five rule levels. Syntax: -rulelevel { rule | r1 | r2 | r3 | sug } Mnemonics correspond to the following rule levels: rule r1 r2 r3 sug Rule Recommendation 1 Recommendation 2 Recommendation 3 Suggestion

Example: avdbcopy src_database.avdb target_database.avdb -rulelevel rule -rulelevel r1 In the above example only violations of rules with level equal to "Rule" or "Recommendation 1" will be copied to the target file. -source <sourcefile_name> Selects all rule violations detected in the specified source file. Syntax:

176

ALINT
-source '<filename>'

User's Guide

Rule violations detected in the specified source file will be copied to the file. The argument must be enclosed in single-quotes ('<filename>') or double-quotes ("<filename>"). Example: avdbclear src_database.avdb target_database.avdb -source 'rx.v' In the above example only violations detected in source files "rx.v" will be copied the target file. -regex_filters ... Controls processing of all filters as regular expressions. Syntax: -regex_filters If -regex_filters switch is specified, then all arguments supplied in filter options will be treated as regular expression patterns, regardless of specified filter mode (usual or "_regex"). Example: avdbcopy src_database.avdb target_database.avdb -source {my_subdir/*.v} -unit RX -unit_regex {RAM_((1024)|(2048))} -regex_filters In the above example all filters will be processed as regular expressions, even those without "_regex" suffix. Pay attention while using this switch. The above example is equal to the following (the first -source filter will not give the same result, since asterisk * has different meaning in wildcards and regular expression modes): avdbcopy src_database.avdb target_database.avdb -source_regex {my_subdir/*.v} -unit_regex RX -unit_regex {RAM_((1024)|(2048))}

AVDB Files Clear


avdbclear is a console command that clears binary database with ALINT violations (.avdb). Unless any options are specified, the file is fully cleared.. This command can be used to remove unnecessary violations from the database or to clear the database before running new linting session.

Syntax: avdbclear <src_file.avdb> [-instance_regex <instance_name>] [-unit_regex <design_unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] [-policy_path <directory>] [-ruleset_path <directory>] [-plugins_file <config_file>] [-unit <design_unit_name>] [-instance <inst_name>] [-minseverity {info | warning | error}] [-maxseverity {info | warning | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel {rule | r1 | r2 | r3 | sug}] [-source <sourcefile_name>] [-global_scope <source_name>] -regex_filters | -help

177

ALINT
-instance_regex <instance_name>

User's Guide

Selects all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. Syntax: -instance_regex {<instance_name>} Hierarchical instance name is accepted (or unit name in case of top level). Violations detected only in specified instance will be copied (without violations from parent and child instances, or other instances of the same unit). The argument must be enclosed in braces. Example: avdbclear src_database.avdb -instance_regex {UUT(\.(RX)|(RAM\d*))?} In the above example the violations detected in the instances that match the regexp-based pattern will be removed from the specified file, for example "UUT", "UUT.RX", "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc. -unit_regex <design_unit_name> Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching. Syntax: -unit_regex {<unit _name>} Rule violations from all instances of specified unit will be removed (not including violations detected in instantiated child units). The argument must be enclosed in braces. Example: avdbclear src_database.avdb -unit_regex {MUX[24]} -unit_regex {[RT]X_top} In the above example the violations detected in only unit which name match the specified patterns will be removed from the specified file. -rule_regex <rule_name> Selects violations detected for specified rule. Same as -rule but allows regular expression matching. Syntax: -rule_regex {<rule_name>} Rule name here may be either rule "external name" (e.g. "STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). "Internal" and "external" names may be looked up in the rules list of a rule plug-in (Rule Plug-in Viewer). The argument must be enclosed in braces. Example: avdbclear src_database.avdb -rule_regex {STARC_VLOG\.2\.3} -rule_regex {STARC_VLOG\.\w+_KEYWORDS}

178

ALINT

User's Guide

In the above example only violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3 will be removed from the specified file. -source_regex <source_name> Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. Syntax: -source_regex '<filename>' Rule violations detected in the specified source file(s) will be removed from the database. The argument must be enclosed in single-quotes ('<filename>') or double-quotes ("<filename>"). Example: avdbclear src_database.avdb -source_regex '\wx\.v' In the above example violations detected in source files which names match specified pattern (for example "rx.v" or "tx.v") will be removed the specified file. -policy_path <directory> Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. Syntax: -policy_path <directory> If -policy_path switch is not specified, then the specified policy must be in the working directory. Example: avdbclear src_database.avdb -policy_path /home/designs/alint_cfg -policy RTL_POL -policy DFT_POL In the above example only violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be removed. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist either in the working directory or in the /home/designs/alint_cfg directory. -ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. Syntax: -ruleset_path <directory> If -ruleset_path switch is not specified, then specified ruleset must exist in the working directory.

179

ALINT
Example:

User's Guide

avdbclear src_database.avdb -ruleset_path /home/designs/alint_cfg -policy RTL_rules -policy DFT_rules In the above example only violations of rules which belong to either of two specified rulesets ("RTL_rules" or "DFT_rules") will be removed. It is supposed that both RTL_rules.ruleset and DFT_ruleset.ruleset files exist either in the working directory or in the /home/designs/alint_cfg directory. -plugins_file <config_file> Defines a path to the additional configuration file for ALINT rule plug-ins in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. Syntax: -plugins_file <config_file> Example: avdbclear src_database.avdb -rule MY_PLUGIN.RULE1 -plugins_file "my.plugins" In the above example violations of "MY_PLUGIN.RULE1" rule will be removed from the AVDB file. It is supposed that RULE1 belongs to plug-in MY_PLUGIN which is specified within file my.plugins. -unit <design_unit_name> Removes all rule violations detected in specified design unit. Syntax: -unit <design_unit_name> Example: avdbclear src_database.avdb -unit MUX4 -unit RX_top In the above example violations detected in either of two specified units ("MUX4" or "RX_top") will be removed from the specified file. -instance <inst_name> Selects all the violations for the set instance Syntax: -instance <inst_name> Example: avdbclear src_database.avdb -instance UUT -instance UUT.RX -instance UUT.RAM* In the above example violations detected in either of two explicitly specified instances ("UUT" or "UUT.RX") and all violations from instances which names match UUT.RAM* pattern (for example "UUT.RAM", "UUT.RAM1", "UUT.RAM2", etc.) will be removed.

180

ALINT
-minseverity {info | warning | critical | error}

User's Guide

Selects all rule violations with the severity greater or equal to specified level. The option is followed by one of the predefined severity levels (without curly brackets). Syntax: -minseverity { info | warning | critical | error } When combined with -maxseverity, it creates a range of severity levels for violations, which should be removed. The severity level specified in -minseverity cannot be greater than a level specified in -maxseverity. Example: avdbclear src_database.avdb -minseverity info -maxseverity warning In the above example violations of rules with severity equal to "warning" or "info" will be removed. -maxseverity {info | warning | critical | error} Selects all rule violations with the severity less or equal to the specified level. The option is followed by one of the predefined severity levels (without curly brackets). Syntax: -maxseverity { info | warning | critical | error } When combined with -minseverity, it creates a range of allowed severity levels for violations which should be listed. Severity level specified in -maxseverity cannot be less than a level specified in -minseverity. Example: avdbclear src_database.avdb -minseverity warning -maxseverity error In the above example violations of rules with severity "error", "critical" and "warning" will be removed from the specified file. -rule <rule_link> Selects violations detected for specified rule. Syntax: -rule <rule_name> Rule name here may be either rule "external name" (e.g."STARC_VLOG.1.1.1.3") or rule "internal name" (e.g. "STARC_VLOG.STARC_KEYWORDS"). "Internal" and "external" names may be looked up in the rules list of a rule plug-in (Rule Plug-in Viewer). Example: avdbclear src_database.avdb -rule STARC_VLOG.2.3.* -rule STARC_VLOG.STARC_KEYWORDS

181

ALINT

User's Guide

In the above example violations of "STARC_VLOG.STARC_KEYWORDS" rule as well as all violations of rules from section 2.3 will be removed from the specified file. -policy <policy_name> Selects all violations of rules belonging to specified policy. Syntax: -policy <policy_name> Both built-in and custom policies may be used for filtering. Example: avdbclear src_database.avdb -policy RTL_POL -policy DFT_POL In the above example violations of rules which belong to either of two specified policies ("RTL_POL" or "DFT_POL") will be removed. It is supposed that both RTL_POL.alintpolicy and DFT_POL.alintpolicy files exist in the working directory. -ruleset <ruleset_name> Selects all violations of rules belonging to the specified ruleset. Syntax: -ruleset <ruleset_name> Both built-in and custom rulesets may be used for filtering. Example: avdbclear src_database.avdb -ruleset RTL_RS -ruleset DFT_RS In the above example violations of rules which belong to either of two specified rulesets ("RTL_RS" or "DFT_RS") will be removed. It is supposed that both RTL_RS.alintruleset and DFT_RS.alintruleset files exist in the working directory . -rulelevel {rule | r1 | r2 | r3 | sug} Selects all violations of rules corresponding to the specified rule level. Argument of this filter is a mnemonic of one of five rule levels. Syntax: -rulelevel { rule | r1 | r2 | r3 | sug } Mnemonics correspond to the following rule levels: rule Rule r1 Recommendation 1 r2 Recommendation 2

182

ALINT
r3 Recommendation 3 sug Suggestion

User's Guide

Example: avdbclear src_database.avdb -rulelevel rule -rulelevel r1 In the above example violations of rules with level equal to "Rule" or "Recommendation 1" will be removed. -source <sourcefile_name> Selects all rule violations detected in the specified source file. Syntax: -source '<filename>' Rule violations detected in the specified source file will be removed from the database. The argument must be enclosed in single-quotes ('<filename>') or double-quotes ("<filename>"). Example: avdbclear src_database.avdb -source 'rx.v' In the above example violations detected in source files "rx.v" will be removed from the specified database. -global_scope <source_name> Selects all the global scope violations in the selected file. Syntax: -global_scope <source_name> Example: avdbclear src_database.avdb -global_scope 'rx.v' In the above example global scope violations detected in the source files "rx.v" will be removed from the specified database. -regex_filters Controls processing of all filters as regular expressions. Syntax: -regex_filters If -regex_filters switch is specified, then all arguments supplied in filter options will be treated as regular expression patterns, regardless of specified filter mode (usual or "_regex"). Example:

183

ALINT

User's Guide
avdbclear src_database.avdb -source {my_subdir/*.v} -unit RX -unit_regex {RAM_((1024)|(2048))} -regex_filters

In the above example all filters will be processed as regular expressions, even those without "_regex" suffix. Pay attention while using this switch. The above example is equal to the following (the first -source filter will not give the same result, since asterisk * has different meaning in wildcards and regular expression modes): avdbclear src_database.avdb -source_regex {my_subdir/*.v} -unit_regex RX -unit_regex {RAM_((1024)|(2048))}

184

ALINT

User's Guide

Advanced Features

Chip Level Engine

Advanced Design Structure Analysis

Overview

ASIC technology libraries provide basic components like logical gates and storage elements with concrete physical metrics, area in particular. The quality of design logic placement on the physical chip area has a critical impact on the operating frequency of the resulting circuit. A non-optimal allocation of physical resources for logical elements will result in inefficient wiring that significantly decreases circuit performance. There is a direct dependency between the size of the design an ASIC layout tool has to consider and efficiency of the resulting physical placement. Achieving the optimal layout may be dramatically simplified by splitting the design on relatively independent hierarchical segments of limited size. The segments are usually processed by synthesis and layout tools independently. Often those segments are referred to using a term basic blocks. It is assumed that design hierarchy will consist of 2 levels: Basic blocks that implement portions of the chip functionality. Upper-level blocks that only contain the structural connections between basic blocks and system-wide resources, such as clock, reset, external interfaces and memories. The exact ratio between the resulting operating circuit frequency and the selected size of basic blocks depends on ASIC vendor technology and synthesis/layout toolset. Anyway, a general recommendation is to limit the size of basic block in a range from 10 up to 40 thousands gates to achieve the desired circuit performance in most cases. This section explains how ALINT handles the described hierarchical design scale limitations.

Advanced Design Structure Analysis

To analyze how designs meet the recommended hierarchical design scale limitations ALINT performs a classification of design instances on 3 categories: Upper-level blocks Basic blocks Sub-blocks The classification is based on gate equivalency estimation metric an approximate number of logical gates required to physically implement all elements of the design unit. Every type of logical element, such as logic gate, multiplexer, storage element, arithmetic block, is associated with a gate equivalency estimation formula (See the

185

ALINT

User's Guide

Module Size Estimation table below). The procedure runs recursively from the top-level to leaf units. The estimation for a design unit includes all its instantiated child components, as well as the local-level elements. Design unit will be associated with one of the categories above by comparing its gate equivalency metric to the configured scale limitation range. All units with a size staying within the configured range are classified as basic blocks. These blocks have special treatment in several rules, and must follow certain timing recommendations. If a particular design unit is not large enough to meet the minimal threshold of basic blocks, it is treated as a sub-block. It is assumed that hierarchical design restrictions are insignificant for units of this type. Sub-block is supposed to be a part of basic block. Sub-blocks are usually flattened in synthesis tools. In the opposite case when the gate equivalency exceeds the maximal threshold for basic blocks, a unit is treated as an upper-level block. Tool assumes that the main purpose of upper-level blocks is to organize connectivity between basic blocks and system-wide resources. No functionality implementation is expected at the level of upper-level blocks. Classification only affects the reports of hierarchical design rules. It is also visible in the log files generated with alint_synthesislog option. Example CPU design is divided into three blocks according to their functionality: Memory, Proc_Unit and Clock_Sync (see Figure 1). I/O cells do not correspond to any of the hierarchical structure levels. In this example, the Memory module size is larger than maximum size of basic block, so it is considered as upper level block. The internal modules (mem_0, mem_1, etc), that form the Memory module are treated as basic blocks. The Proc_Unit module size is not larger than basic block maximum size, so it is treated as basic block. The decoder and ALU modules are considered as sub-blocks.

Figure 1. Hierarchical structure of the CPU design Thus, for the above example the following basic blocks are detected: memory blocks (mem_0, mem_1, etc.), Proc_Unit and Clock_Sync. This information is used for rule checking, for example, consider the STARC.1.6.2.1 rule. It verifies that output

186

ALINT

User's Guide

ports of basic blocks are registered. In the CPU design the memory blocks (mem_0, mem_1, etc.), Proc_Unit and Clock_Sync design units are checked and violation is issued for each output port that is not driven by a flip-flop. Example Consider a GSM_Controller module, that contains three internal modules: CPU, FLASH_Memory and GSM_Module (see Figure 2).

Figure 2. Hierarchical structure of the GSM_Controller design The CPU internal module contains 18000 gates, the FLASH_Memory - 12000 gates and the GSM_Module 10000 gates. According to the basic block size constraint each of these internal modules may be considered as basic block. But the sum of their sizes is equal to 40000 gates, and together they form one basic block. So the CPU, GSM_Module and FLASH_Memory modules are considered as sub-blocks.

Module Size Estimation ALINT provides a metric for module size estimation. The module size is a sum of equivalent logic gates required to implement each element (e.g. flip-flop, latch, adder), composing the module: Element Inverter N-input gate OR, AND, NOR, NAND N-input gate XOR, XNOR tri-state RS-latch RSE-latch DE-latch DRSE-latch DFF DFF with set/reset DFF with set/reset/enable 1 N-1 (N - 1) * 3 2 2 4 4 7 6 8 12 Equivalent Logic Gates

187

ALINT
N-to-1 multiplexer equal, not equal (not) greater, (not) less 1x1 bit comparator (not) greater, (not) less NxN bit comparator Shift N bit signal on K bits NxN-input adder/subtractor NxK-input multiplier N bit memory decoder 2(2+log2(N)) - 4 Note: log is rounded up (ex. 2,3 = 3) N*3+N-1 2 (N + 1) * N / 2 + 3 K-to-1 multiplexer * N N*9 N * K * 10 N*4 (2 N) * (N - 1) + N

User's Guide

The mod, pow and divider elements are considered as non-synthesized, so the number of equivalent logic gates that corresponds to them is equal to zero. Constant shifter is implemented by connecting lower bits to the upper ones or vice versa, so it does not require any logic gates for implementation and the number of equivalent logic gates that corresponds to it is equal to zero. NOTE: The proposed metric is rather rough. The actual count of gates depends on a technology used for implementation and the design structure.

188

ALINT
Clocks and Resets

User's Guide

Overview

Chip-level rules verification requires ALINT to be aware of designs global clock and reset signals. The signals connected to the external design clock/reset pins are considered as a global clock/reset signals. It is possible to specify these signals manually (using the command line arguments -alint_gclk and -alint_grst) or the system can detect them automatically. Information about the global control signals is used to verify their connections within the design. Clock signals are also used to logically divide design flip-flops on clock domains for CDC (clock domain crossing) rules check. See the appropriate sections to learn about global clock and reset signals auto-detection, command line arguments and clock domains generation. The internally generated clock/reset net is considered as internal clock/reset. Internal clock/reset signals are used to verify the correctness of scheme generation and resource utilization. See Design Internal Clocks and Resets section for more details. Global Clock

There are two alternative routines provided to detect design global clock signal(s): clock signal(s) is specified with the -alint_gclk command line argument ; clock signal(s) is detected automatically

-alint_gclk Argument The -alint_gclk argument allows to specify global clock signal manually. Specified signal is treated by ALINT engine as design global clock when chip-level rules are verified during the current linting session. Syntax: -alint_gclk <signal_name> Hierarchical signal name is used. Multiple signals are specified with multiple argument use. This option is relevant only at the elaboration stage (i.e. it is available only with alint and asim commands, it is not available in alog and acom commands). If no signal was specified as global clock, and clock-dependent rules are enabled during current linting session, then ALINT will try to detect such signals automatically. Examples: alint -alint_gclk top1.clk -alint_gclk top2.clk -asim top1 top2 asim top1 top2 -alint -alint_gclk top1.clk -alint_gclk top2.clk In the above examples two signals were specified as global clocks: top1.clk and top2.clk.

189

ALINT
Automatic Clock Detection

User's Guide

Clock signal is detected automatically when there is no clock explicit specified with the -alint_gclk argument and chip-level rules are enabled in the active policy. Auto-detect mode is also enabled when none of the specified signals has been found. Each signal connected to a clock pin of any flip-flop in the design hierarchy is considered as a clock signal. Figure 1 demonstrates that "SOME_SIG" is considered as a clock because of its connection to the clock pin of the flip-flop). The following requirements are imposed on such signal: it should be an input port of the top-level module (elaborated module) it should not be connected through the sequential logic or tri-state buffers

Figure 1. Automatic clock detection An appropriate information message is displayed if the automatic mode is enabled: No clock signals specified, auto-detect mode is used. Detected clock signals: {GlCLKSignalNameList}. NOTE: If a top-level design unit does not have the input ports then it is treated as a testbench. In this case all the instantiated design units are considered as hardware top-levels and their inputs are considered as external input ports and clock signals auto-detection works accordingly. The search works with the first hierarchy level only, it will not be attempted recursively down the hierarchy. NOTE: Design global clock may be also specified using GUI (Global clock signals item from Tools | Preferences | Linting | Entries).

Clock Domains Extraction It is difficult to detect metastability problem before the circuit is fabricated. Therefore, it is important to prevent the metastability-related issues by enforcing the effectiveness- proven methodologies during the RTL design. CDC rules check requires the system to collect an information about the design clock domains. The following principles are used to generate clock domains for the design. Each global clock creates separate clock domain. Global clock is propagated through the design hierarchy using common rules (through the combinational logic). Each FF having a global clock signal connected to the clock pin is added to the corresponding clock domain. NOTE: The feedbacks on the clock signal path are not considered (no backward propagation is performed). If the FF clock input is driven by the output of a FF/latch/tristate that belongs to the clock domain "A", this FF is similarly added to the clock domain "A".

190

ALINT

User's Guide

Figure 2. Clock domain generation When two or more clock signals are propagated through the same combinational logic or multiplexer (clock domains crossing) then the output of this logic / mux generates a derived clock signal forming a new clock domain for subsequent connections:

Figure 3. Multiple clock signals propagation through the combinational logic When a clock signal is connected to the select pin of a multiplexer then the output of this multiplexer generates a derived clock signal forming a new clock domain for the subsequent connections:

Figure 4. Clock signal propagation through the mutliplexer select CDC-related checks are not performed in the following situations: if there is no clock domain detected, then the whole design is considered to be in the single (default) clock domain - CDC-related checks are not performed on the whole design; if there is at least one clock domain detected and some FF(s) still do not belong to any clock domain, then this/these FF(s) is considered to be in the default domain - CDC-related checks are not performed on this/these FF(s).

191

ALINT
Join Clock Signals

User's Guide

Different global clock signals may externally belong to the same domain. Clock signals joining for analysis is performed using the command line argument -alint_gclkjoin. The argument is available during the linting at elaboration stage (i.e. with asim and alint commands). Syntax: -alint_gclkjoin <clk_signal_1> <clk_signal_2> Using this argument indicates ALINT engine to consider the FFs controlled with the specified clock signals as belonging to the same domain. Examples: alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclkjoin top.clk1 top.clk2 -asim top asim top -alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclkjoin top.clk1 top.clk2 In the above examples two signals were specified as global clocks top.clk1 and top.clk2 and the signals were joined to the single domain. If there are 3 and more global clock signals that should be joined into a single domain, then -alint_gclkjoin argument is used multiple times. Examples: alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclk top.clk3 -alint_gclkjoin top.clk1 top.clk2 -alint_gclkjoin top.clk1 top.clk3 -asim top asim top -alint -alint_gclk top.clk1 -alint_gclk top.clk2 -alint_gclk top.clk3 -alint_gclkjoin top.clk1 top.clk2 -alint_gclkjoin top.clk1 top.clk3 In the example above signals top.clk1, top.clk2, and top.clk3 specified as global clocks are joined into the single domain. Global Asynchronous Reset

There are two routines provided to detect design global asynchronous reset signal(s): reset signal(s) is specified with the -alint_grst command line argument; reset signal(s) is detected automatically.

-alint_grst Argument The -alint_grst argument allows to specify global reset signal manually. Specified signal is treated by ALINT engine as design global reset when chip-level rules are verified during the current linting session. Syntax:

192

ALINT
-alint_grst <signal_name>

User's Guide

Hierarchical signal name is used. Multiple signals are specified with multiple argument use. This option is relevant only at the elaboration stage (i.e. it is available only with alint and asim commands, it is not available in alog and acom commands). If no signal was specified as global reset, and reset-dependent rules are enabled during current linting session, then ALINT will try to detect such signals automatically. Examples: alint -alint_grst top1.rst -alint_grst top2.rst -asim top1 top2 asim top1 top2 -alint -alint_gclk top1.rst -alint_gclk top2.rst In the above examples two signals were specified as global reset signals: top1.rst and top2.rst.

Automatic Reset Detection Reset signal is detected automatically when there is no explicit signal specified with the -alint_grst argument and chip-level rules are enabled in the active policy. Auto-detect mode is also enabled when none of the specified signals has been found. Each signal connected to a asynchronous reset pin of any flip-flop in the design hierarchy is considered as a reset signal. The following requirements are imposed on such signal: it should be an input port of the top-level module (elaborated module) it should not be connected through the sequential logic or tri-state buffers An appropriate information message is displayed if the automatic mode is enabled. No reset signals specified, auto-detect mode is used. Detected reset signals: {GlResetSignalNameList}. NOTE: If a top-level design unit does not have the input ports then it is treated as a testbench. In this case all the instantiated design units are considered as hardware top-levels and their inputs are considered as external input ports and reset signals auto-detection works accordingly. The search works with the first hierarchy level only, it will not be attempted recursively down the hierarchy. NOTE: Design global reset may be also specified using GUI (Global reset signals item from Tools | Preferences | Linting | Entries).

Reset Synchronization Circuit

Asynchronous reset may cause metastability problems if released at the same time as clock active edge arrives (see Figure 1). The reset signal shall be synchronized with a clock to avoid metastability. This can be done by a special circuit - reset synchronizer - that releases the reset signal to inactive state with a delay after active edge of the clock signal. Reset still enters its active state asynchronously. The synchronized reset signal eliminates

193

ALINT
metastability problems that may be caused by a violation of the setup and hold time conditions if the asynchronous reset signal is used.

User's Guide

Figure 1. Metastability issues with asynchronous reset ALINT engine supports automatic reset synchronization circuits recognition. Reset synchronization circuits are transparent for global reset signals. (This means that if a global reset is connected to a reset synchronization circuit then the output of the reset synchronization circuit is also treated as a global reset). Consider reset synchronization circuit that generates active low reset signal RESET by the synchronizing asynchronous reset ASYNC_RESET with the CLK clock signal (Figure 2).

Figure 2. Reset synchronization circuit As displayed in the Figure 2, it is implemented based on a pair of flip-flops. The first flip-flop acts as a synchronization flip-flop. It is driven by the external asynchronous reset (ASYNC_RESET) and connected to the second one. The output of the second flip-flop (RESET) is a reset signal for the rest of the design. Therefore the reset signal asserts its active state asynchronously and releases synchronously with the clock. The reset synchronization circuit behavior is shown in the timing diagram in the Figure 3.

Figure 3. Reset synchronization circuit timing diagram

194

ALINT

User's Guide

The following use case illustrates how reset synchronizer prevents metastability on the circuit output: 1. The asynchronous reset signal (ASYNC_RESET) is released at the same time with the active edge of the clock (CLK rising edge #1). This causes metastability in the RESET_SYNCER flip-flop. Assuming that the RESET_SYNCER flip-flop is resolved to '1', the RESET signal does not change its value during the current clock cycle. 2. During the clock cycle #2 ASYNC_RESET is still inactive, but the RESET signal is released with a delay after the active edge of the clock. This delay prevents the RESET signal from changing its value at the same time with the CLK clock. 3. As far as the reset signal (RESET) is inactive, the Q flip-flop can start working during the clock cycle #3. 4. During the clock cycle #4, the ASYNC_RESET asynchronously resets the RESET_SYNCER and RESET flip-flops, and the rest of the circuit as a consequence. NOTE: The RESET signal is delayed after CLK clock signal so it shall be used for resetting flip-flops from CLK clock domain only. Resetting flip-flops from other clock domains may cause metastability problems. Separate reset synchronization circuits shall be used for these cases. NOTE: If the RESET_SYNCER signal is resolved to '0' after CLK rising edge #1 then the RESET signal is released one clock cycle later. If active high reset signal is required for the design then the following circuit is used (see Figure 4).

Figure 4. Reset synchronization circuit According to the above circuit, the ASYNC_RESET and the RESET are active low and high reset signals correspondingly. See the timing diagram in the Figure 5.

Figure 5. Active high reset synchronization circuit timing diagram

195

ALINT
Internal Clocks and Resets

User's Guide

The internal clock/reset is one of the most important components of any synchronous large scale integrated circuits. There are checkers in ALINT that verify internal clock/reset sources. Internal clock is a net that supplies the clock input of at least one edge-triggered block. Internal reset is a net that supplies the reset input of at least one block. Internal resets can be divided into two types such as synchronous and asynchronous depending on what kind of reset input is supplied by the net (synchronous/asynchronous). Both set and reset inputs are used to detect internal reset.

Internal Clock/Reset Detection ALINT supports the internal clocks/reset detection both from sequential (see Figure 1) and combinatorial blocks (see Figure 2).

Figure 1. Internal clock is detected from sequential block.

Figure 2. Internal synchronous resets are detected from combinatorial block. The connection of the output of combinatorial logic to the clock/reset pin of FF is considered as the internal clock/reset (see Figure 3).

196

ALINT

User's Guide

Figure 3. Internal asynchronous resets are detected from combinatorial block. If the internal clock/reset signal passes through any logic gate, it is no more treated as internal clock/reset (see Figure 4).

Figure 4. Signal passed through the inverter.

Internal Clock/Reset Source The internal clock/reset source is a driver of the internal clock/reset net. The driver can be external port, instance port or output of combinational/sequential block (see Figure 5).

197

ALINT

User's Guide

Figure 5. Internal Clocks Source. Internal clocks/resets are propagated through the instance ports and buffer components. When the internal clock/reset signal is passing through the buffers or instance ports, then a new clock/reset source is not generated. It occurs because such clock/reset signal belongs to the same clock/reset net and has the same source. If no driver is present at the instance port, then this port is considered as driver (see Figure 6). When there is a Test Bench that contains clock simulation, then no synthesis is present for the clock/reset, because nothing is connected to clock/reset pins.

Figure 6. Internal Clocks propagated through the instance ports. Example Here is the example of internal clocks mechanism application. The ALDEC_VLOG.3305 rule checker verifies if all

198

ALINT
internally generated clocks are properly isolated. Consider a module illustrated in Figure 7:

User's Guide

Figure 7. Internal clock is not properly isolated. For the above example ALINT detects the INT_CLK internal clock. But the internal clock generation logic (AND gate) is mixed up with other part of the module (flip-flop), so a violation message is issued.

199

ALINT

User's Guide

Custom Rules

Overview

ALINT provides a framework and a C-based API to implement custom user-defined rules matching specific needs. Any user defined rule should be created correspondingly to a number of procedures to be able to be integrated to the linting process. Here are 3 basic steps to create a custom rule: 1. Compile custom rule plug-in source files into the shared library (see C/C++ Category section for compilation settings.). 2. Register the library in the ALINT framework to make rules available for regular operations (to use custom rule plug-in in other designs, in batch mode use the -alint_plugins_file switch, in the GUI mode set appropriate preferences).Also note that a built-in policy is generated automatically once the rule plug-in is registered in the framework. 3. Add custom rules to a policy (or use automatically generated one), configure them, and use for linting. Example: The ccomp command can be used to streamline the compilation of ALINT API applications. In the following example ccomp command is used to build library api_test.so with the gcc compiler: ccomp -api -o api_test myapi.c Arguments: -alintapi Sets the type of the application to ALINT API -o api_test Sets the name of the application. If omitted the command will compile source files to library alintapi (Linux) or alintapi.dll (Windows). myapi.c The name of the source file to be compiled. The ccomp command is a wrapper for a C/C++ compiler. It calls the compiler with the switches that set all options required to build an ALINT API rule plug-in (e.g. appropriate include directories, libraries to be linked, etc.). Note that the ccomp command by default uses the gcc compiler. To compile an API application with Microsoft Visual Studio, use the -vc<number> arguments, where <number> indicates the version of Microsoft Visual Studio: ccomp -alintapi -vc71 -o test_api.exe myapi.c In the given example -vc9 ran compilation with Microsoft Visual Studio 9.

200

ALINT
NOTE: It is possible to create new rule using new rule template quickly (see New Rule Wizard).

User's Guide

More information on ALINT API methodology describing how to create and implement custom rules is available in the Help | ALINT API Reference.

Rule Plug-ins

Basic Terms Linting Rule Checker is a software-based procedure performing check of the input model versus common accepted design practice, typical coding or design mistake or corporate style convention. Although ALINT supplies large set of easily configurable pre-installed rules, additional customization level may be achieved with User-Defined Rules. Therefore ALINT provides a framework and a C-based API for implementing fully custom user-defined rules matching specific needs. Rule Plug-in is a physical grouping of individual rule implementations within shared library ( *.dll or *.so ). Rule checker must belong to one of the rule plug-ins in order to be activated during the linting process. Rule plugins are loaded by the ALINT engine to perform desired checking procedures over the input HDL models. There are 2 types of rule plug-ins: Pre-installed rule plug-ins User-defined rule plug-ins Each rule plug-in must have unique name for the purpose of rules identification. Full rule name always consists of a rule plug-in's name followed by dot and a rule identifier, for example: STARC_VLOG.STARC_MODULENAME

where 'STARC_VLOG' is the name of the rule plug-in, and 'STARC_MODULENAME' is the name of the rule. Two different rules may have the same name only if they belong to different rule plug-ins. The name of the rule plug-in pre-determines the name of the main ruleset. Main ruleset is automatically generated ruleset containing all rules belonging to rule plug-in. The names of the rule plug-ins and rules are not sensitive to character case.

Rule Plug-ins Registration ALINT engine loads rule plug-ins accordingly to the list specified in *.plugins files:

201

ALINT
All the plug-ins files located in the 'bin/alintplugins' folder within the ALINT installation Plug-ins files specified with -alint_plugins_file switch

User's Guide

Pre-installed rule plug-ins are registered in plug-ins files located in the bin/alintplugins folder within the ALINT installation. Registration of user-defined rule plug-ins can be done either with alint.ruleplugin.register command or by manual editing the corresponding plug-ins file. User-defined rule plug-ins may be registered either in default or custom files depending on the user needs. Registration in a default file requires -global switch for the registration command. NOTE: The alint.ruleplugin.register command will not make the specified plug-in be visible in GUI. To display user-defined plug-in in GUI it should be loaded with command alint.ruleplugin.load. During the startup ALINT loads plug-ins files in order specified above. The term 'startup' refers to: GUI/Console startup Compilation-time linting startup Elaboration-time linting startup The syntax of plug-ins file is very simple:

plugins_file ::= { rule_plugin_definition }

rule_plugin_definition ::= RULEPLUGIN_CFG { { rule_plugin_field } }

rule_plugin_field ::= windows_dll_path | | unix_so_path enable_setting

windows_dll_path ::= WINDOWS_DLL_PATH = "path_to_DLL"

unix_so_path ::= UNIX_SO_PATH = "path_to_DLL"

enable_setting ::= ENABLED = ON | ENABLED = OFF

202

ALINT

User's Guide

Both Windows and Unix paths may be specified, but only one matching the current platform is required to be present to use plug-in in the linting process. Path may be absolute or relative - either relatively to the current directory (checked first) or relatively to the bin folder within the ALINT installation (checked second). Plug-in may be disabled with ENABLED OFF setting. In such case it will not be loaded during the engine startup. Example of a rule plug-in definition for a Windows platform:

RULEPLUGIN_CFG { WINDOWS_DLL_PATH = "c:\work\my_rule_plugin.dll" ENABLED = ON }

Once loaded, rule plug-in's library is locked and cannot be updated. When the library is loaded during the compilation or elaboration linting - it is unlocked at the end of the linting session. Regarding the GUI or console frameworks, rule plug-in library remains locked until the frameworks are closed or alint.ruleplugin.unload command is run. Rule plug-in may be unregistered using the alint.ruleplugin.unregister command or with manual deletion of the rule plug-in definition from the plug-ins file. NOTE: The alint.ruleplugin.unregister command will not take any effect on GUI. To unload plug-in from GUI (if it was previously loaded) command alint.ruleplugin.unload should be used. Without unloading rule plug-in library remains locked. Rule plug-in may be loaded in several modes: Informational mode - rule plug-in structure and resource data is loaded for the GUI display needs or for AVDB-related commands Verilog Compilation-time linting mode - rule plug-in is loaded for the purpose of linting Verilog code at the compilation phase VHDL Compilation-time linting mode - rule plug-in is loaded for the purpose of linting VHDL code at the compilation phase Elaboration-time linting mode - rule plug-in is loaded for linting a fully elaborated, possibly mixed-language design model

Rule Plug-in Resources User-defined rule plug-in may fully utilize the GUI framework features for documentation functionality. With a set of file naming conventions followed it is possible for user-defined rule plug-in to have:

203

ALINT
Rule-dependent links to HTML description of a rule Description within Rule Plug-in Viewer, including HDL examples and pictures

User's Guide

The reference documentation for rules should be placed within documentation/html folder. There must be a subfolder created with the name matching the name of the rule plug-in, and an HTML file for each documented rule. F.ex., for a rule 'my_rule_n1' from a rule plug-in 'my_plugin' there should be an HTML file located at:

<ALINT_INSTALLATION_FOLDER>/documentation/html/my_plugin/my_plugin.my_rule_n1.htm

The XML data descriptor for Rule Plug-in Viewer should be located at:

<ALINT_INSTALLATION_FOLDER>/resources/lang/en/alint_rule_plugins/my_plugin.xml

There should be a single file for each rule plug-in. It should contain the following tag structure:

<rules> <rule name="Name_Of_The_Rule" > <title value = "Rule Title" /> <description value = "Rule Description." /> <example value = "example_file_name" format = "vhdl" /> <image value = "image_file_name" /> </rule> </rules>

Examples specified with <example> tag can demonstrated a piece of HDL code with automatic coloring of the language keywords and tokens. The attribute 'format' determines the language of example. Values 'vhdl' and 'verilog' are allowed, the value 'verilog' is taken by default. For the following example link:

<example value="my_rule_example" format = "vhdl" />

there should be a corresponding file :

204

ALINT

User's Guide

<ALINT_INSTALLATION_FOLDER>/resources/lang/en/alint_rule_plugins/examples/my_rule_ex

If there are no mistakes, Rule Plug-in Viewer will display the HDL code from the file with language-specific tokens highlighted in different styles. Similarly to examples, the following image link from a plugin 'my_plugin':

<image value="my_rule_picture" />

with the matching image file present at

<ALINT_INSTALLATION_FOLDER>/resources/images/alint/alint_rule_plugins/my_plugin/my_r

will display the interested picture in the Rule Plug-in Viewer. The easiest way to understand the format is to follow the examples for pre-installed rule plug-ins in the same resource folders.

New Rule Wizard

You can quickly create new rule using new rule template. For that you should do the following: 1. From the Quick Launch Panel window click the Create New Rule item in the Advanced section. The Create New Rule Wizard | New Design window will be opened (see Figure 1). It is also possible to start the new rule wizard from the File | New | Rule. 2. In the Create New Rule Wizard | New Design window specify the design name and location in the appropriate fields. 3. Click the Next button. The Create New Rule Wizard | New Rule (see Figure 2) window will be opened (see Figure 2) 4. In the Create New Rule Wizard | New Rule window specify the following fields: Name rule plug-in Type in the name of the rule plug-in which will contain a new rule. Type the rule name Type in the name of the new rule.

205

ALINT
Ruleset name

User's Guide

Type in the name of the ruleset which will contain the plugin with the new rule. This ruleset will be included in the Built-in rulesets (may be observed in the Configuration Viewer). Policy name Type in the name of the policy which will contain the ruleset with the new rule. This policy will be included in the Built-in policies (may be observed in the Configuration Viewer). Violation message template for checker rule Type in the violation message which will appear when the new rule is violated. 5. Click the Finish button. The new rule will be created.

Figure 1. The Create New Design Wizard | New Design window.

206

ALINT

User's Guide

Figure 2. The Create New Design Wizard | New Rule window.

207

ALINT

User's Guide

FPGA Vendor Primitives

Overview

Schematic libraries for FPGA include the following types of symbols (also referred to as components): Primitive It is a resource that is directly recognized by the implementation software and typically corresponds to a logic resource in target FPGA (for example, I/O pins, buffers, logic gates, or flip-flops). Macro It is schematic that contains primitives and other macro that implement more complex predefined functions (for example, counters, shift registers, decoders).There is soft macro, that has predefined functionality but its physical implementation (mapping, placing & routing) depends on the implementation software, and hard macro, that has predefined mapping and placing information that optimize its implementation. Typical FPGA library usually contains wide and extensive variety of primitives and macros, starting with simplest buffers and two-input gates to comparatively complex things such as accumulators or RAMs.

Regular Synthesis v.s. Dedicated Vendor Components Support Regular approach to synthesis is not effective for vendor components as long as they contain non-synthesizable code (this is implementation software task to match a component with appropriate logic resource). With regular synthesis, vendor components are treated as black boxes and the following problems arise because of black boxes presence: 1. False violations are reported by various rules (e.g. rules that check connections to black box I/Os, or rules that detect issues related to controllability from external input ports, or rules that detect combinatorial feedbacks). 2. Information about design hierarchy becomes incomplete. High-level rules cannot properly analyze interconnections between the design elements and important design flaws may remain not addressed. Regular synthesis approach is shown in the Figure 1. Point #1: signal "SIG" propagation stops on the connection to the black box input (this signal may be a clock or reset in the design but it cannot be detected automatically since the black box blocks its propagation and it won't reach any flip-flop clock pin). Point #2: output of black box is connected to the clock pin (appropriate rule triggers alongside with false violations from several flip-flop and clock related rules).

208

ALINT

User's Guide

Figure 1..Unsupported Primitive (Regular Synthesis)

In order to handle vendor components properly, the linting tool should be aware about their internal structure and functionality. When the internal structure is known, it is possible to substitute a vendor component with equivalent model for synthesis and do not infer a black box.

Vendor Components Support Levels Each vendor library supported by ALINT can include components with one of the following three levels of support (awareness about internal structure): Fully Supported ALINT is fully aware about internal structure of fully supported primitives. An example of how the supported primitive is handled is shown in the Figure 2: Point #1: signal "SIG" is auto-detected as a clock as long as it is connected to the clock pin of supported vendor primitive. Point #2: illegal connection of flip-flop output (vendor primitive) to clock pin of another flip-flop is detected.

Figure 2. Fully Supported Primitive

209

ALINT
Simplified Handling

User's Guide

Some primitives are quite complex and not fully supported yet (planned in the next releases). For example, currently FIFOs, RAMs, and LUTs are considered to be in this category. Simplified handling means that all the high level rules treat these primitives as gray boxes -- special type of black box: Feedbacks are propagated through such primitives (i. e. combinatorial feedback loop can be detected if such a primitive is present on the feedback propagation chain). Outputs are considered as external input pins (i.e. global clock or reset is auto-detected if such an output is directly connected to clock or reset pin(s). An example of how a primitive is handled in simplified way is shown in the Figure 3: Point #1: "FIFO16" output is considered as external input pin by the other parts of design and auto-detected as a clock at the point #2.

Figure 3. Simplified Handling

Special Handling Some components are handled in a special way. Clock generators (e.g. DCM, PLL in Xilinx unisim). ALINT automatically detects their clock outputs as global clocks in the design; clock domains are also extracted correctly based on knowledge about clocks phases and frequencies. An example of DCM special handling is shown in the Figure 4: Point #1: signal "SIG" is auto-detected as a clock as long as it is connected to "CLKIN" which is a clock pin. Point #2: illegal connection of automatically detected clock "CLK2X" (vendor primitive interface is known) to the flip-flop data pin is detected.

210

ALINT

User's Guide

Figure 4. DCM Special Handling NOTE: Vendor primitives with multiple clock outputs may form more than one clock domain. An output is not considered as a new clock (and thus it cannot infer a new clock domain) if: 1. It has constant frequency relationship with the input clock. 2. It has constant phase relationship with the input clock. For example, Xilinx/unisim/DCM: Port Pin Clock Descriptions Direction domain CLKIN IN Domain.1 CLKFB IN -RST IN -CLK0 OUT Domain.1 CLK180 OUT Domain.1 CLK270 CLK2X CLK90 CLKDV LOCKED OUT OUT OUT OUT OUT Domain.1 Domain.1 Domain.1 Domain.2 -Port Function Clock input Clock feedback Asynchronous reset Clock at 1x CLKIN frequency Clock at 1x CLKIN frequency, shifted 180 o with regards to CLK0 Clock at 1x CLKIN frequency, shifted 270 o with regards to CLK0 Clock at 2x CLKIN frequency, in phase with CLK0 Clock at 1x CLKIN frequency, shifted 90 o with regards to CLK0 Clock at (1/n)x CLKIN frequency, n=CLKDV_DIVIDE value. CLKDV is in phase with CLK0 CLKDLL locked

Random access memory (e.g. RAMs in Xilinx unisim) ALINT consider their clock inputs during the design global clock detection process. An example of RAM special handling is shown in the Figure 5: Point #1: signal "SIG" is auto-detected as a clock as long as it is connected to "WCLK" which is a clock pin. Point #2: illegal connection of automatically detected clock "SIG" (vendor primitive interface is known) to the flip-flop data pin is detected.

211

ALINT

User's Guide

Figure 5. RAM Special Handling

Not supported libraries are handled as black boxes. Current set of supported libraries is extensive - in the future ALINT will support all major vendor libraries.

Attaching Vendor Library to a Design All the general rules (see the Design Libraries section) apply to each vendor library that contains primitives supported by ALINT. In order to make a library available during the linting session, it should be added to a project/macro (see the related details in the Library Visibility Rules). Once a supported library is attached, all the vendor components used in the description will be automatically recognized by ALINT. Unsupported libraries still can be used during the linting process, however black boxes will be generated for the absolute majority of primitives.

212

ALINT
Supported Libraries

User's Guide

Altera

Library Name altera altera_exemplar altera_lnsim altera_mf altgxb alt_vtl apex20k apex20ke apexii arriagx arriagx_hssi arriaii arriaii_hssi arriaii_pcie_hip arriaiigz arriaiigz_hssi arriaiigz_pcie_hip cyclone cycloneii cycloneiii cycloneiiils cycloneiv cycloneiv_hssi cycloneiv_pcie_hip cycloneive cyclonelps flex10ke flex6000 hardcopyii hardcopyiii hardcopyiv hardcopyiv_hssi hardcopyiv_pcie_hip hcstratix lpm max

Support Level Full/Special Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Full Simplified

213

ALINT
maxii maxv mercury ovi_altera ovi_altera_lnsim ovi_altera_mf ovi_altera_vtl ovi_altgxb ovi_apex20k ovi_apex20ke ovi_apexii ovi_arriagx ovi_arriagx_hssi ovi_arriaii ovi_arriaii_hssi ovi_arriaii_pcie_hip ovi_arriaiigz ovi_arriaiigz_hssi ovi_arriaiigz_pcie_hip ovi_cyclone ovi_cycloneii ovi_cycloneiii ovi_cycloneiiils ovi_cycloneiv ovi_cycloneiv_hssi ovi_cycloneiv_pcie_hip ovi_cycloneive ovi_cyclonelps ovi_flex10ke ovi_flex6000 ovi_hardcopyii ovi_hardcopyiii ovi_hardcopyiv ovi_hardcopyiv_hssi ovi_hardcopyiv_pcie_hip ovi_hcstratix ovi_lpm ovi_max ovi_maxii ovi_maxv ovi_mercury ovi_sgate ovi_stratix Simplified Simplified Simplified Full/Special Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Full Simplified Simplified Simplified Simplified Simplified Simplified

User's Guide

214

ALINT
ovi_stratixgx ovi_stratixgx_gxb ovi_stratixii ovi_stratixiigx ovi_stratixiigx_hssi ovi_stratixiii ovi_stratixiv ovi_stratixiv_hssi ovi_stratixiv_pcie_hip ovi_stratixv ovi_stratixv_hssi ovi_stratixv_pcie_hip sgate stratix stratixgx stratixgx_gxb stratixii stratixiigx stratixiigx_hssi stratixiii stratixiv stratixiv_hssi stratixiv_pcie_hip stratixv stratixv_hssi stratixv_pcie_hip Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified

User's Guide

Xilinx

Library Name aim coolrunnerii cpld logiblox ovi_aim cpld_ver simprims_ver ovi_uni3000 ovi_uni5200 uni9000_ver unimacro_ver

Support Level Simplified Simplified Simplified Simplified Simplified Simplified Full/Special Simplified Simplified Simplified Simplified

215

ALINT
unisims_ver xilinxcorelib_ver pls secureip simprim simprim_edif spartan spartan2 spartan2e spartan3 spartan3a spartan3adsp spartan3e spartan6 spartanx unimacro unisim virtex virtex2 virtex2p virtex4 virtex5 virtex6 xabelsim xc3000 xc4000e xc4000x xc5200 xc9500 xilinxcorelib Full/Special Simplified Simplified Simplified Full/Special Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Full/Special Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified Simplified

User's Guide

NOTE: An old naming format (name starting with 'ovi_') is also supported for the vendor libraries that name ends in '_ver': ovi_cpld, ovi_simprim, ovi_unimacro and so on.

216

ALINT

User's Guide

Source Code Exclusions

Overview

There are several ways to suppress undesired linting output: using embedded in HDL code comments (@alint pragmas, synthesis pragmas) or exclusions files. @alint pragmas Rulesets and individual rules can be disabled with the help of the pragmas. ALINT supports source code pragmas - special comments starting with "//@alint" prefix in Verilog or "--@alint" prefix in VHDL. Pragmas instruct ALINT about disabling/re-enabling rules and rulesets for the trailing code portions. Synthesis constraints Used to ignore portions of code that are not relevant for the synthesis. Therefore, rules that require synthesis information are not verified for those code parts. Exclusions files provide a way to disable specified rules checks for particular design elements - files, design units, and instances. The files are created with GUI and can be easily used for linting session (-alint_exclusions argument or Linting | General | Exclusions File of design properties). Exclusions mechanism is more flexible compared to pragmas because the source HDL files are unaffected. However exclusions files cannot adjust the behaviour of linting for particular HDL model objects, such as processes, in this case use of pragmas is more appropriate. NOTE: See the Disable Checks for Particular Context section for comparison of available ways for suppressing linting warnings.

Disable Checks for Particular Context

There are several ways to disable rule checks and to suppress undesired linting warnings in ALINT. These options are grouped in the following categories: GUI, Console, and Source File.

GUI Options Options listed in this group are available in the GUI mode only: Compilation with Linting Compilation without Linting Exclude from Compilation Design units to skip from checking Disable Rule(s) for

The first four options provide a simple way to disable rule checks for entire workspace, individual design, particular file or design unit. They are available directly from Design Manager Context Menu or Design Properties (Properties | Linting | Entries | Design units to skip from checking). These options are easy to use, however they

217

ALINT

User's Guide

are quite rough. They provide possibility to disable/enable all rules at once. So it is convenient to use them, when there is no need to lint a part of the design. For example, a third party designs, vendor libraries, automatically generated files. If you need to disable specific rules for entire design, source files, design units, or instances, then Disable Rule(s) for option should be used. This option modifies either policy or exclusions file attached to the design. It provides more flexible disabling mechanism than first four options. The use of exclusions file takes more time and effort to setup the environment, so it should not be used when we need to totally skip checks for some context. It suits the best when we decide to violate a rule intentionally. For example, this can be done for achieving better time or area requirements by means of unsafe technics. See more details about exclusions files in the Exclusions Files, Violation Viewer Pop-up Menu, and Exclusions Editor sections.

Console Options Options listed in this group are available in the Console mode: acom/alog without -alint -alint_skipfile -alint_skipunit -alint_policy -alint_exclusions

The Console options provide the same functionality as GUI ones. The acom/alog command used without -alint argument is equivalent of the Compilation without Linting option. The -alint_skipfile argument is equivalent of the Compilation without Linting option. The -alint_skipunit argument is equivalent of the Design units to skip from checking option. The -alint_policy argument is equivalent of the Disable Rule(s) for policy. The -alint_exclusions argument is equivalent of the Disable Rule(s) for file, design unit, or instance.

Source File Options Options listed in this group require source file modifications and so they affect both GUI and Console modes: @alint Pragmas Synthesis Constraints These options specify the context for rule disabling with higher precision than exclusions files. But using Pragmas requires inserting additional meta comments in a source code, takes more time, and is error-prone. Using of these options should be avoided unless you need to adjust the behaviour of linting for particular HDL model constructs, such as process statements.

218

ALINT

User's Guide

Comparison of Available Options The following Comparison table contains a brief summary of the described options: Option Name Context Affected Rules GUI options: Compilation with Linting workspace, All design, file Compilation without Linting design, file Exclude from Compilation design, file Design units to skip from checking Disable Rule(s) for design unit All policy file instance Console options: acom/alog without -alint -alint_skipfile -alint_skipunit -alint_policy -alint_exclusions file file policy file instance Source File options: @alint Pragmas Synthesis Constraints s o u r c e Specified code No No No All All Specified Specified Specified No No No No No No Yes3 No2 No2 No No No No No Specified Specified Specified No No No No Yes3 No No No No No All N/A1 N/A1 All No No2 Yes Yes Compilation-time Elaboration-time Violations Violations

design unit Specified

design unit All

design unit Specified

s o u r c e Synthesis No code dependent

1 No design units from the excluded files are compiled to the working library. If elaboration-time linting is invoked, then the error message is reported for the instantiation of design units from the excluded files. 2 If elaboration-time linting is invoked, then the following warning message is reported: ELAB2: Warning: ELAB2_0095 Unit "<design_unit>" is not compiled with ALINT information. Use "-alint -alint_elabchecks" switch for compiler or use "alint"

219

ALINT
command. 3 Disabling a rule for the instance does not affect violations reported on the files or design units. See the detailed explanation of columns used in the given Comparison table: Option name Contains the option name. Context Defines the particular object to which the specified option can be applied. Workspace The option is applied to all elements of the workspace. Design The option is applied to all elements of the design. File The option is applied to all design units in the particular file. Design unit The option is applied to the design unit, all its instances and sub-instances. Instance The option is applied to instance and all its sub-instances. Affected Rules Defines how the set of rules disabled by the option, is controlled. All All available rules are disabled/enabled at once. Specified It is possible to specify the set of rules to be disabled by the option. Synthesis dependent All synthesis-dependent rules are disabled/enabled at once. Compilation-time violations Defines if the linting results contain compilation-time violations reported by the disabled rules. Elaboration-time violations

User's Guide

220

ALINT
Defines if the linting results contain elaboration-time violations reported by the disabled rules.

User's Guide

221

ALINT
@alint Pragmas

User's Guide

Enable/Disable Rules And Rulesets

@alint pragma can set the state of an individual rule or rules included into some ruleset, i.e. affect rule ENABLED parameter.

Changing rule state Syntax: {//|--}@alint rule_state { on | off } { rule_name | all } The first parameter is a keyword rule_state, which tells ALINT to operate with ENABLED rule parameter. The second parameter defines the value of ENABLED rule parameter: on - sets ENABLED = ON off - sets ENABLED = OFF The third parameter defines target rules for a state setting: rule_name - name of any rule used in an active policy, may be a comma-separated list of rule names; target rules must be used in an active policy all - all rules used in an active policy

Changing ruleset state Syntax: {//|--}@alint ruleset_state { on | off } ruleset_name The first parameter is a keyword ruleset_state, which tells ALINT to operate with the ENABLED parameter of all the rules included into specified ruleset. Second parameter determines the value of ENABLED parameter: on - sets ENABLED = ON off - sets ENABLED = OFF The third parameter defines target rulesets for a state setting: ruleset_name - the name of any ruleset used in an active policy, may be a comma-separated list of ruleset names; target rulesets must be used in an active policy

222

ALINT
Example of using pragmas rule_state and ruleset_state Having the following policy: policy_cfg my_pol { use STARC_VLOG // main ruleset use STARC_VLOG.R2 // some rule used individually use RS2 // and 2 custom rulesets use RS3 } Let us assume that both used rulesets and all their rules are enabled. The active policy is "my_pol".

User's Guide

Consider the usage of the following pragmas in Verilog source code (//comments describe the effect): //@alint rule_state ON all ... // this Verilog code is checked using all rules from the active policy //@alint rule_state OFF all ... // this Verilog code is not checked //@alint rule_state on STARC_VLOG.R1, STARC_VLOG.R2 ... // this Verilog code is checked using only rules STARC_VLOG.R1 and STARC_VLOG.R2 //@alint ruleset_state on RS2 //@alint rule_state on STARC_VLOG.R3 ... // this Verilog code is checked using only rules STARC_VLOG.R1, STARC_VLOG.R2 (previously enabled), newly enabled rule STARC_VLOG.R3 and ruleset RS2 //@alint rule_state off STARC_VLOG.R2 ... // previous rules set is narrowed by disabling the rule STARC_VLOG.R2, which was enabled several pragmas earlier

Set Severity For Rules And Rulesets

@alint pragma can dynamically change the severity level of individual rule or rules included into some ruleset, i.e. affect rule SEVERITY setting.

Changing rule severity Syntax: {//|--}@alint rule_severity severity_level { rule_name | all } severity_level ::= information | warning | critical | error The first parameter is a keyword rule_severity, which tells ALINT to work with rule severity setting.

223

ALINT
The second parameter determines the value for SEVERITY rule parameter: info | warning | critical | error - overwrites SEVERITY field with respective value The third parameter defines target rules for severity setting: rule_name - name of any rule used in the active policy, may be a comma-separated list all - all rules used in the active policy

User's Guide

Changing ruleset severity Syntax: {//|--}@alint ruleset_severity severity_level ruleset_name severity_level ::= information | warning | critical | error The first parameter is a keyword ruleset_severity, which tells ALINT to work with SEVERITY parameter of all the rules included into specified ruleset. The second parameter determines the value of SEVERITY setting: info | warning | critical | error - overwrites SEVERITY field with respective value The third parameter defines target rulesets for a severity setting: ruleset_name - name of any ruleset used in the active policy, may be a comma-separated list

Example of using pragmas rule_severity and ruleset_severity Having the following policy: policy_cfg my_pol { use STARC_VLOG // main ruleset use STARC_VLOG.R2 // some rule used individually use RS2 // and 2 custom rulesets use RS3 } Let's assume that both of used rulesets and all their rules are enabled. The active policy is "my_pol". Consider the usage of the following pragmas in Verilog source code (//comments describe the effect): //@alint rule_severity warning all ... // here all rules and rulesets from the active policy will have severity WARNING //@alint rule_severity info all ... // all violation in this Verilog code will report violations on INFO severity level

224

ALINT

User's Guide
//@alint rule_severity critical STARC_VLOG.R1, STARC_VLOG.R2 ... // only rules STARC_VLOG.R1 and STARC_VLOG.R2 will now report violations as warnings with CRITICAL severity level (others are still INFO) //@alint ruleset severity warning RS2 //@alint rule_severity warning STARC_VLOG.R3 ... // ruleset RS2 and rule STARC_VLOG.R3 now have WARNING severity level (rules STARC_VLOG.R1 and STARC_VLOG.R2 still have CRITICAL severity, others are still INFO)

Push/Pop ALINT Settings

Any complex set of options can be created using the pragmas/configuration files/command line. @alint pragma has an option to save/restore all the options using push/pop stack mechanism.

Push current configuration to a stack This option saves all the current settings pushed into some dynamic data storage inside the ALINT which works like usual LIFO stack. Syntax: {//|--}@alint push Keyword push tells ALINT to save current settings to the stack. All current settings stay the same but further actions will not affect the pushed configuration.

Pop saved configuration from a stack This option restores all the settings from the previously saved configuration. Remember the stack works in the LIFO mode, so the most recently saved configuration will be restored. Syntax: {//|--}@alint pop Keyword pop tells ALINT to take the most recently pushed settings from the stack and apply them. This configuration is also removed from the stack. All the current settings will be lost (overwritten by restored settings).

225

ALINT
Push/pop usage example Comments describe the effects:

User's Guide

// for the following part of the code a lot of settings has been made in the configuration file. // This code will be checked according to some complex set of options "A" .... // THIS PART OF THE CODE IS CHECKED WITH THE SET OF OPTIONS "A" // the following part of the code is needed to be checked by using different options - set "B" // "A" is saved (pushed) to the stack //@alint push // set options according to set "B" ... // THIS PART OF THE CODE IS CHECKED WITH THE SET OF OPTIONS "B" // "A" is restored back from the stack //@alint pop ... // THIS PART OF THE CODE IS CHECKED WITH THE SET OF OPTIONS "A"

226

ALINT
Synthesis constraints

User's Guide

Synthesis translate_off and translate_on

The translate_off and translate_on are synthesis constraints (pragmas). They are used to instruct ALINT to ignore portions of code that are not relevant for the synthesis - e.g. simulation code. The translate_off directive marks the beginning of the section to be ignored and the translate_on directive instructs ALINT to resume synthesis. In order to be recognized by the synthesis engine, pragma should be based on this pattern: pragma_name pragma_setting. Note that the following synonyms are available for the keywords: pragma_name rtl_synthesis, synopsys, pragma, synthesis pragma_setting off/on, synthesis_off/synthesis_on, translate_off/translate_on

These pragmas can be used to skip processes, concurrent assignments, and sequential statements from synthesis. See the examples below.

Examples

Verilog always @( posedge CLK or posedge RST ) begin // synthesis translate_off // 1) Built-in synthesizer does not consider the following code. ... -> seq_done; // synthesis translate_on // 2) Flip-flop "Q" is synthesized => all the synthesis related rules are checked, // e.g. incorrect polarity of async. control signal

// (If synthesis was not constrained above, the whole process would have been aborted by synthesis). if ( RST )

227

ALINT
Q <= 0; else Q <= DATA; end

User's Guide

VHDL process ( CLK, RST ) begin -- synthesis translate_off -- 1) Built-in synthesizer does not consider the following code. print_debug_info(); -- synthesis translate_on -- 2) Flip-flop "Q" is synthesized => all the synthesis related rules are checked, -e.g. incorrect polarity of async. control signal

-(If synthesis was not constrained above, the whole process would have been aborted by synthesis). if ( RST = '1' ) then Q <= 0; elsif ( CLK'event and CLK = '1' ) then Q <= data; end if; end process;

228

ALINT
Exclusions Files

User's Guide

Exclusions Files Content

Exclusions files provide a way to disable specified rules check for particular design elements. It is also possible to disable all rules at once on a selected design part. There are 3 types of elements available for configuration with exclusions files: File No violations (compilation-time/elaboration-time) of the specified rules are reported on the file. Absolute or relative path can be used. Specified configuration is not applied for files used within 'include directive. Design unit No violations (compilation-time/elaboration-time) of the specified rules are reported on the design unit, all its instances and sub-instances. Example: module_name entity_name(architecture_name) entity_name(configuration_name) package_name Instance No violations (elaboration-time) of the specified rules are reported on the instance and its sub-instances. Hierarchical instance name should be used. Example: top.U1.ADDER NOTE: If all rules are disabled for a file or a design unit, synthesis results of the specified part are still available and elaboration-time checks can be performed without limitations. There is convenient way to create and modified exclusions files using GUI tool - Exclusions Editor. Using .alintexclusions extension allows ALINT to recognize file type automatically. Configuration described with help of exclusions file can be enabled for the linting session in one of the following ways: -alint_exclusions argument of alog, acom, asim, and alint commands; Exclusions File option of Linting | General page in the design properties.

229

GUI Reference

Framework

Overview
The Framework is the ALINT main window where all other windows can be docked. It can display two types of windows: document and tool windows. The picture below (see Figure 1) explains how windows are accommodated in the Framework.

Figure 1. Windows in the Framework

The Framework can be displayed in the full screen mode by using the Full Screen command from the Windows menu. The default keyboard shortcut for toggling the full screen mode is F12. To expand a tool window horizontally or vertically, use the Expand button. The expanded tool window will occupy a complete side of the Framework, including the corner areas. For example, the Console window displayed below the document window area after expanding will shove the vertical tool windows from the two bottom corners and will occupy a complete Framework width. Pressing the Expand button once more will shrink the Console to the area below the document window area. The Expand button in the Console will have no effect if no tool windows are displayed to the left and right sides of the document window area.

230

ALINT

GUI Reference

NOTE: The icon on the Expand button does not change regardless of whether the window is expanded or not and of its location. The arrows on the button always point in up and down directions even if the window will be expanded horizontally. If more than one tool window is displayed on one side of the document window area, then pressing the Expand button affects all the windows displayed on this side. To undock a tool window use the Undock button located next to the Expand button. An undocked window is always displayed in front of the Framework. To dock an undocked window, use the Dock button. (The Undock button changes to the Dock button when a window is undocked.) To close a window use the Close button.

Toolbar
Except for the common buttons that allow user to open new file, save it, copy, paste, undo, redo and so on actions, the following buttons are available from the toolbar menu: Activate Console (Alt+0) Activate Design Manager (Alt+1) Activate Library Manager (Alt+2) Activate File Browser (Alt+3) Activate Quick Launch Panel Window (Alt+4) Activate Flow Manager (Alt+5) Activate Configuration Viewer (Alt+6) Activate Rule Plugin Viewer (Alt+7) Activate Rule Description Viewer (Alt+8) Activate Rule Parameters Editor (Alt+9) Open HTML Viewer (Ctrl+T) Run Compilation-time Linting (Ctrl+F5) Run Elaboration-time Linting (Ctrl+F6) Break Current Operation (Ctrl+Shift+C)

Document Windows and Tool Windows


The Framework in ALINT displays two types of windows: document windows tool windows The two window types behave differently and cannot be grouped together.

231

ALINT
Document Windows

GUI Reference

Document windows are displayed in the document area of the Framework. You can resize the document area of the Framework using the bars splitting the framework workspace. If the Window | Mode | Tabbed mode is chosen document windows are tabbed. Window tabbing is enabled by default. A tab on top of a document window is visible even if only one document window is displayed. Tabbed windows are not affected by the Cascade and Tile commands from the Window menu. Multiple Document mode from the Window menu allows to accommodate document windows in the document area like regular, resizable windows. Document windows can be ordered with the Cascade and Tile commands available from the Window menu. The Tile command arranges windows inside the document area side by side, and the Cascade command arranges windows so that their title bars are visible. To switch quickly between modes (Tabbed and Multiple Document) double click on a tab or a document title bar. The following window types are document windows: HDL Editor Policy Editor Ruleset Editor Exclusions Editor Violation Viewer HTML Viewer

The document area of the Framework is not available to tool windows even if no document window is displayed.

Tool Windows Any window that is not a document window is a tool window. The Framework allows you to: Drag a tool window and dock it anywhere in the Framework. When docked, it is an integral part of the framework it looks as if it were embedded in the framework window. Resizing a docked window involves resizing the adjacent docked windows. Tab multiple tool windows (any two tool windows can be tabbed in the same tab group, however, they cannot be placed in the document area). Undock a tool window and use it as a standalone window. When undocked, tool window is displayed on top of the ALINT window.

Switching between Windows


If you want to switch quickly between windows you can call the ALINT window with the list of all the opened windows by pressing the Ctrl+` (Ctrl+ Grave accent key) or by choosing the Windows... command in the Window menu (See Figure1).

232

ALINT

GUI Reference

Figure 1. The ALINT window with the list of all the opened windows

It shows you window with three sections: Section Position Left section Right section Bottom section The list of tool widows The list of document windows The name of focused window or the window which will receive focus. Windows Types

The list of tool windows begins with the window which is currently on focus or was on focus the last. The list of document windows keeps the same principle - active document or document which was active the last is on the top. If you select one of the tool windows from the list bottom section will show you its name. Otherwise if you select one of the document windows from the list bottom section will show you the document name and the path to this document. To close the ALINT window with the list of all the opened windows without making any changes click anywhere outside this window or press the Escape button on the keyboard.

233

ALINT
Switching between Tool Windows To select another tool or document window you can use arrow keys on the keyboard.

GUI Reference

To switch between tool windows you need to select one of the tool names by mouse double click or by arrow keys on the keyboard and pressing the Enter key. Selected window will receive focus and will set as an active. ALINT window with the list of all the opened windows will be closed automatically.

Switching between Document Windows 1. Select one of the document windows displayed in the document area of the Framework and press Ctrl+Tab keys on keyboard. 2 Open the ALINT window with a list of all the opened windows and select document window name in the list on the right section. Double click the mouse left button or press the Enter key on the keyboard. Selected document will receive focus and will be set as an active. ALINT window with a list of all the opened windows will be closed automatically. Select document window name on the pop-up list of the document area of the Framework (see Figure 2).

Figure 2. The pop-up list of the document area

Select the Next or the Previous command from the Window menu.

Status Bar
The Status bar in the Console window displays brief information about the currently selected menu command or highlighted toolbar button and may contain different toolbars.

234

ALINT
The Status bar may include: Favorites toolbar Perspective Navigator toolbar Views toolbars Description section

GUI Reference

Predefined area for displaying messages. HDE Editor description section Predefined area for displaying information provided by HDE Editor window. To add a new toolbar to the Status bar, move mouse cursor over the Status bar, right-click and select one of the toolbar names from the pop-up menu. You can enable displaying of the Favorites, Perspective Navigator, Design Management Views, Linting Views and Other Views toolbars. Each toolbar can be collapsed using the arrow another arrow button . button on the right of the toolbar. To open collapsed toolbar, use

Favorites Toolbar The Favorites toolbar displays favorite icons added by user to the Favorites toolbar. The Favorites toolbar also contains icons for manipulating favorites. See Favorites for details.

Perspective Navigator Toolbar The Perspective Navigator toolbar contains icons for manipulating perspectives and allows switching between predefined and custom perspectives. See Perspectives for details.

Views and Other Toolbars You can embed Views and other toolbars into the Status bar. Views toolbars contain commands for opening debug windows, design management windows, etc. Toolbars that can be embedded in the Status bar duplicate main toolbars on the top of the framework.

Description Section The description section is a predefined area for displaying advisory messages and command descriptions. To show command description, locate the mouse-cursor over an icon on the toolbar or select an option from a menu. The command description will appear in the empty area on the right-hand side of the toolbars in the Status bar.

235

ALINT
HDE Editor Section

GUI Reference

When the HDE Editor is opened, the Status bar shows cursor position, read/write permissions, the state of the Caps Lock, Num Lock, Scroll Lock keys, etc. Ln Col CS CAP NUM INS/OVR R/W - line number - column number - number of selected symbols - state of the Caps Lock key - state of the Num Lock key - state of the Insert key - read/write permission

Favorites
The Favorites toolbar displays favorite icons added by user to the Favorites toolbar. The Favorites toolbar also contains icons for manipulating favorites.

Figure 1. The Favorites toolbar. If the Favorites toolbar is not visible on the Status bar, you can enable it by right clicking on the Status bar and selecting the toolbar name from the drop-down menu. The Favorites toolbar can be collapsed using the left directed arrow button on the right of the toolbar. To open collapsed toolbar use the right directed arrow button. See the Status bar topic for details.

Add and Remove Favorites To add a command to the Favorites toolbar use the Add to Favorites icon on the Status bar to open the drop-down list and select the command. The icon connected with this command will appear on the right of the Favorites toolbar. It is possible to embed a link to a macro file into the Favorites toolbar. Select the Add Macro command from the drop-down list invoked by clicking on the Add to Favorites icon on the Favorites toolbar and specify the path to a macro file. When you put mouse cursor over the icon associated with the macro file, path to a macro file is displayed in the empty area on the right hand of toolbars (like other command descriptions). If you want to remove a command from the Favorites toolbar use the Remove from Favorites icon to open the drop-down list with all earlier added commands. To remove command, just select one of the command in the list. The icon connected with this command will disappear from the Favorites toolbar.

236

ALINT

GUI Reference

Perspectives
A perspective stores the position of all the docked windows in the ALINT framework. ALINT remembers which perspective was active during the previous working session and restores it at startup. There are five predefined perspectives: Quick Start, Default, Console, Documents, Policy and Ruleset. You can create your own perspectives. Perspective name Quick Start Default Console Documents Policy Ruleset Description The Quick Start perspective is default at the first run. It contains the Quick Launch Panel window enabling quick access to basic functions of the product. It is recommended to get started with the product for the first time. The Default perspective has all the basic windows activated. It is recommended to use this perspective at once if you already have an experience with the product. This is the mode when the Console window is expanded, all another windows are closed. This is the mode when the document windows (HDL Editor, Policy Editor, etc.) are expanded, all other windows are closed. The Linting windows for policies editing : Configuration Viewer, Rule Plug-in Viewer, Rule Description Viewer, Parameters Editor. The Linting windows for rulesets editing : Configuration Viewer, Rule Plug-in Viewer, Rule Description Viewer, Parameters Editor.

The Perspective Navigator toolbar you can find on the Status bar. If the Perspective Navigator is not visible on the Status bar, you can enable it by right clicking on the Status bar and selecting the toolbar name from the button-menu. The Perspective Navigator toolbar can be collapsed using the arrow button on the right of the toolbar. To open collapsed toolbar use another arrow button. See the Status bar topic for details.

Adding and Deleting Perspectives To create a new perspective use the Create Perspective button on the Perspective Navigator toolbar. You will be prompted for the perspective name. The perspective will be created based on the current window layout. The name of the newly created perspective will appear on the list of predefined perspectives. To delete a perspective, use the Delete Perspective except Default can be deleted too. button on the Status bar. All predefined perspectives

It is possible to transfer perspectives from one computer to another by copying files from the folder /home/<user_name>/Aldec/ALINT/config/framework (Linux) or C:\Documents and Settings\Default User\Application Data\Aldec\ALINT\config\framework (Windows).

Switching Between Perspectives To switch between perspectives click the name of the perspective on the Perspectives Navigator toolbar. You can also use the Previous Perspective and the Next Perspective buttons on the Perspective Navigator toolbar.

237

ALINT

GUI Reference

Each perspective stores the list of the opened windows. When you switch from one perspective to another ALINT automatically adjusts the window layout. Windows may be shown in one perspective and hidden in another and their position and size may differ.

Configuring Application Look


ALINT allows tuning up its graphical preferences. This document discusses possible methods of customizing ALINT appearance.

Preferences for Built-in Tools The graphical preferences for individual built-in ALINT tools, editors, and viewers can be changed by using the Appearance subcategories in the Preferences dialog box, e.g. Tools | Console Appearance. You can change the default font size, font colors, font style, etc. Additionally, in the Console, you can customize a format and preferences of messages printed by various tools and modules using Console as STDOUT. In the HDL Editor, you can modify properties for user sections, assign new colors for line attributes (error line, warning line, etc), specify font settings for code highlighting, etc.

Configuring the Widget Look You can configure the look of ALINT document and tool windows, scrollbars, buttons, font size in menus, etc.

Linux To change ALINT look on Linux operating systems you can use QT Configuration application. Run the runqtconfig program from the ALINT executable directory or qtconfig from the bin folder. You have to remember that QT Configuration will change the look of all QT applications on your system. There are predefined GUI styles: CDE ALINT will use the CDE style. cleanlooks ALINT will use the Cleanlooks style. motif ALINT will use the Motif style. plastique ALINT will use the Plastique style. windows ALINT will use the Windows Classic 2000 style (default).

238

ALINT

GUI Reference

Additionally you can change Window background color and 3D effects color (new palette will be created automatically, but you can change it using the Tune Palette button). You can specify default font for ALINT (font family, style, default size). Also it is possible to change the feeling of ALINT (click intervals, number of wheel scroll lines, such GUI effects like menu animation, etc).

Windows ALINT discerns which Windows system is installed on your computer and select the same style for itself. Example: on Windows XP ALINT will use windowsxp style. You can change the ALINT style by using the -style argument in the command line: alint.exe -style <style_name>. This argument can be used on any platform. There are predefined GUI styles:

windows ALINT will use the Windows Classic 2000 style. windowsxp ALINT will use the Windows XP style. This argument is available only on Windows XP and Windows Vista operating systems. windowsvista ALINT will use the Windows Vista style. This argument is available only on Windows Vista operating system. plastique ALINT will use the Plastique style. This style is available on any platform.

Exporting/Importing GUI Preferences ALINT allows exporting and importing configuration settings defined in the GUI. The settings customized in the Preferences dialog box can be saved to a file and then used to set the same preferences on another machine. The exported preferences can be also used to restore user-defined settings after ALINT is re-installed or upgraded to a newer version. The process of the export and import is performed in the command line.

Exporting Preferences The export of the preferences results in creating a .do macro file with a set of directives specifying preferences to modify. The exported macro can be then executed and the current settings will be imported or updated. In order to export the preferences, use the following command:

239

ALINT
pref.serialize <pref_node> [-file <macro_file>] where: <pref_node>

GUI Reference

Specifies the name of the property in the ALINT GUI whose value is to be changed. The property can be defined in the form of the hierarchical specification and it can include a parameter representing the entire environment (unit name="application"), an individual module, e.g. Violation Viewer (unit name="alint_violation_viewer"), an option and its value, e.g. a changed violation, its font type, size and style (item name="changed" type="font" default="family='Arial' size='8' style='B'" ), state of a setting specifying if, e.g. an option is unchecked (item name="enable_statuses" type="bool" default = "true"). The names of the parameters are elements and attributes of the XML syntax used in the .pref files stored in the config/preferences subdirectory. For example, application/colors/alint_violation_viewer specifies that the color preferences for the Violation Viewer (set in the Tools | Violation Viewer | Appearance category) will be exported; application/fonts/alint_violation_viewer specifies that the font settings for the Violation Viewer will be exported, etc. -file <macro_file> Specifies the name of the optional .do macro file. If this argument is omitted, the list of exported preferences will be displayed in the Console window. Examples:

pref.serialize application/colors/alint_violation_viewer -file pref_vv_colors.do Exports the color preferences for the Violation Viewer to the pref_vv_colors.do macro in the current directory. pref.serialize application/fonts/alint_violation_viewer/changed Exports the font settings for the changed violations (displayed in the Violation Viewer) to the Console.

Importing Preferences The exported preferences of the ALINT GUI can be used to apply user-defined settings after ALINT is re-installed or upgraded or when you want to enable customized preferences to other users or machines. You can manually set a property by issuing the pref.setvalue command in the Console or you can use the previously exported macro that usually stores a number of the pref.setvalue commands specifying preferences for a given tool or set of options. For example, if you export the preferences of the Violation Viewwer fonts with the following command: pref.serialize application/fonts/alint_violation_viewer -file pref_vv_fonts.do the pref_vv_fonts.do macro will contain the set of the following commands: pref.setvalue application/fonts/alint_violation_viewer/base-font {family='Arial' size='8' script='' }

240

ALINT
pref.setvalue application/fonts/alint_violation_viewer/new_status {family='Arial' size='8' script='' style='B'} pref.setvalue application/fonts/alint_violation_viewer/read_status {family='Arial' size='8' script='' }

GUI Reference

pref.setvalue application/fonts/alint_violation_viewer/fixed_status {family='Arial' size='8' script='' style='S'} pref.setvalue application/fonts/alint_violation_viewer/irrelevant_status {family='Arial' size='8' script='' } pref.setvalue application/fonts/alint_violation_viewer/progress {family='Arial' size='8' script='' } pref.setvalue application/fonts/alint_violation_viewer/regress {family='Arial' size='8' script='' } pref.setvalue application/fonts/alint_violation_viewer/changed {family='Arial' size='8' script='' style='B'} pref.setvalue application/fonts/alint_violation_viewer/not_changed {family='Arial' size='8' script='' } When the macro is executed later on, the preferences defined in the file are imported and update ALINT preferences. By default, ALINT stores the updated preference files (.xml) in the user home directory that is dependent on the operating system. Table 1 lists the default locations for the preference files. Table 1 Operating System Linux Windows 2000/XP Windows Vista Preferences Directory /home/<user_account_name>/.aldec/ALINT/<version>/config C:\Documents and Settings\<user_account_name>\Application Data\Aldec\ALINT\<version>\config C:\Users\<user_account_name>\AppData\Roaming\Aldec\ALINT\<version>\config

Related Commands
This section contains the description of the commands that can be used for controlling the Framework. Toggles main window full screen mode: framework.fullscreen.toggle

241

ALINT
Sample Commands for Managing Documents: Closes all documents: framework.documents.closeall Closes all document windows except an active one: framework.documents.closeallbutactive Activates next document window: framework.documents.next Activates previous document window: framework.documents.previous Toggles documents to be shown in tabs: framework.documents.tabbed Toggles documents to be shown in separate windows: framework.documents.mdi Tile document windows: framework.documents.tile Cascade document windows: framework.documents.cascade

GUI Reference

Sample Commands for Managing Perspectives: Prints active perspective name or activates <perspective_name> perspective: framework.perspective [<perspective_name>] Creates new perspective: framework.perspective.create <perspective_name> Deletes active perspective: framework.perspective.destroy Activates next perspective: framework.perspective.next Activates previous perspective:

242

ALINT
framework.perspective.previous

GUI Reference

Sample Commands for Managing Windows: Closes active window: framework.window.close Shows window list: framework.windows.list

243

ALINT

GUI Reference

Console

Overview
The Console (see Figure 1) is the basic input output device . The compilers, the elaborator, and the other tools print out the output to the Console. You can also use this window to enter and execute macro commands. The Console includes the following elements: Toolbar Transcript area with the command prompt at the bottom. The transcript area can be tabbed. Commands can only be entered at the command prompt; the command prompt is indicated by the "greater than" (>) sign and always stays at the bottom of the window, even when you clear the transcript area or scroll its contents. To switch between the command prompt and the transcript area use the Ctrl+Up Arrow / Ctrl+Down Arrow keys. When the cursor is in the transcript area you can move around using the same keys that are available in the editor (arrows, Home, End, PgUp, PgDn). You can also select text by holding the Shift key (and moving the cursor). When you start typing, the cursor automatically jumps back to the prompt.

Figure 1. The Console window. Messages in the Console can be generated by the compilers, the elaboration kernel, the command interpreter, etc. The default color for messages in the Console is black; errors, warning, and successes are color-coded in blue, red, and green, respectively. The defaults can be changed on the Appearance option in the Tools | Console category of the Preferences dialog box. To open the error or warning message description in the HTML Viewer move mouse cursor over the message and select the Show Description option from the context menu. The Show Description option is the equivalent of the msginfo -html command.

Autocomplete
Autocomplete in ALINT Console can predict the following items:

244

ALINT
All the commands including ALINT commands, native Tcl commands, and commands defined by the user with the Tcl proc command Command arguments for ALINT command File names in ALINT commands that accept file name arguments Names of library units in those ALINT commands that use design unit names as arguments, e.g. adel, adir or asim The autocomplete list pops up after pressing the Tab key (see Figure 1.):

GUI Reference

Figure 1. The Autocomplete in the Console window. The item highlighted in the autocomplete list can be inserted at the cursor prompt with the Tab or the Enter key. File names and hierarchical names are completed by segments, i.e. only one level of the file system hierarchy or the design hierarchy is inserted at a time. Prompts for file names are relative; absolute file names can also be completed. Prompts for absolute file names become available after entering the file system delimiter. Therefore, on Linux it is sufficient to type / (and press the Tab key to show the autocomplete prompts). On Windows you need to enter the volume name followed by the delimiter, e.g. C:/ (and press the Tab key). Names relative to the path returned by the env command can also be completed. Completion prompts become available after you enter the first letter of the relative hierarchical name (and press the Tab key).

Filtering Messages in the Console


The Console output can be filtered by: Message severity; it is possible to display only errors, warnings, information messages, or any combination thereof. An arbitrary string; messages that do not contain the searched string are hidden from view. Message source; you can display only messages generated by the compilation engine, elaboration engine etc.

245

ALINT
Filter Toolbar To filter messages by their severity, use the buttons on the toolbar: Show errors only (printed in red by default). Show only warnings (printed in blue by default). Information messages (printed in black by default)

GUI Reference

To filter messages by an arbitrary string, enter the string in the edit box on the toolbar. Messages containing the string are highlighted as you type. Messages without the string are hidden. Press the Case Sensitive button on the toolbar for case sensitive filtering. To complete console output can be restored by clearing the edit box.

Filtered Views Messages shown in the Console can be filtered on separate tabs (views). The following predefined views are available: Linting Shows output of the linting engine. Compilation Shows the output of the compilers. Commands Shows commands only, without command output; note that none of the other filtered views shows commands. Elaboration Shows messages from the elaboration kernel. Libraries Shows output of commands related to library management.

Cross-probing from the Console to Other Tools

Double-click Operation in the Console A double-click on the Console messages opens the HDL Editor with the source code file. The line in the HDL Editor will be highlighted in light gray. A double-click on the Console linting messages opens the HDL Editor with the source code file. The line in the HDL Editor will be highlighted in light gray. A double-click on the Console warnings or errors also opens the source code file in the HDL Editor and places an indicator on the margin near the error mark or near the warning mark. The offending line is highlighted with a pale red or pale blue color.

246

ALINT
Drag and Drop Operation from Other Debug Windows to the Console

GUI Reference

You can drag and drop text selection from the file, opened in the HDL Editor window. You can drag and drop file name from document tabs, File Browser or Design Manager window. You can drag and drop text selection from Rule Description Viewer. You can drag and drop node text from Violation Viewer.

Related Commands
To activate the main Console window, use the following command: console.mainview.activate To display any of the filtered views, use the following commands: console.linting.activate console.compilation.activate console.commands.activate console.elaboration.activate console.libraries.activate Commands for filtering messages in the Console: console.filter.text <text> console.filter.casesensitive -on|-off console.filter.severity [-errors] [-warnings] [-messages] Example Displays messages that consist a phrase "Process: CHECK_HOLD": console.filter.text "Process: CHECK_HOLD" Clears a filter: console.filter.text ""

247

ALINT

GUI Reference

Design Management Windows

Design Manager

Overview

The Design Manager is a tool that allows you to view and manage workspaces, attached designs and their resources. The following operations can be performed by using the Design Manager: Within a workspace: Adding or removing new and existing designs Compiling the workspace Selecting and defining workspace configuration Specifying design dependencies Saving and closing a workspace

Within a design: Creating a logical (virtual) structure of designs attached to a workspace. A structure of a design can contain any files located inside or outside the design working directory. The structure of directories presented in the Design Manager may not reflect a physical directory structure created in the file system. Adding or removing resources from the logical structure of individual designs Including or excluding designs from compilation-time linting Specifying file dependencies Compiling selected design with or without dependent designs Setting an active design Elaborating active design Creating design configurations

On individual design resources: Adding or removing files Including or excluding source files from compilation-time linting Executing scripts and macros

Design Manager Window

The contents of the workspace is displayed in the Design Manager window. You can open this window by clicking on the Activate Design Manager button on the Tools toolbar or the View | Design Management Windows |

248

ALINT
Design Manager menu option.

GUI Reference

Figure 1. The Design Manager window. If workspace or design extension (.rdsn, .rwsp) is associated with ALINT in the operating system shell, it is possible to start GUI by selecting workspace or design file. ALINT automatically loads workspace and all the selected designs in the Design Manager. You can see the list of file types recognized by ALINT in the Preferences Dialog Box | Environment Category | Extensions Category. The Configuration Manager dialog box is a window for creating and managing workspace and design configurations. The Design Manager allows to open the Configuration Manager by the following options: from the context menu of the workspace object; using the Configuration Manager button on the Main toolbar. The drop-down list on the toolbar can be used for switching between the configurations.

See the Workspace Configurations and the Configuration Manager topics for more details. The recently opened workspaces may be observed in the list which you can expand using the Main toolbar of the Design Manager. button on the

Design Manager Context Menu You may see the design context menu on the Figure 2

249

ALINT

GUI Reference

Figure 2. The Design Context Menu. The following options are available from the design context menu Compilation -time Linting: Design(s) Run compilation-time linting for design(s). Compilation -time Linting with Dependencies Run compilation-time linting for design(s) with Dependencies, see the Compilation-time Linting with Dependencies topic for more details. Add Add existing file, new file or new directory to design Compilation with Linting Include all the design(s) files into the compilation-time linting. This option is convenient when there are several designs. It is also possible to include separate files into the compilation-time linting - this option is available from the file context menu. Compilation without Linting Exclude all the design(s) files form the compilation-time linting. This design(s) will be compiled only. This option is convenient when there are several designs. It is also possible to exclude separate files from the compilation-time linting - this option is available from the file context menu. Exclude from Compilation Exclude all the design(s) files from the compilation. This option is convenient when there are several designs.

250

ALINT

GUI Reference

It is also possible to exclude separate files from the compilation - this option is available from the file context menu. Rename Rename a design Remove Remove a design from the workspace Set Design as Active Set active design Dependencies Set up design dependencies, see the Design Dependencies topic for more details. File Dependencies Set up dependencies between design file, see the File Dependencies topic for details. Properties Set up the properties, see the Setting Preferences topic for details.

From the workspace context menu it is also possible to Save Workspace, Close Workspace, Add Existing Design and Add New Design which allows you to view and modify workspace and design structure. From the file context menu it is possible to execute .do a macro files by selecting the Execute option.

The following topics will give you more information about the context menu items: Compilation-time Linting: Workspace(s), Compilation-time Linting: Design(s), and Compilation-time Linting for Selected File(s). See also the Workspace and Design Operations in GUI topic.

Related Commands

This section contains a selection of commands that can be used for controlling the Design Manager window. Opens the Design Manger: design.view.activate Run compilation-time linting for a design: design.compile design.compilewithdependent design.compilewithreferred Example: design.compile blackjack_mixed

251

ALINT

GUI Reference

Prints in the Console window the list of design source files with their dependents: design.dependencies Commands for manipulating directories: design.directory.create design.directory.remove Commands for manipulating files: design.file.add design.file.compile design.file.compilewithdependent design.file.compilewithreferred design.file.create design.file.property design.file.remove Commands for manipulating workspaces: workspace.close workspace.create workspace.open workspace.close workspace.save workspace.path workspace.compile workspace.dump workspace.isopened Commands for manipulating configurations: workspace.configuration.create workspace.configuration.getactive workspace.configuration.remove workspace.configuration.setactive Commands for manipulating dependences: workspace.dependencies workspace.dependencies.add workspace.dependencies.remove Commands for manipulating designs: workspace.design.add workspace.design.create workspace.design.createfromdisk workspace.design.remove workspace.design.setactive Commands for opening recent workspaces, where n is number>0:

252

ALINT
workspace.recent.n Commands for manipulating file trees: workspace.items.exclude workspace.items.include workspace.tree.collapse workspace.tree.expand workspace.tree.pagedown workspace.tree.pageup workspace.tree.rowdown workspace.tree.rowup Opens the Properties window's page. Page name is delivered as command argument. design.properties Example: design.properties linting/general

GUI Reference

Set an individual property for a design. The Properties window and the Preferences dialog box provide the same set of categories and options. The list of the design properties you can find in the .xml files from the \ALINT\config\preferences\ folder. design.property Example: design.property "linting/general/generate_avdb_file_name" "my_avdb.avdb"

253

ALINT

GUI Reference

Configuration Manager

Overview

Configuration Manager is a tool that allows creating and managing configurations of design or workspace. A workspace/design configuration is a set of options for compilation and linting sessions performed in the GUI of ALINT. The configuration can be selected for a design or workspace only when it is loaded. There is a pre-defined alint configuration. When working with ALINT projects, you can choose pre-defined configuration or specify new configurations for a workspace or its individual designs, e.g. specify where the linting results will be saved to, which policy will be used during the linting process, etc. The Configuration Manager allows defining the following types of the configurations: Design Configurations: The configuration of a design is based on the design properties specified individually for each member of the workspace. You must have the design added to the workspace prior to applying the selected configuration. In order to change the design properties right-click on the design name in the Design Manager window and choose the Properties option from the context menu. Workspace Configurations: The configuration of a workspace is a collection (user-defined set) of the design configurations. Changing the existing or creating the new design configuration(s) may result in adding a new configuration to the workspace. Both the design and workspace configurations can be controlled by the Design Manager. In order to modify the design or workspace configuration select the Configuration Manager option from the context menu of the workspace object or from the toolbar of the Design Manager window. Then apply required changes in the Configuration Manager window. Refer to the Configurations topic for more information on how to create or edit configurations.

254

ALINT

GUI Reference

File Browser

Overview

The File Browser is an application that displays the contents of the current working directory and its subdirectories. It allows you to load source files into the HDL Editor, execute macros, rename and delete files, etc. The File Browser can also be used for navigating the file system and changing the current working directory.

File Browser Window

You can open the File Browser window (see Figure 1) by the following: selecting the Activate File Browser button on the Tools toolbar; selecting the View | Design Management Windows | File Browser menu option.

Figure 1. The File Browser window. In ALINT you are able to set a working directory by the following:

255

ALINT
in the File Browser using the Set as Working Directory button on the Main toolbar; by typing the new path into the input filed on the Edit toolbar.

GUI Reference

When working directory is set, ALINT searches for the library files (.lib) in this directory and shows them in the Library Manager. This action is equivalent to the cd command. To check current working directory use the pwd command on the Console. The recently opened folders may be observed in the list which can be expanded with the button on the Edit toolbar. To navigate the file system use the Directory up , Forward or Back buttons on the Main toolbar.

You can filter files in the File Browser using the drop-down list of extensions. You can see the list of file types recognized by ALINT in the Preferences Dialog Box | Environment Category | Extensions Category. If you create a new file in an external editor or copy a file to the current directory, the file will not be visible in the File Browser until you press the Reload File Browser button on the Edit toolbar of the File Browser.

File Browser Context Menu You may see the file browser context menu on the Figure 2

Figure 2. The File Browser context menu. The following options are available from the file browser context menu Set as Working Directory Set current directory as a working one. Create design

256

ALINT

GUI Reference

Creates new design. New design will have the same name as the selected folder and all the source files from the folder will be added to the design. If there is no source files in the selected folder, ALINT creates empty design. New Directory Create new director Open Open a workspace or add a design to a workspace. Open with External Application Open an HDL file directly from the operating system shell (for example from the Windows Explorer) in different applications. If there is a file association for such file type on your computer, the HDL file will be opened immediately in the associated program. Execute Runs the .do macro files. Compare Two AVDB Files Compare the result of 2 linting sessions. Back If the working directory was changed, move to the previous directory. Forward If the working directory was changed, move to the next directory. Delete Delete file(s) from the design. It does not bring the folders created before the design to deleting. Furthermore, if you delete a folder and/or a design file and after that save a workspace, ALINT will automatically recreate the folder and the design file . Rename Rename file(s) or folder(s). It does not bring the folders created before the design to renaming.

See the Workspaces and the Designs topics for more details. To open a workspace or add a design to the current workspace from the File Browser you should do the following: To open a workspace select a workspace file (.rwsp), double-click it or select the Open option from the context menu. The Design Manager window will receive the focus and the workspace will be loaded. To add a design to the current workspace double-click on the selected design file (.rdsn) or select the Open option from the context menu. The design will be added to the current workspace. To add a file to a design drag and drop the file from the File Browser to the Design Manager.

To load a file into the HDL Editor double-click on the file name or select a file and press Enter on the keyboard or choose the Open option from the context menu. The HDL Editor can be then used to edit and compile the loaded file.

257

ALINT
You can also drag and drop the file name from the File Browser to the Console.

GUI Reference

The Check Dynamic Library option from the context menu allows to print information about a shared object (Linux) or a dynamic-link (Windows) library in the Console windows. The Check Dynamic Library option is an equivalent of the checklib command.

Related Commands

This section contains a selection of commands that can be used for controlling the File Browser window. Opens the File Browser: dir.view.activate Refreshes the File Browser: dir.view.refresh Creates a design: dir.design.createfromdisk Renames a design: dir.rename Commands for manipulating directories: dir.directory.back dir.directory.forward dir.directory.set dir.directory.up Sets as working directory: dir.directory.set Opens an existing file in ALINT: dir.file.open Opens an existing file with external application: dir.file.openinexternal Executes a macro file: dir.macro.execute Commands for navigating the file system:

258

ALINT
dir.recent.0 dir.recent.1 Compare violation databases: dir.avdb.compare

GUI Reference

259

ALINT

GUI Reference

Library Manager

Overview

The Library Manager facilitates library management in the ALINT environment. The Library Manager displays the linked list of the libraries visible from the current directory. The Library Manager can be used to: View and manipulate library contents Create and delete libraries Create and delete library mappings and links Run elaboration-time linting for library units.

The Library Manager can be started with the Activate Library Manager button on the toolbar or with the Library Manager command from the View | Design Management Windows menu.

Library Tree

The Library Manager creates the library tree (see Figure 1) by reading library configuration files (library.cfg). The Library Manager looks for the library.cfg file in the current directory. If a library.cfg file does not exist in the current directory then the Library Manager reads the library.cfg file from the vlib/ subdirectory in the ALINT installation directory. A library configuration file can contain two types of entries: Library mappings Links to library.cfg files located elsewhere in the file system tree. A simple library tree is shown in the figure below.

Figure 1. The Library tree

260

ALINT
Library Mappings

GUI Reference

Library mapping maps the logical name of a library to a library index file located on the disk. Library index files always has .lib extension. Logical name of library is listed in the Name column and marked with the icon. The path to the library configuration file is shown in the Path column.

Links A library configuration file (library.cfg) can contain links, or include entries, to any number of other library.cfg files. Linked library.cfg files are shown in the library tree and are marked with the Library Configuration icon , similar to the library.cfg file at the root of the library tree. The contents of linked library configuration files (i.e. mappings and links defined in those files) can be expanded and displayed in the library tree. The expansion works recursively, that is, if a linked library.cfg file contains links to other library.cfg files, the contents of those files can also be expanded and displayed in the tree.

Library Contents

Library contents are displayed below the library mapping information. For each library unit the following information is provided: Unit name listed in the Name column Unit type listed in the Type column Name of the source file containing unit declaration in the Path column All the units types that can be displayed by the Library Manager are listed below. The units are grouped by language.

VHDL Units The following primary units can be shown: Entity Configuration Context Package Entities and packages can be further expanded by clicking the plus sign in front of the names. Architecture is a secondary level unit belonging to an entity. An architecture compiled for a given entity can be marked by either of the two icons: Architecture

261

ALINT
The default elaboration architecture

GUI Reference

The figure below shows an entity with multiple architectures and a configuration. The most recently compiled architecture (rtl) is marked with a different icon than the remaining architectures.

Figure 1. An entity with multiple architectures A configuration defines how component instances are bound to a design entity. The configuration (my_conf) contains the design entity and the architecture compiled for that entity. The following icons are used to show packages contents: Component Constant Function Procedure Signal Variable Generic (generics in packages are allowed starting with VHDL 2008) Type Subtype Note that definitions of types and subtypes are not shown.

Verilog and SystemVerilog Units The following icons are used for Verilog and SystemVerilog objects: Module Top-level Module User-defined primitive Interface Program Class Package

262

ALINT
Creating Library Configuration Files

GUI Reference

Library configuration files (library.cfg) are created automatically by the Library Manager (or by the alib or amap macro commands). library.cfg file is always created in the current working directory. The Library Manager will create the library.cfg file in the current directory when you either create a new library or add a link to an existing library.cfg file using the buttons on the toolbar. library.cfg file will not be created in the current directory if you select library.cfg file in the library tree and create a library or add a link using commands from the pop-up menu. Commands from the pop-up menu modify library.cfg file that you right-clicked on. They do not create library.cfg in the current directory. Newly created library.cfg file always contains a link to the global library.cfg file, that is the library.cfg file located in the vlib/ subdirectory of the ALINT installation directory. This assures that libraries mapped in the vlib/ subdirectory (for example the ieee library) are visible from any directory (unless you manually remove the link to the vlib/ subdirectory).

Creating and Attaching Libraries

The Library Manager allows you to create new libraries and attach existing libraries. When a new library is created, the Library Manager creates the library index file (.lib) and a mapping to this library in a library configuration file (library.cfg). See Library Mapping for details. Except for creating new libraries, the Library Manager also allows you to attach libraries. You can only attach libraries that already exist on disk. To attach a library means to create a mapping for it in a library.cfg file.

Creating a New Library To create a new library, do the following: 1. Click the Create library button on the toolbar. 2. Enter the logical name of the library. The logical name is used to reference the library in source code (e.g. in the VHDL library statement) and in macro commands. 3. Select the Set as working library checkbox to set new library as working and the Make library global checkbox to make it visible from any working directory. 4. Enter the location of the library index file and click OK. Note that the OK button is inactive until you enter a valid name for the index file (i.e. a name terminated with the .lib extension). The Library Manager will create a new library and store a mapping to it in the library.cfg file located in the current directory. If there is no library.cfg file in the current directory, it will be created automatically.

Mapping a Newly Created Library outside the Current Directory The Library Manager (unlike the alib command) allows you to store a mapping for the newly created library in any library.cfg file visible in the library tree (rather than a library.cfg file in the current directory). To create a library and store a mapping for it in a library.cfg file outside the current directory, do the following:

263

ALINT

GUI Reference

1. Select a library.cfg file in the library tree. 2. Right-click on the file and select the Create library command from the pop-up menu. The Create Library dialog box will be displayed. 3. Enter the name of the library and the location of the library index file. The name of the library index file must be terminated with the .lib extension. Relative paths are assumed to be relative to the location of the library.cfg file selected in step 1. 4. Click the OK button. NOTE: The Library Manager currently ignores the read-only status of the library.cfg files.

Attaching an Existing Library Existing libraries can be attached to the library tree with the Attach library button on the toolbar. You can attach both libraries that are not included in the library tree visible from the current directory and libraries that are already mapped. (Each physical library on disk can be mapped under many logical names in the library tree.) To attach a library, do the following: 1. Click the Attach library button on the toolbar. The Attach Library dialog box will be displayed. 2. Enter the logical name of the library and the location of the library index file. The name of the index file must be terminated with the .lib extension. 3. Click OK. The Library Manager will create a new library and store a mapping to it in the library.cfg file located in the current directory. If there is no library.cfg file in the current directory, it will be created automatically.

Mapping a Newly Attached Library outside the Current Directory The Library Manager (unlike the amap command) allows you to store a mapping for the newly attached library in any library.cfg file visible in the library tree (rather than a library.cfg file in the current directory). To attach a library and store a mapping for it in a library.cfg file outside the current directory, do not use the Attach library button on the toolbar but do the following: 1. Select a library.cfg file in the library tree. 2. Right-click on the file and select the Attach command from the pop-up menu. The Attach Library dialog box will be displayed. 3. Enter the name of the library and the location of the library index file and click OK. The mapping to the newly attached library will be stored in the library configuration file selected in step 1.

Linking Library Configuration Files

Instead of mapping individual libraries you can link a library configuration file from another directory. Library mappings stored in the linked library file will become visible in the current directory.

264

ALINT

GUI Reference

This functionality is frequently used to map vendor libraries. Assuming that vendor libraries have been compiled in the /libs/vendor directory, you only need to insert a link to the /libs/vendor to get access to all the libraries compiled in the /libs/vendor. You do not need to add a library mapping individually for each library you need. To link a library configuration file do the following: 1. Click the Link libraries button on the toolbar. The Link Configuration dialog box will be displayed. 2. Enter the name of the directory where the desired library.cfg file is located or click the Browse option and locate the directory in the Choose directory dialog box. You can only choose directories that contain a library.cfg file. 3. Click the OK button. The Library Manager will create a new link and store a mapping to it in the library.cfg file located in the current directory. If there is no library.cfg file in the current directory, it will be created automatically.

Storing Links outside the Current Directory The Library Manager allows you to store newly created links in the library.cfg files outside the current directory. For example, you can create a link to the vendor/ subdirectory and store it in the library.cfg file located in the vlib/ subdirectory of the ALINT installation directory. To create a link and store it in the library.cfg file outside the current directory, do not use the Link libraries button on the toolbar but do the following: 1. In the library tree select the library.cfg file where you want to store the link. 2. Right-click on the file and select the Link Libraries command from the pop-up menu. The Link configuration dialog box will be displayed. 3. Enter the name of the directory where the library.cfg file to be linked to is located or click Browse and locate the directory with the Choose directory dialog box. Click the OK button. The link to the library.cfg file pointed in step 3 will be stored in the library.cfg file selected in step 1.

Removing Links You can remove a link to any library.cfg file from the library tree. When a link is removed, all the libraries mapped in the unlinked library.cfg become invisible (unless they are mapped elsewhere in the library tree.) Likewise, library configuration files linked in the unlinked file become invisible from the current directory (unless they are linked to elsewhere in the library tree). Note that you cannot unlink the library.cfg file shown at the root of the library tree. The root library.cfg file is either the library.cfg file located in the current directory, or, if there is no library.cfg in the current directory, library.cfg from the vlib/ subdirectory in the ALINT installation directory.

Searching for Libraries and Library Units

265

ALINT

GUI Reference

The Find dialog box and Filter field in the Library Manager window allow you to quickly locate any object or collection of objects from the library tree. The Library Manager filters can help you to filtrate the tree by logical name of the library and to find a package, constant, function and procedure in a package or any of the design units. Filters support wildcards. Using Find dialog box you can find any object in the Library Manager window. Search in the Library Manager supports wildcards and regular expressions.

Filtering the Library Tree After entering std* in the Filter field on the Main toolbar, the library tree might look similar to the tree shown in Figure 1.

Figure 1. Objects in the library tree filtered by name. Five libraries are shown after the view is filtered. The name of the std library matches the search string (std*), therefore this library is shown in the library tree. Libraries ieee, ieee_proposed, synopsys and vital95 are shown because they contain units that match the search string. NOTE: The contents of packages that contain units matching the search string can be further expanded so that units whose names begin with the std string (i.e. functions STD_MATCH and STD_ULOGIC_VECTORtoBIT_VECTOR) are visible.

Using the Search Box The search in the Library Manager allows you to quickly locate any object in the library tree. To open the Find dialog box use the Find icon on the Library Manager toolbar. After you enter a search string in the Find What

266

ALINT

GUI Reference

field in the Find dialog box, the Library Manager will search the first object (library configuration files, libraries, and library units). You can search another object using the Find Next or the Find Previous buttons. When the Wildcard radio box is selected, the question mark (?), written in the Find What field, replaces any character. An asterisk (*) replaces any number (i.e. zero or more) of any characters.

Figure 2. Search with wildcards in the Library Manager using the Find dialog box.

Managing Access Rights

The Library Manager allows to toggle library status between read-write (RW) and read-only (RO). If a library is read only, you cannot change its contents. Compilers cannot add new library units and existing units cannot be deleted or recompiled. The access rights for a library set in the Library Manager are stored inside the library index file (.lib). The Library Manager does not modify access rights at the file system level. To change the library status open the context menu and select the read-write Library Visibility Rules for details. or read-only option. See

NOTE: The Library Manager currently ignores access rights set in the file system for library.cfg files. If you try to change library mappings or edit links stored in a read-only library.cfg file, the Library Manager will quietly change the access mode to read-write and perform the requested operation. No warning will be produced.

Emptying and Deleting Libraries

Deleting a Library Unit To delete a unit from the library, highlight the unit, right click and select the Delete menu. The Library Manager will ask for confirmation before the selected unit is deleted. option from the context

You cannot remove the working library. But you are able to detach it using the Detach option from the context menu. Detached library is not visible in the Library Manager, but you can see .lib files in the File Browser window. How to attach existing library see in the Attaching an Existing Library topic.

267

ALINT
You can delete an attached library using the Remove Library button from the context menu.

GUI Reference

Emptying a Library To delete all the units from a library, select it in the Library Manager, right click and select the Empty from the context menu. The Library Manager will ask for confirmation before the selected unit is deleted. option

Refreshing Libraries To refresh the contents of a library created with an earlier version of the compiler use the Refresh library button from the context menu. This is needed if the library format was changed between subsequent releases of ALINT. The following command in the Console allows to refresh library compiled with an older version of the VHDL compiler: acom -refresh <library_name> To refresh a library compiled with an older version of the Verilog compiler use the following command: alog -refresh <library_name>

Library Manager Context Menu

Setting the Current Working Library To change the current working library, select the desired library in the Library Manager, open context menu and choose the Set as Working Library option. The working library name will become bold. After the elaboration-time linting started, working library is displayed in blue. NOTE: When you create a new library using the Create library button on the toolbar, it can be set as default one. For that in the Create Library dialog box check the Set as Working Library checkbox.

Run Elaboration-time linting To run elaboration-time for design units in the Library Manager use the Elaboration-time Linting option from the context menu. Linting will be started for the selected unit. Multiple top-level units can be selected by using the Ctrl key when clicking. Another way to start elaboration-time linting is to double click the library HDL unit.

Compact Library You can reduce the size of the library using the Compact Library option from the context menu. This has effect for libraries with VHDL units which have been recompiled several times. Libraries without recompiled VHDL

268

ALINT
units are unaffected.

GUI Reference

Copy Testbench Generates the testbench source code. The testbench created for VHDL objects includes declaration of the testbench entity, architecture and configuration. Otherwise the testbench for Verilog objects consists of the testbench module declaration. The testbench source code is copied to the clipboard and can be pasted to any source file document. The ALINT determines the unit language (VHDL, Verilog) and generates the appropriate testbench. Alternatively, the library unit can be dragged and dropped from the Library Manger to the HDL Editor. When the object is dropped into the HDL Editor, the list with the following options appears: Insert Testbench, Insert VHDL Declaration, Insert VHDL Instantiation and Insert Verilog Instantiation. NOTE: 1. If a VHDL unit contains generics without values, the Verilog testbench generated by the Copy Testbench command for this unit cannot be compiled before you edit the generated code. You have to provide values for these parameters. 2. If a unit contains complex Verilog types as ports (structures, unions, classes, dynamic arrays, etc.), the generated for this unit testbench cannot be compiled before you have made a few changes. The type declaration should be added manually to the testbench declaration.

Copy VHDL Component Declaration Copy the VHDL component declaration to the clipboard and paste it to any source file document.

Copy VHDL Instantiation Copy the instantiation statement of a VHDL component to the clipboard and paste it to any source file document.

Copy Verilog Instantiation Copy the instantiation statement of a Verilog component to the clipboard and paste it to any source file document.

Make Library Global Make Library Global option from the context menu changes selected library to global. The library now is visible from any working directory. See Global Libraries topic for details.

269

ALINT
Show Source

GUI Reference

Using the pop-up menu Show Source option you can open the source files in the HDL Editor. See the Pop-up Menu Commands topic for details. You can drag and drop library and unit names from the Library Manager window to the HDL Editor or Console windows.

Related Commands

This section contains a selection of commands that can be used for controlling the Library Manager window. Opens the Library Manager: lm.view.activate Commands for manipulating libraries: lm.attachlibrary lm.attachlocallibrary lm.compactlibrary lm.createlibrary lm.createlocallibrary lm.delete lm.detachlibrary lm.emptylibrary lm.library.refresh lm.removelibrary lm.setlibraryreadonly lm.setlibraryreadwrite lm.setworklib lm.makelibglobal Commands for manipulating columns: lm.column.name.hide lm.column.name.show lm.column.name.toggle lm.column.path.hide lm.column.path.show lm.column.path.toggle lm.column.type.hide lm.column.type.show lm.column.type.toggle Commands for manipulating configurations: lm.linkconfiguration lm.linklocalconfiguration lm.unlinkconfiguration Opens the Find dialog box: lm.find

270

ALINT
Searches for libraries and library units: lm.find.next lm.find.prev lm.tree.find lm.tree.findnext Refreshes the contents of a library created with an earlier version of the compiler: lm.refresh Runs elaboartion-time linting: lm.runlinting Commands for manipulating trees: lm.tree.collapse lm.tree.expand lm.tree.dumpmodel lm.tree.dumpview lm.tree.pagedown lm.tree.pageup lm.tree.rowdown lm.tree.rowup lm.tree.select lm.tree.selectall lm.tree.deselectall Opens the source files in the HDL Editor: lm.show.declarationsource

GUI Reference

271

ALINT

GUI Reference

HDL Editor

Overview
The HDL Editor can be used for source code editing. Advanced source code editing features include: Syntax highlighting for VHDL, Verilog, and C/C++ source code. Locating of matching language constructs. Operations on blocks and groups of selected text such as indenting/outdenting, commenting/uncommenting, altering case, selecting entire rows and columns, etc. Dividing the source code into collapsible sections created according to VHDL or Verilog syntax. Easy navigation with bookmarks and the navigation marker. Code autocomplete for VHDL and Verilog languages. Column selection. The HDL Editor can be used for starting compilation. Edited HDL files can be compiled directly from the HDL Editor. The HDL Editor underlines compilation errors with red, wavy underlines. You can change the HDL Editor window appearance using the Tools | HDL Editor | Appearance category in the Preferences dialog box.

Column Selection Apart from the regular text selecting, the HDL Editor allows you to select text by columns. The Toggle Columnar Selection button on the Tools toolbar in the HDL Editor can be used to toggle the Columnar Selection mode. When the Columnar Selection mode is set, put the mouse pointer above the desired text, press the left mouse button and move the mouse to make the column selection. The Alt+C keyboard shortcut is an equivalent of using the Toggle Columnar Selection button on the Tools toolbar. Another way to make a column selection, hold down the Alt (Windows) or Ctrl key (Linux) and select the desired text using the mouse in the same manner as for regular selections. Then, you can copy the selection and paste it in any place of a document.

Printing Documents ALINT allows printing documents opened in the HDL Editor. Select the Print option from the File menu to open Print dialog box and print the document. You can display documents in the Print Preview window and specify print options such as header and footer, fonts, alignment, etc. for a group of files. To open a file in the Print Preview window, choose the Show Print Preview option from the File menu. See Printing and Print Preview topic for details.

272

ALINT

GUI Reference

Syntax Highlighting
The HDL Editor can highlight syntax of the following languages: VHDL Verilog Tcl, Perl Macro C/C++

Enabling Syntax Highlighting Syntax highlighting can be enabled/disabled for the defined language using the Syntax highlight check-box from the HDL Editor settings (see Figure 1 .

Figure 1. VHDL-related options in the Tools | HDL Editor category in the Preferences dialog box.

273

ALINT

GUI Reference

Find Matching
The Find Matching command finds the completing construct for the selected construct. If you place the insertion point over a reserved word that opens some construct, the Find Matching command will move the insertion point to the corresponding keyword. The Find Matching command is available from the context menu displayed after right-clicking on the reserved word. (See Figure 1)

Figure 1. Locating the end architecture statement in the HDL Editor

Automatic Find Matching Automatic Find Matching underlines the selected construct and its completing construct. For example if you place the insertion point on the reserved word component, the reserved word and corresponding keyword end (or end component) will be highlighted. Automatic Find Matching also works with braces, brackets, parenthesis,

274

ALINT
and angled brackets: { }, [ ], ( ), < >. Automatic Find Matching is supported for the following languages: VHDL Verilog Tcl Perl

GUI Reference

Enabling Automatic Find Matching Automatic find matching can be enabled or disabled for a given language by selecting the Automatic find matching option in the HDL Editor preferences.

Working with Sections


The HDL Editor supports collapsible text sections (folds). If a section is collapsed then a range of lines is displayed as a single line. The source code remains unaffected. Text sections can be manipulated with the and widgets. Clicking the minus widget collapses the section assigned to it (only the first line remains visible). Clicking the plus sign expands it. When the section is collapsed its contents can be displayed in the context window by pointing mouse pointer on the ellipsis character, as show below.

Figure 1. Moving the mouse pointer over the ellipsis shows collapsed text.

275

ALINT

GUI Reference

Sections facilitate navigation through the source code and give a better overview of its structure. This is particularly useful when working with long files. To define a text section, select lines that you want to include in the section and click the Create Sections button. Notice that a margin indicator appears and the text background is permanently highlighted. Click the minus sign to collapse the highlighted text. The minus sign will then change into the plus sign. Clicking the plus expands the collapsed section. Text sections can also be generated automatically. To create sections throughout the whole source file, click the Generate Structure button or select Structure | Generate Structure from the HDE menu. To remove all section definitions, click the Remove Sections button or select Structure | Remove Sections from the HDE menu. If you want to remove only selected definitions, highlight the required sections before clicking the Remove Sections button. Create Sections Creates a text section from the selected block of text Remove Sections Removes all sections from the current document or from the selected block of text Generate Structure Automatically creates sections for HDL constructs You can choose which language constructs should be recognized and select the highlight color for them. To modify the default settings, invoke the Preferences dialog window (Tools | Preferences menu) and select the Editors | HDL Editor category. Next, select a language (VHDL or Verilog), for which you would like to customize structure generation and click the Options button in the Structure section. The Options dialog box will be displayed.

Figure 2. Changing the default options for structure generation.

276

ALINT

GUI Reference

In the Options dialog you can check which language constructs should be recognized and/or collapsed automatically and assign a color for them. The Autoformat Text button formats the source code automatically. It analyzes the code, uses the indent from the previous line and increases or reduces it where appropriate.

Navigation Marker and Global Marker


The navigation marker (see Figure 1) shows interesting locations in the source file, such as: errors or warnings reported by the compiler; edited lines; lines with bookmarks. The navigation marker always shows the complete file scope (i.e. contrary to file contents it does not need to be scrolled). This helps in navigating very long documents. For example, you can move between bookmarks or edit locations with a single mouse click even if they are thousands of lines apart. The navigation marker is placed to the right of the scroll bar, as shown in the figure below.

Figure 1. The navigation marker in the HDL Editor. Colors used in the navigation marker are listed in the table below. Table 1: Line Status Error in line Warning in line Debug line Line changed and saved Line changed Line with breakpoint Line with disabled breakpoint Line with bookmark Color

277

ALINT
Two or more items in one line

GUI Reference

Hovering over a mark in the navigation marker displays a yellow tooltip with the line number and line status.

Figure 2. The tooltip for line 40 displays line number and two line statuses. Tooltips for lines that caused compiler errors or warnings can include complete messages generated by the compiler (see Configuring the Markers topic for details). Clicking on the mark places the insertion point at the corresponding location in the source file. (The source file contents are scrolled if necessary.)

Global Marker The global marker is a small square located above the navigation marker. The global marker shows errors and warnings reported by the compiler when the source file was last compiled. After moving a mouse pointer to the global marker a tooltip with a number of errors or/and warnings appears.

Figure 2. The global marker in the HDL Editor. The global marker can be red, blue, or orange depending on whether the source file contains errors, warnings, or both. The global marker can be disabled (see Configuring the Markers below).

Configuring the Markers The General page in the Tools | HDL Editor category of the Preferences dialog box contains settings related to both markers. It allows you to: Set the width of color marks displayed on the navigation marker. Set the minimum distance between marks on the navigation marker. Enable displaying of error and warning messages in tooltips. This option is disabled by default. If enabled, tooltips will include complete compiler messages (same as messages printed to the Console).

278

ALINT
Hide or show the global marker.

GUI Reference

Navigating with Bookmarks


Bookmarks enhance navigation through the source code. To add a bookmark to your source code, place the cursor in the desired location and click the Toggle Bookmark button. A margin indicator will appear. To navigate through bookmarks use the Next Bookmark and Previous Bookmark buttons. If a bookmark is located within a collapsed text section, the HDL Editor will expand that section automatically. To delete a bookmark, place the cursor in the desired location and click again the Toggle Bookmark button. To delete all bookmarks, use the Clear All Bookmarks button. Instead of using toolbar buttons, you can use commands available in the HDE menu. NOTE: Bookmarks are not saved when you exit the HDL Editor. You can set a named bookmark using the Insert Named Bookmark button on the Edit toolbar or the Insert Named Bookmark option from the HDE menu or the Insert | Named Bookmark option from context menu. To step through the named bookmarks select the Go to Named Bookmark option from the HDE menu. This command opens the Find and Replace dialog box. NOTE: Named bookmarks are saved when you exit the HDL Editor. Another way to navigate through files is insert links into source code files. To add a link use the Insert Link button on the toolbar or the Insert | Link option from context menu. The Insert link dialog box opens and you can set a link to file, URL or a file. The Browse Known Locations button allows to choose a named bookmark for the Location in File field.

Figure 1. The Insert link dialog box.

279

ALINT

GUI Reference

Searching for Bookmarks To navigate bookmarks use the Find and Replace dialog box | Bookmarks tab. You can open it using the Find button on the toolbar or the Find option from the HDE menu.

Figure 2. The Find and Replace dialog box.

Find and Replace Dialog Box


To search for a specific text in the HDL Editor type a word in the Find edit box and press the Find Next and Find Previous buttons. Options for searching can be set in the Find and Replace dialog box | Find tab. The Find and Replace dialog box allows to find and replace a word or phrase, to go to common or named bookmark, or to move a point to a new line in the current document. You can open the dialog box using the Find button on the toolbar or the Find option from the HDE menu. The following options are available.

Find Tab Find What Enter text that you want to search for. ALINT supports regular expressions. You can press right-arrow button for regular expression templates. Match whole word The search engine finds occurrences that are whole words and not part of a larger word. Match case The search engine finds only text that has the same pattern of upper and lower case as the text you specified in the Find What edit box.

280

ALINT
Regular expression

GUI Reference

Allows using regular expressions in the Find What combo box. Regular expression allows more sophisticated and powerful search. Wrap at origin/end When the end of the file is reached, resumes search from the start. Range Entire document Allows searching in the whole current document Selection only Allows searching only in selection Find Next Press this button to find next matching text with current options. Find Previous Press this button to find previous matching text with current options. Mark All Press this button to find all the occurrences of the specified text in the current document and set markers to them.

Replace Tab Find What Enter text that you want to search for. ALINT supports regular expression. You can press right-arrow button for regular expression templates. Replace with Enter text that you want to replace the found text with. ALINT supports regular expression. You can press right-arrow button for regular expression templates. Match whole word The search engine finds occurrences that are whole words and not part of a larger word. Match case The search engine finds only text that has the same pattern of upper and lower case as the text you specified in the Find What edit box. Regular expression Allows using regular expressions in the Find What combo box. Regular expression allows more sophisticated and powerful search. Wrap at origin/end When the end of file is reached, resumes search from the start.

281

ALINT
Range Entire document Allows searching for the whole current document Selection only Allows searching only for current selection. Find Next Press this button to find next matching text with current options. Find Previous Press this button to find previous matching text with current options. Replace

GUI Reference

Replace found text with specified text. If the text is not found yet, this is same as Find command. Replace All Perform find and replace for the current document. Mark All Press this button to find all the occurrences of the specified text in the current document and set markers to them.

Bookmarks Tab To navigate through bookmarks use the Bookmarks Document name Displays the name of the document with bookmark. Line number Displays the line number where the bookmark is inserted. Bookmark For named bookmarks displays the bookmark name. For common bookmarks displays the code from the line where the bookmark is toggled. tab.

Go to Line Tab The Go to Line button can be used if you want to move a pointer to another line.

Enter line Sets line number.

282

ALINT
Enter column Sets column number

GUI Reference

Find Incremental Another possibility to search for a specific text in the HDL Editor is using find incremental functionality. Activate find incremental function by pressing Ctrl+I buttons on keyboard and start typing a word. If the word you typed exists in the document it will be highlighted letter by letter. To find next occurrence of specified text press F3 button on keyboard. You can redefine shortcuts using Customize dialog box. See Shortcuts topic for details.

AutoComplete
The HDL Editor allows using code autocomplete for all the supported by ALINT languages (VHDL, Verilog, Perl, C/C++, etc.). In macro files autocomplete can also predict the following items: All commands including ALINT commands, native Tcl commands, and commands defined by the user with the Tcl proc command. Command arguments for ALINT commands. File names in those ALINT commands that accept file name arguments. Hierarchical paths in those ALINT commands that accept names of design objects or design regions as arguments. Names of library units in those ALINT commands that use design unit names as arguments, e.g. adel, adir, avdbclear or avdbcompare.

Figure 1. The HDL Editor code autocomplete.

283

ALINT

GUI Reference

The file names and the hierarchical names in macro files are completed by segments, i.e. only one level of the file system hierarchy or the design hierarchy is inserted at a time. Prompts for the file names are relative; absolute file names can also be completed. Prompts for the absolute file names become available after entering the file system delimiter. Therefore, on Linux, it is sufficient to type / (and press the Ctrl+Space key to show the autocomplete prompts). On Windows, you need to enter the volume name followed by the delimiter, e.g. C:/ (and press the Ctrl+Space key). Prompts for the hierarchical names are absolute by default, i.e. they start at the name of the data set (e.g. flash_drive:/). Completion prompts become available after you enter the first letter of the relative hierarchical name (and press the Ctrl+Space key).

Figure 2. The HDL Editor folder names autocomplete. Autocomplete can be enabled or disabled for selected languages. See the Show Autocomplete List while Typing checkbox in the Tools | HDL Editor | File Type Pages category in the Preferences dialog box. When you are typing a word in the HDL Editor, ALINT displays a keyword autocomplete prompt. The following keyboard shortcuts can be used when HDL Editor displays. Up/Down Right Enter Step through the keyword list. Close the autocomplete prompt and insert a space. Accept the HDL Editor prompt. The cursor will be placed at the end of the keyword. Delete the HDL Editor prompt i.e. the highlighted part of the keyword displayed by the HDL Editor (needed to enter a new line without autocompleting the word). Close the autocomplete prompt. The HDL Editor do not inserts any character.

Shift+Enter Same as Enter. Delete Esc

Ctrl+Space Shows the autocomplete prompt.

Content AutoComplete ALINT supports case sensitive content assist that allow to autocomplete not only language keywords but also identifiers. The content autocomplete can be invoked by pressing Alt+/. It searches backwards for words starting with already entered characters and complete words immediately. If the proposing word does not match you, press Alt+/ once again to continue searching. First, autocomplete starts to search backwards from the current position to the beginning of the file for words starting with already entered characters. If there is no word that match to the typed collocation, autocomplete starts to search forward from current position to the end of the file and complete words immediately. If the offered word does not match you, press Alt+/ once again to continue searching. Next proposed word will be placed. When all suitable words in the file are founded, entered collocation is displayed without autocompletion.

284

ALINT

GUI Reference

Included Files Opening


Verilog and C/C++ header files included with the Verilog `include directive or the C/C++ #include directive can be opened in HDL Editor by right-clicking on the line containing the directive and selecting the Open <filename> option. For example, if you right-click on a line containing directive `include "filename.h", then the command Open filename.h will be available as the first item in the pop-up menu.

Verilog Include File The HDE Editor will look for files included with the `include "filename" directive in: The current directory. The directory where the compiled source file is located. Directories set in the Include directories option in the Languages | Verilog | Entries category of the project Properties dialog box or the global Preferences dialog box. The Include directories option is translated to the -incdir <directory> argument for the alog command. An include directive followed by a filename in angled brackets `include <filename> is a system includes or a library include. System include is used for sharing files used in different projects. Library include refers to libraries that contain units installed at one location and used in different projects. The HDL Editor searches for files listed in system include directives in: The current directory. The directory where the compiled source file is located. Directories set in the System Include directories option in the Languages | Verilog | Entries category of the project Properties dialog box or the global Preferences dialog box. The System Include directories option is translated to the -sysincdir <directory> argument for the alog command.

C/C++ Include File The HDE Editor will look for files included with the C/C++ #include "filename" or #include <filename> directive in: The directory where the compiled source file is located. Directories set in the Include directories option in the Languages | C/C++ | Entries category of the project Properties dialog box or the Preferences dialog box.

VHDL Package Opening


Items located in the packages and included in the VHDL file with the use directive can be displayed in the HDL Editor by right-clicking on the line containing the directive and selecting the Open <package> option. After selecting the Open <package> option, the package declaration will be opened in the HDL Editor.

285

ALINT

GUI Reference

For example, if you right-click on a line containing directive use IEEE.std_logic_1164.all;, the file std_logic_1164.vhdl will be opened in the HDL Editor. The cursor will point to the line with the package identifier: package std_logic_1164. When the directive use points to a function, the package declaration will be opened in the HDL Editor and the cursor will point to the package header with the function declaration. For example, if you right-click on a line containing directive use std.env.finish;, the file env.vhdl will be opened in the HDL Editor and the cursor will point to the line with function declaration: procedure FINISH (STATUS: INTEGER); .

Integration with the Compiler


The HDL Editor can be used for compilation-time linting. To run compilation-time linting for your code, click the Compilation-time Linting button on the toolbar or press F11 button. Also you can run compilation-time linting for a file using right-click context menu Compilation-time Linting command. These option is an equivalent of using the hde.compile command from the Console window. ALINT automatically saves the source file and chooses the appropriate compiler depending on the language of the source file (VHDL, Verilog and C/C++). If a file is opened in the HDL Editor but is not included in the design, before compilation-time linting start ALINT will offer you to add the file to current design. If you refuse, the file will not be compiled. See VHDL Compilation and Verilog Compilation for details on compiling source code.

Compilation Errors and Warnings Syntax errors are marked with red, wavy underlines, while warning messages are marked with blue, wavy underlines. To display a tooltip with an explanation, move the mouse pointer over an underlined line.

Figure 1. Displaying error tooltip in HDL Editor. You can also check compilation error/warning messages in the ALINT Console. Double-clicking a message in the Console window opens the HDL Editor (if it has not been opened yet) and places an error or warning mark on the margin in the line containing an error or a warning.

286

ALINT

GUI Reference

Figure 2. Displaying warning underlining in HDL Editor. The offending line also will be highlighted with a pale red or pale blue color. To enable or disable displaying error or warning details on the tooltips use the General | Enable error/warning details on tooltip option in the Tools | HDL Editor category of the Preferences dialog box.

Related Commands
This section contains a selection of commands that can be used for controlling the HDL Editor window.

Commands for Manipulating Text Blocks Autoformats document text: hde.autoformat Comments selected text: hde.block.comment Indents selected text: hde.block.indent Converts all keywords to lowercase: hde.block.keywords.lowercase Converts all keywords to uppercase: hde.block.keywords.uppercase Converts selected text to lowercase: hde.block.lowercase Converts selected text to opposite case: hde.block.oppositecase Uncomments selected text: hde.block.uncomment

287

ALINT
Unindents selected text: hde.block.unindent Converts selected text to uppercase: hde.block.uppercase Compiles currently edited file: hde.compile Executes currently edited script: hde.execute.script Executes selection of the currently edited script: hde.execute.selection

GUI Reference

Command for Navigating Finds specified text in string: hde.find Finds next occurrence of specified text: hde.find.next Finds previous occurrence of specified text: hde.find.prev Goes to matching: hde.find.matching Goes to the specified line in text: hde.goto.line Goes to the named bookmark line in text: hde.goto.named.bookmark

Commands for Manipulating Links and Bookmarks Inserts link: hde.insert.link

288

ALINT
Inserts named bookmark: hde.insert.named.bookmark Inserts named bookmark: hde.insert.named.bookmark.menuonly

GUI Reference

Commands for Editing Document Structure Removes current line: hde.remove.current.line Finds and replaces specified text: hde.replace Moves current line down: hde.replace.line.down Moves current line up: hde.replace.line.up Selects text between matching tokens: hde.select.matching Generates structure in current editor: hde.structure.generate Creates section in current editor: hde.structure.section.create Collapses sections in current editor: hde.structure.sections.collapse Expands sections in current editor: hde.structure.sections.expand Removes sections in current editor: hde.structure.sections.remove Shows or hides whitespace characters: hde.white.spaces

289

ALINT

GUI Reference

Commands for Manipulating Files Opens a file in the HDL Editor. Equivalent of the Open <filename> option available on the context menu after right-clicking on a line containing directive `include "<filename>". See Included Files Opening topic for details. hde.include.open

Commands for Manipulating Cursors Prints the cursor position in the document: hde.cursor.position Moves cursor in specified position in the document: hde.cursor.position.set [-line <line_number>] [-column <column_number>]

290

ALINT

GUI Reference

Find Results Window

Overview
The Find Results window displays the results of searching for a specific text (a word or phrase) multiple files in the active design, workspace or in the specified folders. The Find Results window also allows to search through file names only.

The Find Results dialog box can be invoked by selecting the Find Results Show Find Results button on the Find toolbar.

option from the View menu or

To start searching select the Find in Files option from the menu Edit or from the Find toolbar and the Find in Files dialog box will appear. You have to specify the search conditions and press the Find All button. The Find Results window with search results will be opened. To start replacement select the Replace in Files option from the Edit menu or from the Find toolbar and the Replace in Files dialog box will appear. The Find Results window with results will be opened and you will be asked to confirm replacement in the Replace Text Matches dialog box. The Find Results window consists three columns: Results When you search for a text in the current document or in all opened documents, the results are displayed in the Find Results window as a tree, where the Result column shows the path to a file for the root element. For enclosed elements in the tree the Result column displays the text from the file with matched word or phrase. The found word or phrase is highlighted. When you search for a text in a folder, active design or workspace, the results are displayed in the Find Results window in a tree-like view comprising directories, subdirectories, files, and matching lines within the files. Match Count Displays the number of matches. Line Displays a line number where the searched word or phrase was met.

291

ALINT

GUI Reference

Figure.1 Searching for word BIN in the current document.

Figure.2 Searching for word BIN in the active design. Each element in the tree is preceded by the checkbox that allows to add this element to the selection. All selected element can be replaced automatically by pressing the Replace Toggled Items option from the Main toolbar or from the context menu. After you specify the replace conditions in the Replace in Files dialog box, the replacement will be done only in the selected files. The Check All and Uncheck All options from the context menu selects or clears all checkboxes in front of a matching line, file, or subdirectory. The Find Again option allows to search for previously used expression without opening the Find in files dialog box. The result can be saved to a file by using the Save to File option and deleted by using the Clear Find Results option from the Main toolbar or from the context menu. The Go to Previous Match option and Go to Next Match option are used to step through the matching lines within the files. To stop searching or replacing use the Cancel Current Operation option button on the toolbar. Double click on the file or on the matching line within the file in the Result column opens the file in the appropriate window in the ALINT. For example, text file (.txt) will be opened in the HDL Editor, violation database file (.avdb) in the Violation Viewer, etc. This action is the equivalent of using the Show Source option from the context menu. If a workspace is loaded, the Show in Workspace option from the context menu allows to find a selected file in the workspace tree.

292

ALINT

GUI Reference

Find in Files or Replace in Files dialog boxes The Find in Files and the Replace in Files dialog boxes allow to specify options for searching and replacing words or phrases in the multiple files in the specified design, workspace or folders. Find what Enter text that you want to search for. ALINT supports regular expression. You can press right-arrow button for regular expression templates. If the Find what editbox is empty searching will be performed through file names only. Replace with Enter text that you want to replace the found text with. ALINT supports regular expression. You can press right-arrow button for regular expression templates. Filter Specifies the format of the files. Look in Sets the search scope. Current Directory Allows searching in the whole current directory. The Browse button near the field allows to select the folder. Current Document Allows searching in the whole current document. All Opened Documents Allows searching in all documents opened in the HDL Editor. Working Library Allows to limit searching scope to files that were compiled into working library. Active design Allows searching in the whole current designs. Entire workspace Allows searching in the whole current workspace. Match whole word The search engine finds occurrences that are whole words and not part of a larger word.

293

ALINT
Match case

GUI Reference

The search engine finds only text that has the same pattern of upper and lower case as the text you specified in the Find What edit box. Regular expression Allows the use of regular expressions in the Find What combo box. Regular expression allows more sophisticated and powerful search. Include subfolders Allows to add all subfolders to the search scope. Option is active only when the Look in | Current Directory option is selected. Find All Press this button to find all matching text with current options.

294

ALINT

GUI Reference

Printing and Print Preview

Overview
ALINT allows printing documents opened in the HDL Editor. The Print Preview window shows the preview of the documents and allows specifying print options for all resource files supported by ALINT. The Print Preview window is divided into the following window panes: Documents List Lists the names of the documents opened in the Print Preview window. Preview Shows documents divided into pages. NOTE: Before printing on Linux you have to install CUPS ( Common Unix Printing System). To open a document in the Print Preview window, first open this document in the HDL Editor and choose the Print Preview option from the File menu. The document name is visible in the Documents List pane, and the content of the document is shown in the Preview pane of the Print Preview window. You can open more than one file in the Print Preview window. To do this, switch to the HDL Editor, open a file and select the Print Preview option from the File menu once again. All documents opened in the Print Preview window are shown in the Preview pane one by one. The way Print Preview window displays pages depends on the options set in the Printing Options dialog box. You can open empty Print Preview window using the printpreview.activate command from the Console window.

Toolbar buttons The Maximum pages in one set list box allows to select how many pages will be displayed on the Preview pane. To switch between groups of pages visible on the Preview pane, use Show Previous or Show Next buttons. Next to the Maximum pages in one set list box you can see page range, total number of pages. Numbers of pages are enclosed in parenthesis (e.g. (1-8)). The total number of pages is shown after the slash (e.g. (1 3)/54). The current page number is shown in the spinner box (box with up/down arrows) next to the Show Next button. Show Single Page Displays pages in a continuous vertical column that is one page wide. After clicking the Show Single Page button on the toolbar, fills the Preview pane with a page and allows to scroll through pages continuously.

295

ALINT
Show Facing Pages Displays facing pages side by side in a continuous vertical column. Show All Pages Adjusts the zoom factor so that all pages from the current set are visible. Portrait Sets the Portrait (vertical) paper orientation. Landscape Sets the Landscape (horizontal) paper orientation. Zoom In Zooms in the current view reducing the displayed time range by 10%. Zoom Out Zooms out the current view increasing the displayed time range by 10%. Zoom to Fit in View

GUI Reference

Adjusts the zoom factor so that the whole page (if Show Single Page is selected) or pages (if Show Facing Pages or Show All Pages is selected) are visible on the Preview pane. Zoom to Fit to Width Adjusts the zoom factor so that page (if Show Single Page is selected) or pages (if Show Facing Pages or Show All Pages is selected) occupy efficiently the view of the Preview pane. Current zoom factor Displays the current zoom factor. A new value can be selected from the drop-down list or entered from the keyboard. The allowable zoom range is from 1% to 800%. Toggle Documents View Toggles the Documents List pane. Refresh Refreshes the current document content. For example, you can refresh content of the file that was changed in the HDE Editor. Show Page Setup Opens the Page Setup dialog box. The Page Setup dialog box allows to set additional print options such as paper size, page orientation, margins, etc. that is common for all document types. Options Opens the Printing Options dialog box. Print Opens the Print dialog box and prints the file. The Print dialog box allows to set the additional print options such as printer, page range, number of copies, etc. and print the document.

Printing Options Dialog Box


This dialog box is used to specify tool-specific options and page parameters, such as header and footer, fonts, alignment, etc. To invoke the Printing Options dialog box, select the Options command from the context menu of the Documents List pane or click the Printing Options button on the toolbar. The Printing Options dialog box may differ depending on the type of the active document.

296

ALINT
General Options

GUI Reference

Header/Footer Tab Header/Footer Sets a string that will be displayed in the page header/footer. The string may contain special codes that are expanded to the document name, time, time range, page numbers, etc. Each special code starts with a dollar ($) symbol. String ${page-number}/${pages-count} will be expanded to: page number (${page-number}) followed by the total number of pages (${pages-count}). The easiest way to enter a special code is by clicking the button next to the Header or the Footer field. You can also enter codes manually. Predefined values: ${document-full-name} Prints full path to a file opened in the Print Preview window. ${document-name} Prints document name. ${page-number} Prints page number. ${pages-count} Prints total number of pages. Font Sets the font style, font size and font effects of the string displayed in the Header/Footer. Alignment Aligns or centers the Header or the Footer field. Predefined values: Left, Center, Right.

Colors Tab Colored Prints the documents using a full color scale or shades of gray, depending on the printer. Black and white Prints the document using black and white only. The page background is white, text is black.

297

ALINT
Tool-Specific Options

GUI Reference

HDE Editor Options Print Line Numbers Prints the line numbers.

Buttons Default Reverts default settings. Set as Default Save settings as default for files opened from the specific tool. Apply Applies changes to a current file. Apply to All Applies changes to all files opened from the specific tool.

298

ALINT

GUI Reference

HTML Viewer

Overview
The HTML Viewer is a built-in application dedicated to viewing web pages, displaying external HTML documents as well as the documents attached to your design and saved in the HTML format. The HTML Viewer window is presented in Figure 1.

Figure 1. The HTML Viewer window. The HTML Viewer also allows viewing HTML-based on-line documentation delivered with the installation of ALINT. However, this version of ALINT uses the standalone external browsers to display the contents of the help system. Refer to the Supported Browsers section of the Viewing Documentation topic for more information about the applications that can be used to display the on-line documentation in this version of ALINT.

299

ALINT

GUI Reference

Linting Windows

Overview
The Linting windows and related GUI components to provide convenient means for ALINT engine configuration, launching checks and results browsing: Quick Launch Panel To provide quick access to main actions Flow Manager To define design linting order To control linting process execution Rule Plug-in Viewer To check which rule plug-ins are loaded and ready to use To browse through available rule checker functions Rule Description Viewer To read rule short description To open rule help HTML page Configuration Viewer To browse built-in and custom rulesets and policies Ruleset Editor To define custom rulesets Policy Editor To define custom policies Rule Parameters Editor To configure rule checker parameters Violation Viewer To load and browse AVDB file with linting results To display linting results summary To group violations by set criteria To filter violations by set criteria To cross-probe to violation source point To export all the violations to text, CSV or HTML report To export filtered view to text, CSV, HTML report or AVDB file

300

ALINT
To assign different statuses to violations To delete violations from AVDB To generate policy based on the AVDB file To enabling/disabling rules in active policy To generate design quality report Exclusions Editor To configure exclusions files

GUI Reference

301

ALINT

GUI Reference

Quick Launch Panel

Overview

Quick Launch Panel wizard enables quick access to basic functions of the product and helps to manage linting process for first time users. It is a separate window (See Figure 1) that appears on the right side of the framework on the first launch or it is available from View | Linting Windows | Quick Launch Panel menu.

302

ALINT

GUI Reference

Figure 1. Quick Launch Panel window

Available Actions

Quick Launch Panel is designed to assist you with following basic steps:

303

ALINT
Design Setup Linting Advanced

GUI Reference

Design Setup It is possible to create new or open existing design. Use appropriate option to create new design and add the files you want to check. If you prefer to run design rules checking using script files, refer to the Change Source Directory option. Design Setup step contains following actions: Create New Design Allows the user to create new design and add the files you want to check. Open Existing Design Allows the user to open an already existing design and add the files you want to check. Change Source Directory If a design checking script is already prepared, its location on the hard drive can be specified using the option. Open Sample Design Allows the user to open the following sample designs: blackjack_mixed blackjack_vhdl blackjack_vlog

Linting Linting step contains following actions: Set Linting Options This option is used to specify the variety of settings including what rules should be checked, what parts of the design should be skipped, and in what format the results should be stored.

304

ALINT
Run Linting

GUI Reference

Linting process is divided into two phases: compilation-time phase and elaboration-time phase. It may be easily started by clicking the Compilation-time button - the compilation-time linting will be performed, or if the design has already been compiled click the Elaboration-time button and the elaboration-time linting will be started: Compilation-time. Run the first step to check the design for basic rules that do not require knowledge about the design hierarchy. Compilation-time linting is executed for active design but not for workspace by default. This can be controlled by the appropriate setting in Preferences. Advanced data sets are collected during the compilation-time linting session and available once it is completed. Elaboration-time. The elaboration-time linting session is run to check complicated rules that require parameter values and knowledge about the design hierarchy. View Results Allows opening the resulting violations database to view the results (by default, the results of linting session are saved to the .avdb file.). The option is grayed out unless at least the compilation-time linting session is completed.

Advanced Advanced section contains additional options that allow creating custom rules, rulesets and policies. Create New Rule Allows the user to create new rule for the existing design by launching Create New Rule Wizard. Create New Ruleset Allows the user to create new Ruleset for the existing design by opening new .alintruleset file and add available rulesets (See Managing Rulesets). Create New Policy Allows the user to create new policy for the existing design by opening new .alintpolicy file and add available policies (See Managing Policies). Create New Flow Allows the user to create new linting flow by launching Create New Flow Wizard.

305

ALINT

GUI Reference

Flow Manager

Overview

The Flow Manager implements Phase-Based Linting (PBL) methodology where design is refined by following a step-by-step set-up process. The major advantage from using PBL is minimized number of design refinement iterations and clear focus on certain type of design issues at every stage. The methodology allows for incremental process of design analysis and refinement and eliminates the problem of design issues interdependencies. If the issues are resolved in the right order then the total number of rule violations to deal with becomes significantly lower. The linting flow is a process a set of hierarchically organized phases that must be executed and completed sequentially. Every phase addresses certain set of design issues and also may have the pass criteria (quality requirements that should be satisfied until the next stage becomes available). There are two types of phases in every linting flow regular and optional. A linting flow cannot be completed until quality requirements (regular) are satisfied; optional stages are not required for a flow completion. The information about a linting flow is stored in a separate .alintflow file and directory with .alintpolicy files for each phase. Flow can be attached to any design and run using the Flow Manager. Flows are used to organize, prioritize, and control linting process. Predefined design rule checking flow is delivered with each rule plug-in, and creation of custom ones is possible as well.

Design Linting Flow

In order to work with linting flow it should be attached to the design. Flow Manager operates with the flow attached to the active design. When active design changes, Flow Manager window updates. Therefore Flow Manager can run only one flow simultaneously.

Attaching Flow to Design Existing flow (.alintflow file) can be attached to the design using the design Properties. Select Linting | General page and specify file for Flow file option. New flow can be attached to the active design within Create New Flow Wizard (File | New | Flow menu item). Linting flow opened in the Flow Editor can be attached to the active design with Attach flow to design button.

Running Flow Flow is divided into the set of phases and group nodes. Group nodes can contain phases and can be nested. Dedicated window Flow Editor is used for organizing flow hierarchy.

306

ALINT

GUI Reference

Figure 1. Flow Manager Window Run button executes the entire flow phase by phase. Before the flow execution phase statuses are reset. Individual phases or group nodes can be run by double clicking the phase/group node icon or choosing Run pop-up menu item. Previous phases that were not completed will be automatically executed first to prevent the regressions. Running a group node is equivalent to running all its child phases sequentially. The following options of global preferences configure Flow Manager behaviour: A non-optional phase is locked unless all previous are completed If it is checked (by default) then phases are executed in the strict order, i.e. next phase can be run only when previous one is finished successfully. Running any phase causes all previous non-completed ones to be automatically run. If the option is unchecked phases can be run in any order.

307

ALINT
Execute optional phases automatically

GUI Reference

If the option is unchecked (by default), only regular phases are executed automatically when entire flow is run. Optional phases should be run manually. If the option is checked, all the flow phases are executed automatically (including optional). Automatically open the resulting violation database if a phase was not completed If it is checked (by default) then the results of current phase are automatically opened when any pass criterion is not satisfied. If it is unchecked the resulting violation database should be opened manually. Flow is considered to be completed when all its regular phases succeed.

Figure 2. Flow Manager General Preferences Choose Properties item from the phase pop-up menu to see the properties specified for this phase. Phase parameters are configurable within the Flow Editor. Use Open in editor button to edit the current flow.

Predefined Flows Predefined flows are delivered together with every plug-in. The following flows are available: Flow Purpose Fixing violations in the most effective order Flow Name STARC_VHDL - Comprehensive STARC_VHDL - Essentials

308

ALINT
STARC_VLOG - Comprehensive STARC_VLOG - Essentials ALDEC - Chapters ALDEC_VHDL - Chapters ALDEC_VLOG - Chapters Focusing on the design areas DO254_VHDL - Chapters DO254_VLOG - Chapters RMM - Chapters

GUI Reference

Flow Phases

There are regular and optional phases. Flow is considered to be completed when all its regular phases are completed. Optional phases represent additional checks that may be useful but are not critical. Each phase has two major parameters: Set of design rules to check The set is defined by a policy setting. Either built-in or custom policies can be used. Pass criteria The conditions that must be satisfied in order to consider a phase as completed and go to a next one.

Pass Criteria There are two types of pass criteria: Design quality metric It is an integral number which is calculated based on the ratio of violated and non-violated rule weights. The criterion is satisfied when the phase quality level is greater or equal to a specified one. See the Design Quality Report section for details about the quality metrics. Critical rules This is the set of rules that must not be violated in any case during the phase execution. The criterion is not satisfied if at least one of the rules is violated. Depending on the phase execution status there are the following criteria states:

309

ALINT
Phase is completed, pass criterion is satisfied. Phase is completed, pass criterion is not satisfied.

GUI Reference

Phase was not executed. Phase has been executed, but pass criterion state is unknown (phase failed due to an error etc.). Phase is considered as passed once specified criteria are satisfied.

Execution States A phase will have one of the states after execution attempt (a corresponding icon highlights the current state): Phase is completed successfully (pass criteria are satisfied). Phase is completed, but pass criteria are not satisfied. Optional phase is completed, but pass criteria are not satisfied. Phase execution is failed due to an error (compilation error, elaboration error etc.). The execution of the phase node is equal to execution of all its child phases. Depending on the phase execution status there are the following group node execution states: At least one of the child phases execution is failed due to an error (compilation error, elaboration error etc.) At least one of the regular child phases is completed, but its pass criteria are not satisfied All regular child phases are completed successfully (pass criteria are satisfied) After the phase execution its resulting .avdb file and quality report are available from pop-up menu (View Phase Results and Open Quality Report items correspondingly). When an error occurred during phase execution, data stored in resulting .avdb file is not valid. If quality level pass criterion was not specified for the phase, quality report is not available after the phase execution.

New Flow Wizard

New flow can be created via dedicated wizard using File | New | Flow menu item or clicking Create New Flow node of Quick Launch Panel window. Once created the new flow is opened in the editor and can be attached to the active design.

310

ALINT

GUI Reference

Figure 1. Create New Flow Wizard Perform the following steps to generate a quality report: Specify a flow name and location. By default the location is set to working directory. Choose what flow type should be created: Empty Flow Flow without phases will be created. New flow can be customized depending on the specific project needs with Flow Editor. Based on Predefined Template Predefined flow template will be used for new flow. It allows you to start the process of design analysis and refinement without spending time for customization. Based on Classification New flow will be based on the selected rule classification. Next wizard page becomes available after the classification is chosen.

311

ALINT
Select whether to attach a new flow to the current design. Select whether to open the flow in the Flow Editor once it is created.

GUI Reference

When flow is created based on the classification, a hierarchical flow structure matching the selected rule classification is automatically build. It is possible to select parts of the classification hierarchy that should be imported to the new flow. The policies associated with the phases in the new flow are filled with the corresponding rules from classification chapters.

Figure 2. Select phases page After Finish button is pressed flow becomes ready for action and flow content is loaded into the Flow Manager.

Related Commands

Flow can be run with the following command: alint.fm.flow.run

312

ALINT
The following phase commands are available: alint.fm.flow.phase.run alint.fm.flow.phase.setactive <phase_name> alint.fm.flow.phase.summary The following commands provide a convenient way for the flow results managing: alint.fm.gui.flow.phase.openavdb alint.fm.gui.flow.phase.openqualityreport

GUI Reference

313

ALINT

GUI Reference

Flow Editor

Overview

Flow documents (.alintflow files ) can be created and easily maintained in GUI within a dedicated Flow Editor window. The following operations are provided by the Flow Editor: Creating and editing .alintflow files. Organizing the phase structure and setting the execution order. Defining the pass criteria. Customizing phase preferences.

Flow phases are associated with their own linting policies (.alintpolicy files). An embedded Policy Editor may be used to create and modify phase policies without leaving the Flow Manager window. There is no need to prepare phase policies manually in advance, these policies are created and attached automatically. Also no effort is necessary to make these policies visible for the linting engine, as path settings are configured implicitly. Execution of the flow attached to the current design is controlled via Flow Manager. Flow Editor is invoked when creating new flow or double clicking .alintflow file within File Browser or Design Manager. Flow loaded into the Flow Manager can be opened with Open in the editor button. An empty flow can be created by selecting File | New | Flow File menu item. Another way to create linting flow is dedicated New Flow Wizard that allows generating flow based on one of the predefined templates or based on available classification. New Flow Wizard is invoked form File | New | Flow menu item.

Flow Editor Window Flow Editor window is divided into two parts: main and detailed. Main part contains flow tree and provide functionality for managing flow structure (see Flow Content section for details). Detailed part content of Flow Editor varies depending on an element selected within main part (see Phase Configuration section for details): Selected Tree Node Flow Summary flow (root node) contains statistical information about the flow (mandatory and optional phases, used rules); Group Node Summary group node contains statistical information about the group node (mandatory and optional phases, used rules); Phase phase contains pass criteria of the selected phase: quality level and critical rules; Detailed Part Content

314

ALINT
Policy policy

GUI Reference

provides embedded Policy Editor for the phase policy creating and configuring; Preferences preferences contains preferences of the selected phase; preference values can be adjusted. Statistical information for a flow and group nodes is read-only. Editing controls are available for phase, policy and preferences nodes.

Figure 1. Flow Editor window

Flow Content

Linting flow is a process a set of phases that must be executed and completed sequentially. Every phase addresses certain set of design issues and has two major parameters: policy and pass criteria (the conditions that must be satisfied in order to consider a phase as completed and go to a next one). And there are two types of phases in linting flow regular and optional. A linting flow cannot be completed until quality requirements (regular) are satisfied; optional stages are not required for a flow completion. Phases can be organized into hierarchical tree via group nodes. Group node is a set of separate phases and/or another group nodes. Main part of the Flow Editor window consists of flow tree and pass criteria value specified in Quality and Critical Rules columns for corresponding phases.

315

ALINT

GUI Reference

Figure 1. Flow Editor main part

Flow Tree Structure Flow tree with the editor window consists of the following items: Flow Node Root node represent the flow itself. Group Node Group nodes are used for organizing the hierarchy. Such nodes can be nested and can contain phase nodes. Preferences are not available for group nodes. Phase Phase nodes represents flow phases and cannot contain any other phases nested. The only nodes they contain are their configuration nodes: Policy Allows editing policy associated with the phase. Preferences Allows managing phase specific preferences.

Structure Modification The following actions are available from pop-up menu:

316

ALINT
Add Phase

GUI Reference

Invokes Create New Phase Wizard. Created phase is added as a child to the selected group node or as a sibling of the selected phase. Add Node Adds new group node to the tree. Created group node is added as a child to the selected group node or as a sibling of the selected phase. Rename Allows renaming of the selected item (flow, group node, phase). Delete Removes the selected phase or group node. The order of phase and group nodes within the flow hierarchical tree can be changed with toolbar buttons: Move Up Flips the node with previous one at the same hierarchy level. Move Down Flips the node with next one at the same hierarchy level. Move Right Moves the node down in the hierarchy; the node becomes a child of the next sibling group node. Move Left Moves the node down up the hierarchy and inserts it before the parent group node at the same hierarchy level.

Phase Configuration

Detailed (right) part content of Flow Editor depends on an element selected within main part and provides statistical information and configuration controls. Configuring is available for phase, policy and preferences nodes. There are two types of phases in linting flow regular and optional. A linting flow cannot be completed until quality requirements (regular) are satisfied; optional phases are not required for a flow completion. Each phase has two major parameters: policy (defines set of rules to check) and pass criteria (define conditions that must be satisfied).

Pass Criteria There are two types of phase pass criteria (exclusively or combined):

317

ALINT
Design quality

GUI Reference

It is an integral number which is calculated based on the ratio of violated and non-violated rule weights. The criterion is satisfied when the phase quality level is greater or equal to a specified one. See the Design Quality Report section for details about the quality metrics. Critical rules This is the set of rules that must not be violated in any case during the phase execution. The criterion is not satisfied if at least one of the rules is violated. Rules are selected form the phase policy. When a rule is marked in the critical rules list, the severity is automatically set to Critical Warning level in the phase policy. Phase pass criteria are configured when particular phase node is selected. The following form in provided:

Figure 1. Phase Pass Criteria Regular/optional phase type can be toggled within the form with The phase is optional checkbox.

Policy When Policy node is selected for a phase, embedded Policy Editor is available within the detailed part of the Flow Editor window. So the phase policy can be created and configured easily.

318

ALINT

GUI Reference

Figure 2. Embedded Policy Editor

Preferences When phase Preferences node is selected, preferences can be adjusted within the right part of the Flow Editor window. Initial phase preferences values are inherited from the design and can be overridden. Remove check mark on the right to edit corresponding option.

319

ALINT

GUI Reference

Figure 3. Phase Preferences

New Phase Wizard

Generate New Phase Wizard may be opened from Flow Editor by clicking

button.

320

ALINT

GUI Reference

Figure 1. Create New Phase Wizard Phase name and policy should be specified. An optional phase will be created if This phase is optional option is selected (pass criteria satisfaction is not necessary for optional phases). Choosing Set the pass criteria for the new phase option enables another page of the wizard where pass criteria can be specified (this is accessible later via phase option).

321

ALINT

GUI Reference

Figure 2. Create New Phase Wizard - Pass Criteria It is possible to specify quality level and critical rules for the phase. If quality level is unchecked or no rules are checked it means that corresponding criterion is not taken into consideration. Once created new phase is added at the end of the current flow.

Related Commands

The following commands is used to rename the flow: alint.fe.rename The phase commands: alint.fe.phase.create alint.fe.phase.setpref The group node creation command:

322

ALINT
alint.fe.node.create The following command are common for phase and group nodes: alint.fe.node.delete alint.fe.node.movedown alint.fe.node.movedup alint.fe.node.demote alint.fe.node.promote alint.fe.node.rename Commands to configure phase criteria: alint.fe.phase.criterias.rule.add alint.fe.phase.criterias.rule.remove alint.fe.phase.criterias.setquality

GUI Reference

There is also a set of pure console commands for flow editing. These commands are independent of Flow Editor window. Commands for flow creating and renaming: alint.flow.create <file_name> alint.flow.setname <file_name> Commands for modifying flow structure: alint.flow.node.create <file_name> -node <node_hier_name> [-type groupnode | phase ] alint.flow.node.remove <file_name> -node <node_hier_name> alint.flow.node.setname <file_name> -node <node_hier_name> -name <new_name> alint.flow.node.move <file_name> -node <node_hier_name> [-location <node_hier_name>] [-position <number>] alint.flow.node.setpref <file_name> -node <node_hier_name> -pref <praf_name> -value <pref_new_value> Commands for phase configuration: alint.flow.phase.criterias.rule.add <file_name> -phase <phase_hier_node> -rule <rule_name> alint.flow.phase.criterias.rule.remove <file_name> -phase <phase_hier_node> -rule <rule_name> alint.flow.phase.criterias.setquality <file_name> -phase <phase_hier_node> -quality <qiality>

323

ALINT

GUI Reference

Rule Plug-in Viewer

Overview

The Rule Plug-in Viewer (see Figure 1.) displays the content of currently loaded ALINT rule plug-ins. It can be opened with the View | Linting Windows | Rule Plug-in Viewer menu item. It displays information about all the available rules in the following columns (up to 5 columns, selectable): Rule name Unique short name of the rule that includes plug-in specification (e.g. ALDEC_VHDL.2210) Rule ID Compounds a name that mnemonically represents what rule is about (e.g. "ALDEC_VHDL.DONTUSEMULTIPLETOPLEVELS" corresponds to "ALDEC_VHDL: do not use multiple top-levels in the RTL design", etc.) Rule level Rule property that describes rule importance: Rule - critical rules Recommendation 1 - important and strongly recommended Recommendation 2 - average severity, may be avoided in some cases Recommendation 3 - nice to have, design performance and tuning Suggestion - wishes and small cosmetic details Rule Title Full name of the rule (e.g "Do not use multiple top-levels in the RTL design") Rule tags The list of keywords characterizing rule application areas. Type *keyword* in the filter drop-down box to display all the rules with this keyword.

Figure 1. The Rule Plug-in Viewer window

324

ALINT
Moving mouse cursor over any rule displays a tooltip with rule checker properties.

GUI Reference

The filter in the upper-left corner understands wildcards-based syntax. Set * (asterisk) to see all the rules (i.e. to disable filtering). The Toggle Rule Classification Merge button switches between the following representations:

each plug-in is classified separately rules from all the available plug-ins are joined under common classification nodes. The drop-down box in the upper-right corner allows selection of grouping style: Aldec Chapters Used to classify rules from ALDEC plug-ins according to the topics they cover. Design Methodology Topics Rules are grouped by topics targeting different design methodologies. Default view, supported for ALDEC and STARC plug-ins. DO-254 Used to classify DO254 and ALDEC pulg-ins grouped by important design areas basing on RTCA DO-254 document. RMM Chapters Used to classify RMM rules according to the Reuse Methodology Manual document. STARC Verilog Chapters Used to classify STARC Verilog rules according to the STARC Verilog Design Style Guide contents. Supported only for STARC_VLOG rule plug-in. STARC VHDL Chapters Used to classify STARC VHDL rules according to the STARC VHDL Design Style Guide contents. Supported only for STARC_VHDL rule plug-in. Rule Levels Rules from all available plug-ins are grouped by the levels. Rules Rules from all available plug-ins are just listed. Selecting any rule name within Rule Plug-in Viewer causes contents change of two dependent windows: Rule Description Viewer Displays rule short description. Rule Parameters Editor Displays default parameters of the selected rule checker. Switches to read-only mode if opened.

325

ALINT
Related Commands

GUI Reference

Lists available ruleplugins: alint.ruleplugin.listplugins Lists names of available rules in a specified ruleplugin: alint.ruleplugin.listrules <plugin_name> Lists detailed information (name, title, level) of available rules in a specified ruleplugin: alint.ruleplugin.listrules_detailed <plugin_name> Lists classifications of available rules in a specified ruleplugin: alint.ruleplugin.listclassification <plugin_name>

326

ALINT

GUI Reference

Rule Description Viewer

Overview

The Rule Description Viewer (see Figure 1.) displays short description of a rule. It can be opened with the View | Linting Windows | Rule Description Viewer menu item. It also is opened automatically when double-clicking on a rule name in the Rule Plug-in Viewer, Configuration Viewer, Ruleset Editor, Policy Editor or the Violation Viewer.

Figure 1. The Rule Description Viewer window

327

ALINT

GUI Reference

The only Open Help for Current Rule button opens documentation file which contains the description of the displayed rule.

328

ALINT

GUI Reference

Configuration Viewer

Overview

The Configuration Viewer (see Figure 1.) displays contents of available rulesets and policies. It can be opened with the View | Linting Windows | Configuration Viewer menu item and displays the contents of the following: Built-in policies Rule checking policies pre-installed in the ALINT. Built-in rulesets Rulesets pre-installed in the ALINT. Custom policies Policies available in the policy search directories. Custom rulesets Rulesets available in the ruleset search directories.

Figure 1. The Configuration Viewer window Any category may be expanded to see its contents down to rules. Double-click on a rule name opens the Rule Description Viewer. Refresh button causes Configuration Viewer to re-read .alintpolicy and .alintruleset files from the policy and ruleset search directories. Right-click on a policy brings up the Add to editor popup menu. Within this menu the selected rule, ruleset or policy may be added to the Ruleset Editor or Policy Editor depending on which document is active. Target editor must be open and active. To set any policy (build-in or cusom) as active for current design use Set as Active Policy option of Configuration Viewer popup menu.

329

ALINT

GUI Reference

330

ALINT

GUI Reference

Ruleset Editor

Overview

The Ruleset Editor manages ruleset contents. It starts automatically when a new ALINT ruleset file is created. Ruleset file may be created using the File | New | Ruleset File menu item or opening the .alintruleset file in the File Browser or the Design Manager. It is also possible to open custom rulesets listed within Configuration Viewer. Note that built-in rulesets may not be opened.

Managing Rulesets

Ruleset Editor provides means for managing rulesets. It is possible to create new rulesets you need and modify existent custom rulesets.

Creating a New Ruleset There are two methods to fill up a ruleset with rules: Use rules directly Inherit existing rulesets Both methods may be combined in a single ruleset.

Using Rules Directly Using rules method allows to compose any custom set of rules and change it any time by editing this ruleset. Using a rule directly makes its presence in a ruleset independent from contents of inherited rulesets, i.e. guarantees rule inclusion in a target ruleset. There are three ways of adding rules to a ruleset: Right-click on the edited ruleset name and select the Use Rule item in the popup menu. The drop-down box will appear containing all rules from all available rule plug-ins. Use Add to | Ruleset Editor popup menu item in the Rule Plug-in Viewer or drag and drop a rule from it. It is possible to add only build-in rulesets. Use Add to | Ruleset Editor popup menu item in the Configuration Viewer or drag and drop a rule from it. Two latter options allow multiple rules selection and adding. Double-click on the rule name opens the Rule Description Viewer and the Rule Parameters Editor in read-only mode.

331

ALINT

GUI Reference

Inheriting Existing Rulesets Inheriting rulesets method allows to build flexible hierarchical rulesets. The edited ruleset contents change as the inherited rulesets change, so there is no need to edit the final ruleset manually. There are three ways of a ruleset inheritance: Right-click on an edited ruleset name and select the Inherit Ruleset item in the popup menu. The drop-down box will appear containing all built-in and custom rulesets located in the ruleset search directories. Use Add to | Ruleset Editor popup menu item in the Rule Plug-in Viewer or drag and drop a rule from it. It is possible to add only build-in rulesets. Use Add to | Ruleset Editor popup menu item in the Configuration Viewer or drag and drop a rule from it. Two latter options allow multiple rulesets selection and adding. The contents of the inherited ruleset are displayed in gray color to mark that inherited ruleset cannot be modified from here. Only the top-level ruleset can be modified in the Ruleset Editor. To change the contents of an inherited ruleset, open it in a separate Ruleset Editor, make the necessary operations and save changes. After that the refreshed content of inherited ruleset will be available in opened editor for the current ruleset.

Figure 1. The Ruleset Editor window If inherited ruleset is not found in the ruleset search directories, it will be displayed in the red color with proper error message (see Figure 2.).

Figure 2. The inherited ruleset error message

332

ALINT
Modifying a Ruleset

GUI Reference

To name or rename current ruleset, use the File | Save As... dialog. Renaming a file on the disk also renames a ruleset since the name of a ruleset is the name of the corresponding .alintruleset file. To modify existing ruleset open .alintruleset file. It is possible to remove items or to add new ones within the opened Ruleset Editor. To remove unnecessary rule/ruleset from the current ruleset, select such rule/ruleset and press the Delete key or right-click and select the Delete popup menu item. Drag and drop rules/rulesets from Rule Plug-in Viewer or use Use Rule, Inherit Ruleset options to add new items to the ruleset. NOTE: When renaming a ruleset, its name should not coincide with the name of the built-in rulesets and policies.

333

ALINT

GUI Reference

Policy Editor

Overview

The Policy Editor manages contents of a policy. The Policy Editor starts automatically when a new ALINT policy file is created. Policy file can be created using the File | New | Policy File menu item or opening an .alintpolicy file in the File Browser or the Design Manager. It is also possible to open custom policies listed within Configuration Viewer. Note that built-in policies may not be opened.

Managing Policies

Policy Editor provides means for managing policies. It is possible to create new policies you need for linting and modify existent custom policies.

Creating a New Policy There are three methods to fill up a policy with rules: Using rules directly Using existing rulesets Inherit existing policies All the methods may be combined in a single policy.

Using Rules Directly Using the rules method allows to compose any custom set of rules and change it any time by editing this policy. Using a rule directly makes its presence in a policy independent from the contents of inherited rulesets or policies, i.e. guarantees rule inclusion to a target policy. There are three ways of adding rules to a policy: Right-click on the name of the new policy in .alintpolicy file and select the Use Rule item in the pop-up menu (see Figure 1). The drop-down box will appear containing all rules from all available rule plug-ins.

334

ALINT

GUI Reference

Figure 1.The Use Rule item in the pop-up menu. Use Add to | Policy Editor popup menu item in the Rule Plug-in Viewer or drag and drop a rule from it. It is possible to add only build-in rulesets. Use Add to | Policy Editor popup menu item in the Configuration Viewer or drag and drop a rule from it. Two latter options allow multiple rules selection and adding. Double-click on a rule name opens the Rule Description Viewer and the Rule Parameters Editor.

Using Existing Rulesets Using the rulesets method allows to build hierarchical policy. The target policy contents change as the used rulesets change, so there is no need to edit it manually. There are three ways of a ruleset usage: Right-click on edited policy name and select the Use Ruleset item in the popup menu. The drop-down box will appear containing all built-in and custom rulesets located in the rulesets search directories. Use Add to | Policy Editor popup menu item in the Rule Plug-in Viewer or drag and drop a ruleset from it. It is possible to add only build-in rulesets. Use Add to | Policy Editor popup menu item in the Configuration Viewer or drag and drop a ruleset from it. Two latter options allow multiple rulesets selection and adding. Rules from used rulesets may not be removed. To change the contents of an inherited ruleset, open it in a separate Ruleset Editor, make the necessary operations and save changes

335

ALINT
Inheriting Existing Policies

GUI Reference

Inheriting policies method allows to build hierarchical policy. The target policy contents change as the inherited policies change, so there is no need to edit it manually. There are two ways of a policy inheritance: Right-click on an edited policy name and select the Inherit Policy item in the popup menu. The drop-down box will appear containing all built-in and custom policies located in the policies search directories. Use Add to | Policy Editor popup menu item in the Configuration Viewer or drag and drop a policy from it. The latter option allows multiple policies selection and adding. The contents of the inherited policies or used rulesets are displayed in gray color to mark that their content cannot be modified from here. Only the top-level policy can be modified in the Policy Editor. To change the contents of an inherited policy, open it in a separate Policy Editor, make the necessary operations and save changes. After that the refreshed content of inherited policy will be available in opened editor for the current policy.

Figure 2.The Policy Editor window If inherited policy or used ruleset is not found in the policy search directories or ruleset search directories respectively, it will be displayed in the red color with proper error message (see Figure 3).

336

ALINT
Figure 3. The inherited policy error message

GUI Reference

Modifying a Policy To name or rename current policy, use the File | Save As... dialog. Renaming a file on the disk also renames a policy since the name of a policy is the name of the corresponding .alintpolicy file. To change content of existing policy, open .alintpolicy file. It is possible to remove items or to add new ones within the opened Policy Editor. To remove unnecessary rule/ruleset/policy from the current policy, select the item and press the Delete key or right-click and select the Delete popup menu item. Drag and drop rules/rulesets from Rule Plug-in Viewer and policies from Configuration Viewer or use Use Rule, Use Ruleset, Inherit Policy options to add new items to the policy. NOTE: When renaming a policy, its name should not coincide with the name of the built-in rulesets and policies.

Policy Contents and Rule Configurations

Any policy in the Policy Editor is displayed in two sections: Policy Contents section Rule Configurations section

Policy Contents Section The Policy Contents section displays contents of a policy in the hierarchical tree form. The following objects are possible at the top level of the Policy Contents section: Individual rules Rules which are added directly to a policy. Used rulesets Rulesets which are used in a policy. Each ruleset may inherit another rulesets in turn. Inherited policies Policies which are inherited in a current policy. Each policy may inherit another policies in turn.

Rule Configurations Section The Rule Configurations section displays rules which parameters are modified in the current policy. Modified parameter is a parameter which value differs from the default value. Default parameter values are hard-coded in the ALINT rule plug-ins. Rules which parameters are equal to default ones are not displayed in the Rule Configurations section. Rules with modified parameters are displayed in both the Rule Configurations and the Policy Contents sections (see Figure 1).

337

ALINT

GUI Reference

Figure 1.The Rule Configuration window To modify rule parameter right-click on the rule, select the Configure Rule item from the drop-down menu. The rule will be possible to edit in the Rule Parameters Editor. Please note, that it is not possible to edit a rule in the Policy Content, first you should add it to the Rule Configuration section.

338

ALINT

GUI Reference

Rule Parameters Editor

Overview

The Rule Parameters Editor (see Figure 1.) is a tool for modification of rule parameters in a policy. It can be opened with the View | Linting Windows | Rule Parameters Editor menu item. It is opened automatically when double-clicking a rule name in the Policy Editor or the Violation Viewer. Double-click on a parameter value in the Value column to enter edit mode.

Figure 1.The Rule Parameters Editor window Each parameter has its own range of legal values. The Rule Parameters Editor validates user input and will not allow entering illegal value. Modified parameters are marked using bold font. A parameter is modified if its value is not equal to default one. Default values are hard-coded in the ALINT rule plug-ins. After parameter modification the target rule will appear in the Rule Configurations section of the Policy Editor.

339

ALINT

GUI Reference

Violation Viewer

Overview

The Violation Viewer displays AVDB file contents. It is started automatically on opening any AVDB file either using the File | Open dialog or opening the .avdb file in the File Browser or the Design Manager.

Violation Viewer Structure The ALINT Violation Viewer consists of 8 tabs: 7 tabs for violations grouping and the Summary tab (See Figure 1) :

Figure 1. The Violation Viewer window Summary tab Displays violations grouped by five criteria: Total, Error, Critical Warning, Warning, Info

340

ALINT
Sources tab Displays violations grouped by source file names. Design Units tab Displays violations grouped by design unit names. Instances tab Displays violations grouped by instance names. Rulesets tab Displays violations grouped by ruleset names. Rules tab Displays violations grouped by rule names. Rule levels tab Displays violations grouped by rule levels. Severity tab Displays violations grouped by violation severity.

GUI Reference

Managing Violations

Operating objects of the Violation Viewer are ALINT violations. The Violation Viewer tabs (except for the Summary tab) consist of main field and violation description field (Figure 1). Main field (on the top of the document) displays tree of violations grouped by certain criteria and contains the following columns: Line - line of file that contains violation Name - source point and name of file that contains violation Design Units - unit hat contains violation Instance - instance hat contains violation Rule Level - the level of the rule that was broken Severity - the level of rule relevance Active Policy - the status of the rule in the active policy

Description field (on the bottom of the document) displays violation message text and its details and contains the following columns: Line - line of file that contains violation Instance - instance that contains violation

341

ALINT
Design Unit - design units that contain violations Severity - the level of rule relevance Description - violation description

GUI Reference

Observing Multiple Violations Multiple violations may be selected in the main area for displaying messages in the description area in the Design Unit tab.

Figure 1. Multiple violations displayed.

Expanding Hierarchical Violations Some rule checkers produce compound hierarchical violation messages, i.e. violations with details. Violation may be expanded in the description area to see its details, if any.

342

ALINT

GUI Reference

Figure 2. The hierarchical violations expended Double-click on a violation (either in the main area or in the description area) opens the source file in the HDL editor at the line where this violation is detected. The same action is performed for details in the violations description area.

Functional Buttons

The following functions are available from the AVDB window toolbar: the Export to button allows to export AVDB files, both all or filtered, to the following formats: .txt, .html, . csv, .avdb. the Expand all items button allows to expand all levels of AVDB file structure the Collapse all items button allows to collapse all levels of AVDB file structure the Show/hide filters button allows to show and hide filters (see Picture 2) the Flatten/Organize the Hierarchy button allows to show or hide intermediate levels of the hierarchy the Filter by new status button allows to filter violations according to the New status the Filter by read status button allows to filter violations according to the Read status the Filter by fixed status button allows to filter violations according to the Fixed status

343

ALINT

GUI Reference

the Filter by irrelevant status button allows to filter violations according to the Irrelevant status the Mark all violations as button allows to set certain status to all the violations from the current database using the drop-down window (see Figure 1).

Figure 1. The drop-down window with statuses for all the violations the Generate policy from AVDB file button allows to create new policy basing on the rules used for current AVDB generating (see Generate Policy from AVDB Wizard section for details) the Generate design quality report from AVDB file button allows to create the report that contains estimate of the design quality based on the AVDB file (see Design Quality Report Generation Wizard section for details)

Violations Report Export AVDB file contents may be saved either as text, or CSV or HTML report. It may be done both for the entire file or for the part of it. The drop-down button of the Violation Viewer toolbar reveals several Export ... options:

Export Filtered View to a text file Exports current filtered view to a plain text file. Export Filtered View to a HTML page Exports current filtered view to an HTML file. Export Filtered View to a CSV file Exports current filtered view to a CSV (comma-separated values) file. Export Filtered View to an AVDB file Exports current filtered view to an AVDB file. Export all to a text file Exports all violations to a plain text file. Export all to a HTML page Exports all violations to a HTML file. Export all to a CSV file Exports all violations to a CSV (comma-separated values) file.

344

ALINT
Filtered View The set of displayed violations may be narrowed down by using filters. The Show/Hide filters button opens the filters pane (see Figure 2.): Add Filter button

GUI Reference

Adds the filter (criteria/value pair) to the filter list. Remove Filter button Removes the filter from the filter list. Edit currently selected Filter button

Changes the selected filter. Design Units Filter by design unit name. Sources Filter by source file name. Rules Filter by rule name. Instances Filter by instance name Rulesets Filter by ruleset name. Severity Level Select severity levels range to filter by. Rule Levels Select rule levels to filter by. Apply button Applies defined filters. Dismiss button Clears all filters, displays all violations.

Figure 2. The filters pane Most filters are provided as two separate drop-down boxes with the lists of possible criterion and values according to the active violations database. Add, Remove and Change Filters buttons are used to manage the filter list. Each time criteria/value pair is selected it should be added to the list using Add Filter button.

345

ALINT
Organize the Hierarchy It is possible to show or hide intermediate levels of the hierarchy by the button

GUI Reference

Filter by Status After the linting is completed it is possible to observe its results as the list of violations. You may manage this list by assigning different statuses to different violations. The following statuses are available for violations : New Violation is newly detected Read Violation is considered. Once the user clicks on this option the appearance of the object should be changed from bold to regular font. Read Violation is considered. Once the user clicks on this option the appearance of the object should be changed from bold to regular font. Read Violation is considered. Once the user clicks on this option the appearance of the object should be changed from bold to regular font. The default violation status is New. It may be changes to Read, Fixed or Irrelevant by the right-click: it will show the pop-up menu (see Figure 3), listing the available statuses (Read, Fixed or Irrelevant).

Figure 3. The filters pop-up menu If violation status was changed to Read it may be changed to New, Fixed or Irrelevant. If violation status was changed to Fixed it may be changed to New only. If violation status was changed to Irrelevant it may be changed to New or Fixed. It is also possible to filter the listed violations according to the assigned status. The following filters are available from the panel: by the New status by the Read status by the Fixed status

346

ALINT
by the Irrelevant status NOTE: The filters are not saved (they are removed from the database as soon as it is closed).

GUI Reference

NOTE: It is possible to use the Undo and Redo buttons on the main panel to perform appropriate actions in the Violation Viewer.

Pop-up Menu

The following actions are available from right click menu (except violation status assignment described above): Open Source File Opens the violation source file (available for violation and file related nodes) Show rule description Activates Rule Description Viewer with corresponding rule information (available for rule related nodes only) Disable rule(s) for Policy <active_policy_name> Sets there ENABLED parameter of the rule(s) to OFF for the active policy (see Enable/Disable Rule(s) for Active Policy section) Source Files, Design Units, Instances Adds the rules to corresponding section of the exclusions file attached to the active design (see Enable/Disable Rule(s) for Selected Objects section) Enable rule(s) for Policy <active_policy_name> Sets there ENABLED parameter of the rule(s) to ON for the active policy (see Enable/Disable Rule(s) for Active Policy section) Source Files, Design Units, Instances Removes the rules from corresponding section of the exclusions file attached to the active design (see Enable/Disable Rule(s) for Selected Objects section) Open in Ruleset/Policy editor Opens the custom ruleset/policy in the editor Use Ruleset Provides possibility to add additional filter by any available ruleset to the Violation Viewer (for Rulesets tab only) Use Policy Provides possibility to add additional filter by any available policy to the Violation Viewer (for Rulesets tab only)

347

ALINT
Delete Removes nodes directly from the Violation Viewer. Copy Copies nodes directly from the Violation Viewer. Expand all items Expands the violations tree Collapse all items Collapses the violations tree

GUI Reference

Enable/Disable Rule(s) for Active Policy It is possible to enable/disable a rule for a policy that is currently active. The set of reported violations can be reduced by removing irrelevant or unnecessary for current design rules from the active policy. Or, if some rule is relevant for the current design you may add it to the active policy and adjust necessary properties if needed. These options are available in right-click pop-up menu, when an active design is open. Choosing the Disable rule(s) for (Enable rule(s) for) option sets the rule parameter ENABLED to OFF (ON). The Disable rule(s) for (Enable rule(s) for) options are available, depending on the rule ENABLED parameters value for the current policy. When there is no such rule in the active policy, then Disable rule for option is inactive (grayed out). When selected rule is included into the active policy the following situations are possible: if the rule is enabled, then the option Enable rule for is inactive (grayed out) and the option Disable rule for is activate

348

ALINT

GUI Reference

Figure 1. Pop-up menu Disable rule for policy option. if the rule is disabled, then the option Disable rule for is inactive (grayed out) and the option Enable rule for is activate

Figure 2. Pop-up menu Enable rule for policy option. Multiple rules may be enabled/disabled at ones using one of the following approaches: Select multiple individual rules by clicking on violations or/and rule nodes. Select node that contains rule nodes (rule level node in Sources, Design Units, Instances, Rule Level tabs; rule level and ruleset nodes in Ruleset tab; severity level node in Severity tab). Built-in (prepackaged) policy is read-only. If currently active policy is built-in one then to disable any rule a new policy needs to be generated and settled as active one. Generate custom policy dialog box appears in this case (Figure 3). New policy inherits the current one and overrides the necessary settings.

349

ALINT

GUI Reference

Figure 3. Generate custom policy dialog box. Generate custom policy dialog box options: Policy name New policy name (should not match the built-in policy name) Location New policy location path Activate new policy Sets the new policy as active (selected by default) Add new policy to the policy search path Adds new policy to the policy search directories Open new policy in editor When selected indicates that new policy should be opened in policy editor when generated

Enable/Disable Rule(s) for Selected Objects The set of reported violations can be also reduced with help of exclusions file that provide a way to disable specified rules check for particular design elements. It is possible to disable all rules at once on a selected design part. Disable/Enabled rule(s) for menu sub-items differ depending on selected tab and node:

350

ALINT
Violation tabs Source Files, Design Units, Instances

GUI Reference

These items are available if node containing child nodes is selected. In this case all child nodes are scanned and four sets are retrieved: list of rules, source files, design units and instances. The following actions are provided (available from sub-menu): Violated rules Exclusions are added/removed for each unique pair source/rule, design unit/rule or instance/rule depending on which item is selected. All rules Exclusions are added/removed for each source file, design unit or instance depending on which item is selected. All rules are disabled/enabled.

Figure 4. Disable violated rules for the "BCD2LED" design unit.

351

ALINT
Source File <file_name>, Design Unit <du_name>, Instance <instance_name>

GUI Reference

These items are available if leaf node is selected. Exclusions are added/removed for source file <file_name>, design unit <du_name> or instance <instance name> depending on which item is selected. Only selected rule is disabled/enabled.

Figure 5. Disable ALDEC_VLOG.2051 rule for the "BCD2LED" design unit. Summary tab Exclusions file modifications are available for Sources, Design Units and Instances nodes only. Source File <file_name> : All rules, Design Unit <du_name> : All rules, Instance <instance_name> : All rules One of the items is available depending on which object (source file, design unit or instance) is selected. All rules are disabled/enabled for the selected object only.

352

ALINT

GUI Reference

Figure 6. Disable all rules for the bin2bcd.vhd source file

Listed actions result in adding/removing exclusions file entries. Violation Viewer modifies the exclusions file attached to the design. If there is no .alintexclusions file attached, the Create Exclusion File dialog box appears (Figure 3).

Figure 7. Create Exclusion File dialog box Newly created exclusions file will be attached to the active design.

353

ALINT

GUI Reference

NOTE: If design is not loaded then option Enable/Disable Rule(s) for Selected Objects is not available. NOTE: There are several ways to disable rule checks and to suppress undesired linting warnings in ALINT. See the Disable Checks for Particular Context section for details.

Use Ruleset It is possible to add additional filter by any available ruleset to the Violation Viewer. Click on Use Ruleset option and select ruleset from the drop-down list. Selected ruleset will be added to Rulesets tab.

Use Policy It is possible to add additional filter by any available policy to the Violation Viewer. Click on Use Policy option and select policy from the drop-down list. Selected policy will be added to Rulesets tab. NOTE: It is also possible to add filter by drag and drop the necessary ruleset or policy to the empty place of the Rulesets tab (see Additional Filters).

Additional Filters

It is also possible to filter linting results by: User defined policy or ruleset Classification topic

Filter Results by User Defined Policy or Ruleset It is possible to use policies and rulesets, both custom and built-in, to filter current violation database. In order to create a filter you should do the following: 1. Open the Rulesets tab 2. Open the Configuration Viewer (View | Linting Windows | ALINT Configuration Viewer or Alt+1) 3. From the Configuration Viewer drag and drop the necessary ruleset or policy to the empty place of the Rulesets tab (see Figure 1). This will result in filtering the current violation database according to this policy or ruleset.

354

ALINT

GUI Reference

Figure 1. User defined filter 4. If this ruleset or policy does not contain rules that are violated (present in current violation database) - the filter will not be added to the current violation database and the following warning message will appear in the Console: "Warning: The "{RulesetName}" ruleset cannot be added to the current view: the "{DatabseName}.avdb" database does not contain rule violations that belong to the selected filter." or "Warning: The "{PolicyName}" policy cannot be added to the current view: the "{DatabseName}.avdb" database does not contain rule violations that belong to the selected filter."

Filter Results by Classification Topic It is possible also to use classification topic from Rule Plug-in Viewer to filter current violation database. In order to create a filter you should do the following: 1. Open the Rulesets tab 2. Open the Rule Plug-in Viewer (View | Linting Windows | Rule Plug-in Viewer or Alt+6)

355

ALINT

GUI Reference

3. From the Rule Plug-in Viewer drag and drop the necessary classification node to the empty place of the Rulesets tab (see Figure 2). This will result in filtering the current violation database according to this topic.

Figure 2. Classification filter 4. If this classification topic does not contain rules that are violated (present in current violation database) - the filter will not be added to the current violation database and the following warning message will appear in the Console: "Warning: The "{ClassificationNodeName}" classification node cannot be added to the current view: the "{DatabseName}.avdb" database does not contain rule violations that belong to the selected filter." NOTE: The filters are not saved (they are removed from the database as soon as it is closed).

Generate Policy from AVDB Wizard

Generate Policy from AVDB wizard may be opened from Violation Viewer by clicking

button.

356

ALINT

GUI Reference

Figure 1. The Generate Policy from AVDB wizard - Basic information. Name and location of the policy should be specified. By default .avdb file name and working directory are used. The location of the new policy may be included into the design or global policy search directories choosing Local policy search path and Global policy search path options correspondingly. At the next step Irrelevant violation status interpretation or manual rules selection method for policy generation should be chosen.

357

ALINT

GUI Reference

Figure 2. The Generate Policy from AVDB wizard - Irrelevant status interpretation. It is also possible to switch between including all the rules that were used during the linting or the violated rules only (Process all the rules that were used during the linting process option). The list of rules that will be included into the policy may be reviewed and manually corrected.

358

ALINT

GUI Reference

Figure 3. The Generate Policy from AVDB wizard - Rules list. Policy generation summary is available at the last step.

359

ALINT

GUI Reference

Figure 4. The Generate Policy from AVDB wizard - Summary. The newly generated policy may be set as active for current design (Activate new policy option) and also opened in policy editor (Open new policy in editor option).

Design Quality Report Generation Wizard

Design Quality Report feature allows you to ensure that your design adheres to quality standards at your company. You can measure the effectiveness of your code by going through the following phases: 1. Running the linting process and generating a violation database (.avdb file). 2. Running the wizard and selecting a Base Classification for quality report. 3. Generating the report and analyzing the quality scoring. Design Quality Report Generation wizard may be opened from Violation Viewer by clicking button.

360

ALINT

GUI Reference

Figure 1. The Design Quality Report Generation wizard. Perform the following steps to generate a quality report: 1. Specify report file name and location (alint_DQR.html and working directory are corresponding defaults). 2. Choose the Classification (quality standard) from the drop-down list. 3. Optionally select whether to consider rules that were not used during the linting process. 4. Optionally select whether to open the report once it is generated. Quality percentage computation is performed according to the following rules: 1. Each rule has possible score (PSR) which is defined by the rule level (Rule = 5, R1 = 4, R2 = 3, R3 = 2, SUG = 1). 2. Each classification node (group of rules) has possible score (PSN) which is: defined by sum of PSRs of unique rules that are included in the node considered as 100% quality as for the node. 3. Each classification node has actual score (ASN) which is:

361

ALINT

GUI Reference
defined by sum of PSRs of unique rules that were not violated (if a rule is violated at least once then its PSR is not added to the ASN) used to calculate the quality of classification node: (ASN / PSN) * 100%.

Example: Figure 2. shows a part of the design quality report, violated rules are marked red. Scores specified at the right part of the picture help to describe quality percentage computation. Considering Readability node (scores are marked blue): PSN = 33(the sum of rule scores within the node), ASN = 24(the sum of not violated node rule scores); (ASN / PSN) * 100% = 72%. Other nodes of the same level are computed in the same way. Quality of the node at one level up (Code Portability and Reuse) is computed in the following way (scores are marked green). PSN = 33 + 4 = 37 (the sum of unique rule scores within all the nested nodes, three rules are not considered because they are considered within another node - Readability); ASN = 24 + 4 = 28 (the sum of not violated rule scores within all the nested nodes, two rules are not considered because they are considered within another node - Readability); (ASN / PSN) * 100% = 75%.

Figure 2. The quality report tree node.

362

ALINT

GUI Reference

Exclusions Editor

Overview

The Exclusions Editor manages content of exclusions files. It starts automatically when a new ALINT exclusions file is created. It may be created using the File | New | Exclusions File menu item or opening the .alintexclusions file in the File Browser or the Design Manager.

Managing Exclusions Elements

Using the Exclusions Editor it is possible to create new exclusions files you need and modify existing ones.

Creating a New Exclusions File New exclusions file is created using the File | New | Exclusions File menu item.

Figure 1. The Exclusions Editor window

Adding Exclusion Elements There are three sections within the Exclusions Editor tree - File, Design Unit and Instance. When element is added it appears in the section corresponding to the element type. New exclusions element can be added to the current file using the local toolbar or pop-up menu options.

363

ALINT
Add File Adds new file to the exclusions file. Add Design Unit Adds new design unit to the exclusions file. Add Instance Adds new instance to the exclusions file. It is also possible to add exclusion elements to the current file using Drag and Drop Operation:

GUI Reference

Design units from Library Manager can be dragged and dropped on the design unit node of exclusion document. It is available to add a new exclusions element by dragging an appropriate file from Design Manager or File Browser and dropping it on the file node. Once element appears it is possible to add rules that should be disabled for the context linting. NOTE: Configuration name should be specified manually with typing entyty_name(configuration_name) (it cannot be chosen from Add new design unit drop-down list).

Adding Rules There are two ways of adding rules to an exclusions element: Right-click on the element name and select the Add Rule item in the pop-up menu. The drop-down box containing all rules from all available rule plug-ins will appear. Drag and drop a rule from Rule Plug-in Viewer or Configuration Viewer. This options allow multiple rules selection and adding. Entire ruleset and classification node can be added in this way also. Double-click on the rule name opens the Rule Description Viewer. It is also possible to add/delete all the available rules at once. All the rules checking can be enabled/disabled with the following options: Disable All Rules Disables linting all the rules for selected context. Enable All Rules Enables linting all the rules for selected context. NOTE: Excluding all rules from an instance is not equal to marking instance as black box. Although no violations are shown on such instance synthesis results remain valid and clocks/resets propagation are not altered.

364

ALINT
Modifying an Exclusions File To name or rename current file, use the File | Save As... dialog.

GUI Reference

If the file has .alintexclusions extension it is opened in the Exclusions Editor automatically and can be easily modified. It is possible to remove, rename items or to add new ones within the opened editor. To remove unnecessary elements/rules from the current editor, select such item and press the Delete key or right-click and select the Delete pop-up menu item. Any exclusions element (file, design unit, instance) can be renamed. Use Rename pop-up menu option or double click the element and enter a new name.

Related Commands

The following commands are used to add element to the exclusions file. Each command can add specified element (file, design unit or instance) and/or rule to the element. When no arguments specified input dialog appears to edit element name. alint.ee.exclusions.add.file [rule] [file_name] alint.ee.exclusions.add.design_unit [rule] [unit_name] alint.ee.exclusions.add.instance [rule] [instance_name] The following commands are used to remove element from the exclusions file. The command can remove specified element (file, design unit or instance) or rule from the element. alint.ee.exclusions.remove.file [rule] [file_name] alint.ee.exclusions.remove.design_unit [rule] [unit_name] alint.ee.exclusions.remove.instance [rule] [instance_name] Command for disabling/enabling all the rules for selected element: alint.ee.exclusions.disable_all alint.ee.exclusions.enable_all The following command is used to create an .alintexclusions file with rule exclusions for files or design units. alint.exclusions.create [exclusions_file.alintexclusions] The following commands are used to add a rule exclusions to .alintexclusions file. If token "all" is used then all rules are excluded from specified item. alint.exclusions.add.unit [exclusions_file.alintexclusions] [rule] [unit_name] alint.exclusions.add.file [exclusions_file.alintexclusions] [rule] [file_name] alint.exclusions.add.instance [exclusions_file.alintexclusions] [rule]

365

ALINT
[instance_name]

GUI Reference

The following commands are used to remove rule from the .alintexclusions exclusions file. If token "all" is used then all rule exclusions for specified element (file, design unit or instance) are eliminated. alint.exclusions.remove.unit [exclusions_file.alintexclusions] [rule] [unit_name] alint.exclusions.remove.file [exclusions_file.alintexclusions] [rule] [file_name] alint.exclusions.remove.instance [exclusions_file.alintexclusions] [rule] [instance_name] Command for reporting summary of rule exclusions that are defined by .alintexclusions file. alint.exclusions.list [exclusions_file.alintexclusions]

366

ALINT

GUI Reference

Dialog Box References

Customize Dialog Box

Overview

The dialog box customization is available from the Tools | Customize menu. This dialog box consists of two tabs: Options and Shortcuts. The Options tab allows you to set global options for the GUI, for example the size of the icons, redrawing window content during resizing, etc. The Shortcuts tab allows to define keyboard shortcuts for selected GUI operations. Options

Large icons Sets the big size of icons on the toolbars. Large icons have the size of 32x32 pixels. By default icon size is small (16x16 pixels). Enable animations Sets the animation effect during dragging and docking windows in the Framework. Document or tool window can be docked and undocked. When docked, it is an integral part of the framework it looks as if it was embedded in the framework window. When undocked, it is displayed on top of the ALINT window. To change a position of the docked window just drag it and move to the another place of the framework. The dragging window are sticking to another windows. In this moment you can see the animation effect. Enable icons on tabs Allows to show icons on tabs in the document area of the Framework Manage undocked tool windows like standalone applications Allows to undock document window out of document area.

Shortcuts

The Shortcuts tab allows to define keyboard shortcuts for selected GUI operations. Section Categories contains a list of command groups. Each group is connected with the list of GUI command

367

ALINT

GUI Reference

descriptions, global shortcuts and Console commands. You can set new keyboard shortcut for each GUI command. The Shortcuts field shows the list of existing shortcuts attached to the selected command. To set a new shortcut press the keyword combination and symbol abbreviation will appear in the Press shortcuts key(s) field. Press the Assign button to save the new shortcut or Clear button to clear the shortcut field. The Remove button allows to delete an existing shortcut connected with the selected command. You can set the scope where this shortcut works. Defined scopes are displayed the Shortcut for selected command field. If the scope is set to Global then the shortcut is available in every window in the Framework. The Shortcut currently used by field shows the command name and the scope if defined shortcut is already used/exists.

368

ALINT

GUI Reference

Preferences Dialog Box

Overview

Setting the dialog box preferences is available from the Tools | Preferences menu This dialog box (see Figure 1.) allows you to configure ALINT. It contains both engine and GUI-related settings. The options are grouped into the categories shown in the tree on the left. Selecting a category in the tree on the left shows settings for this category in the right side of the window.

Figure 1. The Preferences dialog box. Some categories do not have any option associated with them. In order to change a setting, first you need to select a subcategory.

Searching for Options The search box in the upper left corner of the dialog box can be used to locate any setting. Instead of navigating the category tree and manually searching for the required option, you can enter the name of the option in the search box. The category tree will be shrunk to show only those categories that contain at least one option with

369

ALINT
the searched word in its name.

GUI Reference

For example, to search for the options related to linting, enter "linting" in the search edit box, and the category tree will be updated to show only subcategories Tools | Quick Launch Panel | General. Figure 2 shows the Preferences dialog box with the category tree shrunk to subcategories.

Figure 2. Searching for an option in the Preferences dialog box.

370

ALINT
Environment Category

GUI Reference

Extensions Category

This category contains the list of file types recognized by ALINT. You can specify new file extensions that can be recognized within the ALINT environment. Adding a user-defined extension allows you to load a file into ALINT, enables syntax coloring in the HDL Editor or opening ALINT and loading a file if you try to open the file directly from the operating system. File type Displays the name of the file type to open in ALINT. Extensions Allows you to specify extensions of files that will be recognized as the ALINT design resources. You can enter multiple extensions that should be separated by semicolons (;). If you add a new extension in the Extensions column, this setting will take effect when you restart ALINT. NOTE: At least one extension needs to be specified for each file type. Empty fields in the Extension column are not allowed.

Documentation Category

This category contains options related to displaying HTML-based on-line documentation delivered with the installation of ALINT. Show documentation using Internal HTML viewer Specifies an internal viewer for displaying HTML-based on-line documentation. The internal HTML Viewer is a built-in application dedicated to viewing web pages, displaying external HTML documents as well as the documents attached to a design and saved in the HTML format. External HTML viewer Specifies an external HTML browser for displaying HTML-based on-line documentation. After selecting the Product Help option from the Help menu ALINT launches an external HTML browser to show help. See Viewing Documentation topic for details.

371

ALINT
Linting Category

GUI Reference

General Category

This category contains options for controlling general ALINT preferences of non-list type (see Figure 1):

Figure 1. The General Category window Policy Equivalent of the -alint_policy argument for the alint, alog or acom command. Specified policy file must be located in one of the policy search directories. Maximum warnings limit Equivalent of the -alint_maxwarn argument for the alint, alog or acom command. Maximum warnings limit for a single rule Equivalent of the -alint_maxrulewarn argument for the alint, alog or acom command. Generate AVDB file: Equivalent of the -alint_avdb argument for the alint, alog or acom command.

372

ALINT
Use single AVDB file for workspace

GUI Reference

When enabled, linting results are saved to the same base if the workspace contains several designs. Otherwise separate AVDB file is generated per each design. Automatically close locked AVDB files If an AVDB file is opened in GUI it will be closed automatically at the beginning of new linting session (no message about locked AVDB file is reported). Automatically closed AVDB file will be opend after linting session is ended. Effective only in the GUI operation mode (e.g. when linting is executed from the Quick Launch Panel, Design Manager or main menu ) Clean AVDB file on design linting When enabled (by default) old violations are cleared before the design linting. The violations are cleared out of the AVDB file specified in the Generate AVDB file option. AVDB file cleaning is invoked if the whole design is linted. Clean work library on design compilation When enabled, all the units are deleted from the current working library automatically on every compilation of the design. Report violations to: Equivalent of the -alint_report argument for the alint, alog or acom command. Null Equivalent of the -alint_report null. Console Equivalent of the -alint_report console. File Equivalent of the -alint_report <filename>.

Advanced Category

This category contains options, that provide more specific configuration of ALINT.

373

ALINT

GUI Reference

Figure 1. The Advanced Category window Policy perspective Defines a name of a perspective which should come up on creation of a new policy file in the Policy Editor. Ruleset perspective Defines a name of a perspective which should come up on creation of a new ruleset file in the Ruleset Editor. Synthesis method ( -alint_pva ) Equivalent of the -alint_pva argument for the alint, alog or acom command. Latch Equivalent of the -alint_pva omit. Combinational feedback Equivalent of the -alint_pva feedback. Disable @alint pragmas Equivalent of the -alint_nopragmas argument for the alint, alog or acom command.

374

ALINT
Generate synthesis log Equivalent of the -alint_synthesislog argument for the alint or asim command. Additional options for 'alint'

GUI Reference

Allows specifying additional arguments for the alint command that are passed both to the compilation and elaboration stages. Additional options for 'asim' Allows setting additional options to the elaboration engine (asim command).

Entries Category

This category contains options for controlling list type parameters for linting (see Figure 1). The following options are available in the Show entries for drop-down box: Policy Directories Equivalent of the -alint_policy_path argument for the alint, asim, alog or acom command. Specifies directories to search for ALINT policy files. If an active policy is not found in the working directory, ALINT engine will then look for the respective .alintpolicy file in specified directories. These paths are also used by the Configuration Viewer and the Policy Editor to collect available policies. Ruleset Directories Equivalent of the -alint_ruleset_path argument for the alint, asim, alog or acom command. Specifies directories to search for ALINT ruleset files. If the used ruleset is not found in the working directory, ALINT engine will then look for respective .alintruleset file in specified directories. These paths are also used by Configuration Viewer and Ruleset Editor to collect available rulesets. Rule plug-in files Equivalent of the -alint_plugins_file argument for the alint, asim, alog or acom command. NOTE: Policy and ruleset search directories are applied at the application startup. If they are modified during the application run time, new values will be applied to generated commands, but will not be applied to GUI. Linting windows like the Configuration Viewer will not be able to read new policies and rulesets from recently added directories until application restart.

375

ALINT

GUI Reference

Figure 1. The Entries Category window. Select interested parameter in the Show entries for drop-down box and manage a list of values for that parameter using the buttons: Add new value Delete value Move element up Move element down

376

ALINT
Languages Category

GUI Reference

VHDL Category

General Category

This category contains general options related to VHDL compilation. Standard Version Sets the version of the VHDL standard the compiler should conform to. By default the compiler accepts IEEE 1076-2002 (VHDL 2002) syntax. This option is equivalent to using the -2002 argument for the acom command. Selecting option IEEE 1076-1993 (VHDL 93) is equivalent to using the -93 argument for the acom command, IEEE 1076-2008 (VHDL 2008) is equivalent to argument -2008. Disable VHDL 1076-1987 syntax for file opening Equivalent of the -disable87 argument for the acom command.

Advanced Category

This category contains advanced options related to VHDL compilation. Disable '--vhdl_comp_off' and '--vhdl_comp_on' directives The directives will disable the compilation of the subprogram only in the -2008 mode preserving backwards compatibility with earlier versions of the standard. Automatic file ordering Equivalent of the -o argument for the acom command. Enable incremental compilation Equivalent of the -incr argument for the acom command. Additional options Specifies any additional compiler options.

377

ALINT
Verilog Category

GUI Reference

General Category

This category contains general options related to Verilog and SystemVerilog compilation. Standard Version Sets the version of the Verilog/SystemVerilog standard the compiler should conform to. By default the compiler accepts IEEE 1800-2009 syntax. Selecting option LRM 1364-1995 is equivalent to using the -v95 argument for the alog command, LRM 1364-2001 is equivalent to the -v2k argument, LRM 1800-2005 is equivalent to the -sv2k5 argument .

Advanced Category

This category contains advanced options related to Verilog and SystemVerilog compilation. Disable '--verilog_comp_off' and '--verilog_comp_on' directives The directives will disable the compilation of the subprogram only in the -2008 mode preserving backwards compatibility with earlier versions of the standard. Enable incremental compilation Equivalent of the -incr argument for the vcom command. Additional options Specifies any additional compiler options.

Entries Category

This category contains options for controlling resource libraries and source libraries, macros, and PLI applications. Show entries for: Include directories Equivalent of the -incdir <directory> argument for the alog command. System include directories Equivalent of the -sysincdir <directory> argument for the alog command. Note that files located in the system include directories have to be placed in angled brackets, not in quotes in the Verilog `include statement (e.g. `include <timescale.v>).

378

ALINT
Source library directories Equivalent of the -y <path> argument for the alog command. Source library files Equivalent of the -v <path> argument for the alog command. Source files extensions Equivalent of the +libext+<suffix>[+<suffix>[...]] argument for the alog command. Verilog libraries Equivalent of the -l argument for the alog command. Defined macros Equivalent of the +define+<macro_name> argument for the alog command. Defined C-like macros Equivalent of the +cdefine+<macro_name> argument for the alog command.

GUI Reference

379

ALINT
C/C++ Category

GUI Reference

General Category

This category contains options that allow you to select the type of the C/C++ application, compiler type, and the name of the output. Application type Selects the type of the C/C++ application: ALINT API Sets the type of the application to a ALINT user-defined rule plug-in library. Equivalent of the -alintapi argument for the ccomp command. Compiler type Selects the underlying C/C++ compiler GCC Changes the C/C++ compiler to Microsoft Visual Studio 6.0. Available only under Windows. Visual Studio 6.0 Changes the C/C++ compiler to Microsoft Visual Studio 6.0. Available only under Windows. Note that Microsoft Visual Studio 6.0 can be used to compile PLI/VPI and VHPI applications. Compiling SystemC modules requires Microsoft Visual Studio 7.0 or newer. Equivalent of the -vc6 argument for the ccomp command. Visual Studio 7.0 Changes the C/C++ compiler to Microsoft Visual Studio 7.0. Available only under Windows. Equivalent of the -vc7 argument for the ccomp command. Visual Studio 7.1 Changes the C/C++ compiler to Microsoft Visual Studio 7.1. Available only under Windows. Equivalent of the -vc71 argument for the ccomp command Visual Studio 8.0 Changes the C/C++ compiler to Microsoft Visual Studio 8.0. Available only under Windows. Equivalent of the -vc8 argument for the ccomp command. Visual Studio 9.0 Changes the C/C++ compiler to Microsoft Visual Studio 9.0. Available only under Windows. Equivalent of the -vc9 argument for the ccomp command. Visual Studio 10.0 Changes the C/C++ compiler to Microsoft Visual Studio 10.0. Available only under Windows. Equivalent of the -vc10 argument for the ccomp command.

380

ALINT
Generate debug information Allows to generate debug information. Output file Equivalent of the -o <output> argument for the ccomp command.

GUI Reference

Advanced Category

This category contains linker options and advanced options. Visual Studio linker options Additional options for the Visual Studio linker. Note that the link options (if any) must be placed after source file(s). Equivalent of the -link <link_options> argument for the ccomp command. Additional options Specifies any additional compiler options. The options are passed verbatim to the underlying C/C++ (gcc or Microsoft Visual Studio). Equivalent of the <additional_compiler_options> argument for the ccomp command.

Entries Category

This category contains options related to include directories and library linking. Show entries for Include directories Equivalent of -I <include_path> argument for the ccomp command. Show entries for Library directories Equivalent of -L <library_path> argument for the ccomp command. Show entries for Library files Equivalent of -l<library> argument for the ccomp command.

381

ALINT
Tools Category

GUI Reference

Console Category

Appearance Category

This group of settings allows you to set font face and font size for the text printed in the Console. Text printed to the console is categorized and you can set different colors for each category: errors, warnings, messages, etc.

General Category

The Console is the basic input output device. The compilers, the linting engine and the graphical tools print their output to the Console and the user can enter macro commands. Transcript commands Enables or disables printing of commands executed in a macro. If transcript is on, all commands in the executed macro are printed to the Console. If transcript is off, commands are not printed to the Console (but the output of commands is). Equivalent of the on | off argument for the transcript command. Use relative paths in messages By default ALINT prints filenames in messages to the Console using absolute paths. # ACOM: Error: COMP96_0064: C:/Aldec/ALINT/examples/samples/blackjack_vhdl/src/bjack.vhd : (23, 17): Unknown type. Assuming that the current directory is C:/Aldec/ALINT/examples/samples/blackjack_vhdl/, after selecting relative path option filenames in the message in console window will be shortcut: # ACOM: Error: COMP96_0064: src/bjack.vhd : (23, 17): Unknown type. Show message identifier Enables or disables printing the identifier near the Console messages. Console buffer size Sets the maximum line number visible in the Console window. Buffer size can be within the range between 100 and 100000 lines.

382

ALINT
Library Manager

GUI Reference

General Category

The Library Manager displays a linked list of libraries visible from the current directory and can be used for viewing/manipulating library contents, creating/deleting libraries, library mappings and links, running elaboration-time linting, etc. Use insert functions while dragging a unit from a library to the HDL Editor Specifies if the insert options will be displayed after dragging and dropping library units to the HDL Editor. If enabled, the list with the following options appears: Insert Testbench, Insert VHDL Declaration, Insert VHDL Instantiation and Insert Verilog Instantiation.

383

ALINT
Code Generation

GUI Reference

VHDL Instantiation Category

This category of the Preferences dialog box allows you to specify settings for the Copy VHDL Instantiation option available in the context menu of the Library Manger window. The option copies to the clipboard a part of HDL code representing the instantiation statement of any design unit residing in the selected library. Then, the copy of the code can be pasted to any source file document. This option also allows generating a component instantiation statement in a language other than the language of the design unit. Instance label Allows you to enter the label name of the component instance being copied. Port prefix Allows you to enter a prefix for the actual in the port map aspect. Port suffix Allows you to enter a suffix for the actual in the port map aspect. Map default values If this option is checked, the generics and parameters in the port map aspect will be assigned an initial value.

Verilog Instantiation Category

This category of the Preferences dialog box allows you to specify settings for the Copy Verilog Instantiation option available in the context menu of the Library Manger window. The option copies to the clipboard a part of Verilog code representing the instantiation statement of any design unit residing in the selected library. Then, the copy of the code can be pasted to any source file document. This option also allows generating a component instantiation statement in a language other than the language of the design unit. Instance label Allows you to enter the label name of the component instance being copied. Port prefix Allows you to enter a prefix for the actual in the port map aspect. Port suffix Allows you to enter a suffix for the actual in the port map aspect. Map default values If this option is checked, the generics and parameters in the port map aspect will be assigned an initial value.

384

ALINT
Testbench Category

GUI Reference

This category of the Preferences dialog box allows you to specify settings for the Copy Testbench option available in the context menu of the Library Manger window. The option copies to the clipboard a testbench code that includes declaration of the testbench entity, architecture and configuration (a testbench created for VHDL objects) or module declaration (a testbench created for Verilog objects). Testbench entity/module name Allows you to enter the testbench name. Testbench architecture name Allows you to enter the testbench architecture name. Port prefix Allows you to enter a prefix for the actual in the port map aspect. Port suffix Allows you to enter a suffix for the actual in the port map aspect. Instance label Allows you to enter the label name of the component instance being copied.

385

ALINT
HDL Editor Category

GUI Reference

Appearance Category

This group of settings allows you to set font face, font size, and colors for text displayed in the HDL Editor. General Provides separate settings for each syntactic category: keywords, identifiers, comments, etc. User sections Allows to set colors for 3 user sections. Line attributes Allows to set colors for different line attributes, such as debug line, line warning, etc.

General Category

Protect Read-Only files from editing Blocks edition of the contents of a read-only file. If this option is cleared, you can edit the file contents, but you cannot save the file (unless you save it under a different name) Show whitespace characters Shows spaces, tabs, and new lines using gray characters ( Markers Sets options related to marks shown on the navigation marker. Marker size Set the width of the color marks (in pixels). Space between markers size Sets the minimum distance between marks on the navigation marker (in pixels). Enable error/warning details on tooltip Enables displaying of compiler error and warning messages in tooltips. This option is disabled by default. If enabled, tooltips will include complete compiler messages (same as messages printed to the Console). Enable global marker Hide or show the global marker. The global marker is a small square on the very top of the marker that shows the compilation status. Enable annotation ).

386

ALINT
Enables displaying annotations in the source code. Annotation maximum size

GUI Reference

Set the number of visible symbols in annotations. If the Annotation maximum size value is smaller then the annotation value length, the redundant symbols are cut. Enable link to object recognition Enables highlighting signal names located in the current execution scope.

File Type Pages

A separate page is available for each supported language/file type: VHDL, Verilog, Text, Tcl, Perl, Macro, C/C++. Enable virtual spaces Allows to place the insertion point anywhere in the editing area. Show margin Shows or hides the left margin in the HDL Editor. The margin is used to displayed line numbers and miscellaneous icons (bookmark icons, breakpoint icons, etc.). Syntax highlight Highlights the syntax. Keywords, comments, strings, etc. are shown using different colors and/or boldface and italics. Automatic find matching Highlights matching syntactic constructs, for example opening and closing braces, begin/end statements etc. The highlight appears when the insertion point is positioned at either the opening or the closing construct. Show autocomplete list while typing Enable code autocomplete in the HDL Editor. Line numbers size Adjust the width of the margin area that contains the line numbers. If the line number does not fit in the margin, the least significant digits are trimmed. Indent type The HDL Editor supports manual, automatic and smart text indenting. None The source code will not be indented automatically. Note that if you do not indent the text manually, you can resort to the Autoformat Text option. Auto Uses the indent from the previous line. The insertion point is aligned with the first character in the previous line.

387

ALINT
Smart

GUI Reference

Uses the indent from the previous line and increases or reduces it where appropriate. Smart indent ensures that nested statements are indented thus improving the readability of the source code. The indent level is calculated when you hit the Enter key. Tabulation Sets options related to tabulation. Size Sets the width of a tab sign. Keep tabs Specifies the behavior of the Tab key. If this option is selected pressing the tab key inserts a tab character into the file. Insert spaces Specifies the behavior of the Tab key. If this option is selected pressing the tab key inserts spaces into the file. The number of spaces depends on the setting in the Size box

Document Structure Sets options related to collapsible text sections (folds). If a section is collapsed then a range of lines is displayed as a single line preceded with a plus sign that allows to expand it. Sections facilitate navigation through the source code and give a better overview of its structure. Text section can be automatically created by the Generate Structure option. Clicking the Options button brings up an options window with four columns: Construction Names of the collapsible text sections (folds). Recognize Enables/disables recognition of a selected construct. Collapse Automatically collapses generated text section. Highlight Sets the background color for a given construct. The Document Structure option is available for selected languages only

388

ALINT
Exclusions Editor Category

GUI Reference

General Category

Exclusions files provide a way to disable specified rules checks for particular design elements - files, design units, and instances. When a file element is added to the exclusions file either absolute or relative path can be used. Use relative path The option specifies that a relative path will be used for the file elements added to the exclusions files. If it is checked (by default), then a path relative to the working directory will be used when a new file is added through the Add new file dialog to the exclusions file, otherwise an absolute path will be used.

389

ALINT
HTML Viewer Category

GUI Reference

General Category

Setting in this category allows you to set the home page for HTML Viewer.

Connection Category

Setting in this category allows you to configure the embedded HTML Viewer. You can set connection parameters, similar to settings in a regular, stand-alone browser. The embedded viewer is displayed in the document area of the Framework.

390

ALINT
Flow Manager

GUI Reference

Appearance Category

This group of settings allows you to set base font face, font size, and colors for text displayed in the Flow Manager. There are separate settings for the flow name, phase name, optional phase name and for the selection as well.

General Category

Phase execution depends on preferences options: A non-optional phase is locked unless all previous phases are completed The option provides execution of phases in the strict order, i.e. next phase can be run only when the previous one is completed successfully. Execute optional phases automatically The option provides execution of all flow phases automatically. If it is unchecked optional phases should be run manually. Automatically open the resulting violation database if a phase was not completed The option provides the ability to automatically open the results of current phase if any pass criterion is not satisfied. If it is unchecked the resulting violation database should be run manually.

391

ALINT
Violation Viewer Category

GUI Reference

Appearance Category

This group of settings allows you to set base font face, font size, and colors for text displayed in the Violation Viewer. There are separate settings for each status and comparison.

General Category

Setting in this category allows you to set the following: Show only source name Enable/disable statuses for violation messages Set up status options Manage status items manually Mark item as read on opening source Mark item as read when selection is changed Mark item as read after several (the number is adjustable) minutes

Set up editor option: set up a default or define one manually

Export Category

In this category it is possible to define CVS file separator.

392

ALINT
Rule Description Viewer Category

GUI Reference

Appearance Category

This group of settings allows you to set base font face, font size, and colors for text displayed in the Rule Description Viewer. There are separate settings for rule name, rule title, etc. Also there are separate options for example section.

General Category

Setting in this category allows you to check the following checkboxes to enable appropriate settings: Show rule name Show rule ID Show rule level Show rule title Show tags Show rule description Show example Show images

393

ALINT
Quick Launch Panel Category

GUI Reference

Appearance Category

This group of settings allows you to set base font face, font size, and colors for text displayed in the Quick Launch Panel. There are separate settings for Root Nodes, Active Nodes and Not active Nodes.

General Category

Setting in this category allows you to perform linting to the design or to the workspace.

394

ALINT
Tool Windows

GUI Reference

Appearance Category

This group of settings allows you to set font face for the tool windows in ALINT except the Console and HDL Editor windows.

Export and Import Appearance Preferences


The ALINT provides an easy way to keep your configuration from project to project and from release to release. You are allowed to store an appearance preferences of the Console, HDL Editor, Violation Viewer, Rule Description Viewer, Quick Launch Panel and general appearance preferences for other tools. To save color and font settings, use the Export option from the Tools | Appearance menu. The window colors and font settings will be stored in the configuration file (.appearance). The Import option from the Tools | Appearance menu allows to load a configuration file. NOTE: To set base font settings use the Tool Windows | Appearance category of the Preferences dialog box. Settings for different windows can be specified in the Console | Appearance, HDL Editor | Appearance, Violation Viewer | Appearance, Rule Description Viewer | Appearance and Quick Launch Panel | Appearance categories of the Preferences dialog box. Color and font settings for tool windows can be also stored in the form of .do macros. See Exporting/Importing GUI Preferences for details.

AVDB Compare Dialog


The AVDB Compare dialog compares contents of two AVDB files. It provides the following functionality: selecting two AVDB files for comparison selecting an AVDB file to write comparison results selecting a text file to write comparison results opening comparison results in the Violation Viewer setting filters for comparison The AVDB Compare dialog can be opened with the Linting | Compare AVDB Files ... menu item or from the pop-up menu when select two AVDB files within File Browser or Design Manager. To make working with violation messages more convenient the AVDB Compare dialog exists in two forms: the basic AVDB Compare dialog; the advanced AVDB Compare dialog.

395

ALINT
Basic AVDB Compare Dialog

GUI Reference

The basic AVDB Compare dialog contains the most essential options required to compare violation databases (see Figure 1).

Figure 1. The basic AVDB Compare dialog box. The basic AVDB Compare dialog consists of two sections: AVDB files to compare Defines the AVDB files that need to be compared. Resulting comparison database Defines the target AVDB file that will contain the comparison results. By default its value is equal to alint.avdb. The Open comparison result in the Violation Viewer option specifies if the resulting AVDB file shall be opened in the Violation Viewer. Default button resets all the definitions to default state. More Options button opens the extended AVDB Compare dialog that contains advanced options. All the values entered into the fields of basic AVDB Compare dialog remain the same when the advanced AVDB Compare dialog is opened.

Advanced AVDB Compare Dialog Options specified in the advanced AVDB Compare dialog control the number of compared violations that can be narrowed down by using filters. Also generation of comparison summary and text reports is available in advanced AVDB Compare dialog (see Figure 2).

396

ALINT

GUI Reference

Figure 2. The advanced AVDB Compare dialog box. The advanced AVDB Compare dialog contains such options as: Generate text report Enables generating the comparison report into the text format. Generate summary report Enables generating the comparison summary report. Filters Allows setting different filters by numerous conditions (see Filtered View section for details about filters). NOTE: Rule names in the Rules filter must be specified as internal or external names. Use Rule Description Viewer for rule names.

397

Macro Command Reference

Conventions
The following conventions are used in the command documentation. < > Angled brackets indicate an argument to be supplied by the user, for example <directory> indicates that you should enter a directory name (without angled brackets). [ ] Square brackets indicate optional arguments. | A vertical bar indicates a choice between several arguments. ... An ellipsis indicates that the previous argument can be repeated.

398

ALINT

Macro Command Reference

Specifying Arguments in a File


All the ALINT commands can be invoked with the -f argument followed by the name of a file containing a list of arguments for the command, for example: acom -f file_list.txt Arguments in the file can be combined with arguments on the command-line. Arguments from the file specified with -f are inserted in the command line (in lieu of -f <filename>) before the command is executed. If the expanded command line contains another -f <filename> argument, then the expansion is repeated. The -f argument is not available for Tcl built-in commands. Argument files are frequently used to hold a list of files or signals. Note that the same signal list can be used by many commands, for example log, toggle, etc. NOTE: The -f argument is not listed in the description of individual ALINT commands.

Tcl Expansion
Arguments inside files specified with -f are not subject to Tcl expansion: backslash substitution is not performed, words inside brackets ([]) are not executed as commands, etc. Therefore, VHDL extended identifiers and Verilog escaped identifiers must not be quoted or escaped. If the command file contains a list of signals to log, a VHDL extended identifier s[0] (e.g. signal \s[0]\ : bit) must be specified verbatim in the command file, for example sim:/tb/s[0]. When the same identifier is specified directly on the command line or in a macro, it must be quoted, for example: log sim:/tb/r\[0\] or log {sim:/tb/r[0]} The same principle applies to Verilog escaped identifiers.

Whitespace and Comments


Arguments in the file unlike argument on the command line can be separated with newlines. Other allowed delimiters are spaces and tabs. Lines in the file can be commented out with either //, #, or --. Comments must be placed at the beginning of the line. Indenting a comment with whitespace characters is allowed. Appending a comment to a line that already contains an argument will trigger an error. Block comments (/* */) are not supported.

399

ALINT

Macro Command Reference

Arguments Shared by All Commands


Arguments -title, -window and -f are shared between all command. They are not displayed in the list of arguments printed to the Console window when a command is invoked with the argument -help.

-help argument
Displays help information for a command used with the -help argument. -help argument have to be the only argument in the command line, otherwise any help will be shown.

-title argument
The -title argument assigns a title to a newly opened window and this window can be now designated by the title in subsequent commands. Window title is displayed in brackets in the window title bar and have to be unique. For example, to assign a title to the Violation Viewer window use command: system.open alint.avdb -title RTL

-window argument
Windows with an assigned title can be designated by that title in commands. The -window argument is used in to designate the window. For example, to assign a name to the Violation Viewer window and add custom filter to it use commands: system.open alint.avdb -title RTL alint.vv.customfilter.addruleset RMM_DEFAULT_RULES -window RTL The title can be assigned by using -title argument. Windows like Design Manager can be opened in ALINT framework only in a single copy. Thus switch -windows for such windows not do not have sense.

-f argument
In ALINT arguments can be specified in one file and invoked with -f argument. For example: acom -f file_list.txt Arguments from the file file_list.txt are inserted in the command line (in lieu of -f <filename>) before the command is executed. See Specifying Arguments in a File for more details.

400

ALINT

Macro Command Reference

Command Return Values


Several commands, for example the examine command return values. A value returned by a command can be assigned to a variable using Tcl bracket expansion, for example: set pending [ examine env:/tb/uut/rcv/cnt ]

Displaying Output of Commands that Return Values


If a command that returns a value (for example command examine) is invoked in the Console, then the value it returns is printed to the Console, for example: examine -hex env:/tb/uut/rcv/cnt # F0 However, if such a command is nested in another Tcl command, for example inside the proc command, then the value it returns is not printed. The code below defines function p and then calls it: proc p {} { examine sim:/tb/UUT/FifoBuffer/DataIn return } p Command examine queries signal sim:/tb/UUT/FifoBuffer/DataIn but its output does not appear on the Console. Such behavior is consistent with Tcl rules. This can be easily illustrated with the Tcl set command. Consider the following: set a 2 Tcl set command invoked in the Console returns value 2 and that value is printed to the Console. When the set command is placed inside procedure p, the value it returns is not visible, for example: proc p {} { set a 1 return } p To make sure that the output of the examine command appears on the Console, use the Tcl puts command explicitly, for example: proc p {} { puts [examine sim:/tb/UUT/FifoBuffer/DataIn] return } or

401

ALINT
proc p {} { set v [examine sim:/tb/UUT/FifoBuffer/DataIn] puts $v return }

Macro Command Reference

402

ALINT

Macro Command Reference

Commands Available at the OS Prompt


Several commands are available as stand-alone executables that can be invoked directly from the OS prompt. All external commands are located in the bin/ subdirectory of the ALINT installation directory. External commands can be used for library management and compilation. Names of some, but not all, external commands start with the letter v. Those commands have their counterparts starting with letter a (for example vlib - alib, vcom - acom). Only the v-commands are available at the OS prompt.

Library Management
vlib (creates a new library) vlist (lists libraries visible from the current directory) vdir (lists library contents) vdel (removes compiled units from a library) vmap (adds or removes library mappings)

Compilation and Linting


Compliation / compilation-time linting These commands compile VHDL or Verilog files correspondingly (e.g. pure compilation can be necessary to compile a vendor library from the source files), or run the compilation-time linting if -alint switch is specified: vcom VHDL files vlog Verilog files Dedicated linting vlint (takes the same arguments as alint command). ccomp (compiles C/C++ files)

Current Working Library


Commands invoked from the operating system shell do not have access to the $worklib variable that stores the name of the current working library. (The variable is set inside the ALINT environment.) The name of the working library can be specified with the appropriate command line argument (-work for vcom and vlog, -lib for other commands).

403

ALINT

Macro Command Reference

abort command
Stops the execution of a macro. Can only be used in macros. (It has no effect when typed into the Console). When used with the optional <level> argument, the command can stop not only the execution of the current macro but also the execution of the calling macros, if any.

Syntax
abort [all|<level>]

Arguments
all Stops all currently executing macros. <level> If set to 1, stops the current macro only. The calling macro, if any, will resume. If greater than one, stops the current macro and <level> - 1 calling macros.

Examples
abort all

Stops all executing macros.

404

ALINT

Macro Command Reference

acom command
Invokes the VHDL compiler, that compiles VHDL files to the library specified with the -work argument. If the argument is omitted, source files are compiled to the library pointed by the $worklib variable. The compiler assumes that the source files comply with the VHDL 2002 syntax. To change the standard version, use the -2008 argument (for VHDL 2008) or -93 (for VHDL 1993). Note that the order of arguments is important. Arguments preceding the names of all source files (<filename> [<filename> ...]) apply to all source files. Arguments following the name of an individual source file (Source File Arguments) apply only to that file. The compiler can be invoked directly from the operating system shell. See vcom for details.

Syntax
acom [-alint] [[-alint_avdb <filename>]|[-alint_skipunit <design_unit>]|[-alint_exclusions <filename>]|[-alint_elabchecks]|[-alint_maxrulewarn <number>|none]|[-alint_maxrulewarn <number>|none]|[-alint_nopragmas]|[-alint_policy <policy_name>]|[-alint_policy_path <directory>]|[-alint_ruleset_path <directory>]|[-alint_plugins_file <config_file>]|[-alint_pva omit|feedback]|[-alint_report console|null|<filename>]|[-alint_skipfile <filename>]][-2002|-2008|-93][-d <temp_path>][-disable87] [-e <error_limit>][-f <filename>] [-help] [-incr] [-j <directory>][-nonetlist] [-norangecheck][-o][-quiet] [-refresh <library>] [-relax][-s `<directory`>] [-version][-work <ibrary>] [`<filename`>][-lib|-work <library_name>][-skip]

Arguments
-alint Enables lint checks by the ALINT engine. -alint_avdb <filename> Sets the target AVDB file for violation reports. AVDB file (ALINT Violations DataBase) is a storage containing ALINT violations detected during a single linting session. This database allows post-linting model analysis, eliminating the need for running ALINT again and again to recall the violations collected in other parts of project. Once ALINT session results are saved to AVDB file, work with detected violations becomes more convenient. For example, it is possible to display filtered subset of violations in the desired order - by using the avdb2txt command, or compare results of different linting sessions by using the avdbcompare command, or generate coloured HTML report using avdb2html command, or generate CSV report using avdb2csv for further processing in third-party software. -alint_skipunit <design_unit> Defines a design unit that will not be analyzed by ALINT. It provides same functionality as -alint_skipfile argument but allows specifying particular design unit that should be skipped. VHDL design units are entity, architecture, configuration or package. See Options for ALINT Session for more information about design units specification.

405

ALINT

Macro Command Reference

-alint_exclusions <filename> Defines the name of .alintexclusions file. The file contains information about the elements (files, units, instances) that should be skipped during the linting session. See Exclusions Files section for details. -alint_elabchecks It is strongly recommended to specify it. Without this switch only the simplest rules are checked. When used during the compilation-time linting, this switch invokes generation of additional data in the working library that are used further to check complex rules (elaboration-time, while the whole design hierarchy is available). -alint_maxrulewarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine for any single rule. If the literal none is used, no limit is imposed and all warnings of every violated rule are reported. Note that total number of ALINT warnings still may be limited by the -alint_maxwarn. -alint_maxwarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine. If the literal none is used, no limit is imposed and all warnings are reported. -alint_nopragmas Disables reaction on -@alint pragmas inside VHDL comments. -alint_policy <policy_name> Selects the custom linting policy - ALINT active policy. For more information about defining policies in the ALINT Configuration Files see the help on ALINT Policy Configuration. -alint_policy_path <directory> Defines policy search directory. Multiple policy directories may be specified using multiple -alint_policy_path arguments. These directories are used by the ALINT engine to look for the active policy specified in the -alint_policy argument and its inherited policies, in case they are not found in the working directory. -alint_pva omit|feedback Allows to choose between two interpretation strategies for previous value assignments (out = out); this is used to make the ALINT behavior match the behavior of either FPGA or ASIC synthesis tools. -alint_report console|null|<file> Specifies the output of the violation report target. -alint_ruleset_path <directory> Defines ruleset search directory. Multiple ruleset directories may be specified using multiple -alint_ruleset_path arguments. These directories are used by ALINT engine to look for the rulesets used in an active policy specified in the -alint_policy argument, in case they are not found in the working directory. -alint_plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -alint_skipfile <filename> Defines a file that will not be analyzed by ALINT. This means, that all the design units included into this file are treated as black boxes by linting engine, so no linting checks are performed for them. See Options for ALINT Session for more information about design units specification.

406

ALINT

Macro Command Reference


NOTE: The order of options is important. Options specific to the ALINT engine (-alint_maxwarn, -alint_policy, -alint_pva, -alint_report, etc.) must be used before all source file names.

-93 Forces the compiler to conform to VHDL 93 (IEEE Std 1076-1993). By default, the compiler conforms to VHDL 2002. -2002 Forces the compiler to conform to VHDL 2002 (IEEE Std 1076-2002). This is the default mode of operation. See VHDL Versions for information on subsequent revisions of the VHDL standard and supported language constructs. -2008 Forces the compiler to conform to VHDL 2008 (IEEE Std 1076-2008). See VHDL Versions for information on subsequent revisions of the VHDL standard and supported language constructs. -d <temp_path> Specifies the output directory for temporary files. -disable87 Disables VHDL 87 syntax for file opening. By default this syntax is allowed in all compiler modes (-93, -2002, and -2008). -e <error_limit> Specifies the error limit for the compiler. The compiler aborts if more errors are encountered. -f <filename> Specifies the name of a text file with arguments for the acom command. Argument -f followed by a text file can be used instead of or in addition to arguments specified directly on the command line. Arguments specified in the file can be separated not only with spaces or tabs but also with new lines. Environment variables are not expanded, even if the compiler is invoked as vcom from the operating system shell. Comments are allowed before and/or after the argument list. Comments can begin with --, //, or # characters. -j <directory> Forces the compiler to read library mappings from the library.cfg file located in directory <directory> rather than the current directory. -incr Skips the compilation of units that did not change. This can substantially reduce the overall compilation time. Such functionality is particularly useful when you introduce small changes to the design and then recompile and test each change. The compiler detects if a unit changed by comparing hash values for the currently compiled unit and the unit already stored in the library. The hash value for the compiled unit is always stored in the library, even if compilation is run without the -incr argument. Note that this behavior is different from the behavior of the Verilog compiler. (The Verilog compiler calculates the unit hash value and stores it in the library only if compilation is run with the -incr argument.) The compiler creates the hash based on the actual contents of the source file. If the unit does not change, the hash total will not change either, even if you change indentation, remove white space, or add a comment in an existing line. If new lines are inserted (and the location of design units in the source file changes), the compiler will recompile only architectures, package bodies and configurations. Entities and package declarations will not be recompiled).

407

ALINT

Macro Command Reference

-nonetlist Disables the netlist compilation mode. See Netlist Compilation Mode in the VHDL Compilation section for details. -norangecheck Disables subtype range checks during linting. Run-time range checks verify that values assigned to items of a given subtype are within the range of that subtype. Disabling run-time range checks accelerates linting. -o Enables automatic file ordering. -quiet Limits compiler output to errors and LRM-related warnings. -refresh <library_name> Refreshes the contents of a library created with an earlier version of the compiler. This is needed if the library format changed between subsequent releases of ALINT. -relax Relaxes strict LRM requirements related to case statements, selected signal assignment statements, 32-bit integers, and library unit visibility rules. 1) The LRM requires choices used in case statements and selected signal assignment to be locally static. Non-static choices trigger a compilation error. When compilation is run with the -relax argument, the compiler error is changed to a warning. Additionally, the -relax argument allows using nonstatic types for the case expression. 2) The LRM defines integer type as range -2147483648 to 2147483647. Consequently, assigning values greater than 2147483647 (16#7FFFFFFF# ) is illegal, for example: signal s : integer:= 16#FFFFFFFF#; The compiler detect that the literal is out of range and reports an error. Argument -relax changes the compiler behavior so that 32-bit literals are treated as two's complement numbers. (In the declaration shown above signal s will be initialized to -1 when -relax is used.) See -relax for the asim command for information on 32-bit arguments for the conv_integer function. 3) When compilation is run in the -93 mode, the -relax argument implies an implicit use work.all; clause. (In VHDL 2002 and 2008 this clause is implied even without -relax.) 4) The conformance rules for subprogram specifications in the declaration and in the body are relaxed. See Relaxing LRM Requirements for more a detailed description and examples. -s <directory> Tells the compiler to read library mappings from the library.cfg file located in <directory> rather than the library.cfg file in the current directory. -version Returns the name of the application (ALINT), the version number, and the build date.

408

ALINT

Macro Command Reference

-work <library> Specifies the working library. <filename> The name of the source file to be compiled. Several file names can be specified separated by spaces. Each file name may be followed by source file options.

Source File Arguments

-lib | -work <library> Specifies the destination library. -offstrict93 Disables the strict VHDL'93 mode. -skip Tells the compiler to skip entities during the analysis of the file. Argument -skip can be used as source file option or as a normal argument.

Examples
acom vc1.vhd

Compiles file vc1.vhd to the current working library.


acom -work syst ctl.vhd alu.vhd mult.vhd -lib modulator

Compiles files ctl.vhd and alu.vhd to library syst (specified with the -work argument). File mult.vhd is compiled to the modulator library.
acom -refresh syst

Refreshes the contents of library syst to make it compatible with the current release of ALINT.
acom -skip gates.vhd testbench.vhd

In both files entities will be skipped if they are already in the library. Argument -skip is used as a source file option.
acom gates.vhd -skip testbench.vhd -skip

In both files entities will be skipped if they are already in the library. Argument -skip is used as normal argument.

409

ALINT

Macro Command Reference

adel command
Deletes a design unit from a library.

Syntax
adel [-lib <library_name>] -all or adel [-lib <library_name>] <design_unit> [<arch_name>]

Arguments
-lib <library_name> Specifies the logical name of the library that contains the unit to be deleted. If omitted, the current working library is assumed. The name of the working library is stored in the $worklib variable. -all Deletes all units from a library. <design_unit> The name of an entity, package, configuration, or Verilog module to be deleted. <arch_name> The name of an architecture to be deleted. This argument can only be used if the <design_unit> parameter denotes a VHDL entity. If a given entity has more than one architecture, only the specified architecture is deleted. (The entity is left intact.) If there is only one architecture for the specified entity, both the entity and the architecture are deleted.

Examples
adel bjack

Removes entity bjack and all its architectures from the current library.
adel -lib test mult behav

Removes architecture behav of entity mult from the test library. Other architecture of entity mult and the entity itself are left intact. If behav is the only architecture of mult, both the entity and the architecture are removed.
adel aux_pack

Removes the aux_pack package from the current working library.


adel -lib work -all

410

ALINT
Removes all units from library work.

Macro Command Reference

411

ALINT

Macro Command Reference

adir command
Displays the contents of the selected library. Can be used to print all library units and all library source files, print the source file of a selected unit, list package contents and list all architectures of an entity.

Syntax
adir [-l] [-lib <logical_name>] [-source] [-witharch] [<unit>]

Arguments
-l Prints verbose information about units in the library. Such information includes: 1. The library name of the unit. 2. The name of the source file. 3. Detailed information on the compiler, including the version string and the OS name. Note that a library may contain units compiled by different compiler versions on different operating systems. 4. The name of the processor architecture for which binary code was generated. Can be x86, x86_64, or none. None is shown for units without any binary code generated by ALINT. This includes all EDIF units, all SystemC modules, and VHDL units that contain no executable statements such as VHDL packages containing only type declarations. -lib <logical_name> Specifies the logical name of the library to be examined. If omitted, the current working library is assumed. The name of the working library is stored in the $worklib variable. -source Prints the names of the library source files. If used with the <unit> argument, prints the name of the source file (and the line number) of the specified unit. -witharch Prints the name of an architecture after the name of each entity when listing library contents. Entities which have multiple architectures are printed multiple times. <unit> Specifies the name of a library unit. This can be a VHDL entity, configuration, or package, a Verilog module or primitive, or an EDIF cell. The command will print (more detailed) information about the selected unit only rather than list all library contents. This is especially useful for listing contents of VHDL packages.

Examples
adir

Prints all library units from the current library.

412

ALINT
adir -lib ieee

Macro Command Reference

Prints all library units from the ieee library.


adir -source

Prints source files of the current library.


adir -witharch

Prints all units from the current library. Names of entities are followed by the names of architectures, for example:
# entity: alu (back) # entity: alu (behav) # entity: alu (rtl)

If the -witharch switch is omitted, the alu entity is printed only once.
adir -lib ieee std_logic_1164

Lists the contents of the std_logic_1164 package from the ieee library.
adir -source REG4

Prints the source file of the REG4 module and the line number where the definition of the module starts.

413

ALINT

Macro Command Reference

alias command
Defines an alias name for a command or displays defined aliases.

Syntax
alias [<name> [<commands>]]

Arguments
<name> The name of an alias for a command. The alias name can be used as a synonym of the aliased object. <commands> The name of the aliased command.

Examples
alias print echo

Sets an alias for the echo command. From now on you can print messages using print command instead echo command.

414

ALINT

Macro Command Reference

alib command
Creates a new library and modifies the library list that describes mapping between logical names and library index files (.lib). The command can also be used to compact a library.

Syntax
alib [-global] [<logical_name>] <physical_name> or alib -lib <logical_name> -compact

Arguments
-global Creates a global library. Global libraries are visible anywhere in the directory tree, not only in the current directory. Mappings for global libraries are stored in the global library.cfg file. (By default this file is located in the vlib/ subdirectory of the ALINT installation directory.) When invoked with the -global switch, the alib command temporarily enables write access to this file and stores a new mapping in it (or reports an error if write access cannot be enabled). <logical_name> The logical name of the library to be created. If not specified, the logical name of the library is assumed to be the same as the physical name. <physical_name> The name of the library index file (with the .lib extension) or the library directory. The name can include a full directory path. If the extension is omitted, the last section of the path is interpreted as a directory name. The directory is created and then the index file is created within this directory. The name of the index file is the same as the name of the directory but has the .lib extension. If the path is omitted, the index file is created in the current working directory. The library physical name must be a valid file name in the underlying file system. An error is reported if the library directory or the library file cannot be created due to file system limitations. (Such an error can happen if the physical name contains selected non-alphanumeric characters.) -lib <logical_name> Specifies the logical name of the library to be compacted. -compact Compacts the library (i.e. reduces its size). This has effect only for libraries with VHDL units that have been recompiled several times. Libraries which do not contain recompiled VHDL units are unaffected.

415

ALINT

Macro Command Reference

Examples
Assume that the current directory is /home/designs. Each of the following commands creates the library /home/designs/test/test.lib with the logical name test.
alib test test/test.lib alib test/test.lib alib test

To create the test.lib library in the current directory use any of the following commands:
alib test test.lib alib test.lib

The following command creates a globally visible library work located in the current directory.
alib -global work

To compact a library, use the following command:


alib -lib bjack -compact

416

ALINT

Macro Command Reference

alint command
Runs the ALINT engine and checks RTL design rules at the compilation and elaboration stages. NOTE: If your focus is exclusively on linting, the alint command is more convenient and faster than a sequence of the alog/acom and asim commands. Instead of invoking two commands, you can run the ALINT engine using just one command. The alint command limits the operations performed in the backend by alog, acom and asim to those needed by the ALINT engine.

Syntax
alint [-f <filename>] [-alint_avdb <filename>] [-alint_exclusions <filename>][-alint_incremental][-alint_gclk <clock_signal>] [-alint_gclkjoin <clock_signal_1> <clock_signal_2>][-alint_grst <reset_signal>] [-alint_maxwarn <number>|none] [-alint_maxrulewarn <number>|none][-alint_nopragmas] [-alint_plugins_file <config_file>][-alint_policy <policy_name>] [-alint_policy_path <directory>] [-alint_pva omit|feedback][-alint_ruleset_path <directory>] [-alint_report console|null|<file>][-alint_skipfile <filename>] [-alint_skipunit <design_unit>] [-alint_synthesislog <filename>][-worklib <library_name>] [-asim <asim_options>] [-alog <alog_options>] [-acom <acom_options>] [-version]<file> ... | -help

Arguments
-alint_avdb <filename> Sets the target AVDB file for violation reports. AVDB file (ALINT Violations DataBase) is a storage containing ALINT violations detected during a single linting session. This database allows post-linting model analysis, eliminating the need for running ALINT again and again to recall the violations collected in other parts of project. Once ALINT session results are saved to AVDB file, working with violation messages becomes more convenient. For example, it is possible to display filtered subset of violations in desired order - by using avdb2txt command, or compare results of different linting sessions by using the avdbcompare command (see also AVDB Files Comparison), or generate coloured HTML report using avdb2html command, or generate CSV report using avdb2csv for further processing in third-party software. -alint_gclk <clock_signal> Specifies a global clock signal. Multiple signals can be specified with multiple -alint_gclk arguments. -alint_gclkjoin <clock_signal_1> <clock_signal_2> Indicates ALINT engine to consider the FFs controlled with the specified clock signals as belonging to the same clock domain. -alint_grst <reset_signal> Specifies a global reset signal. Multiple signals can be specified with multiple -alint_grst arguments. -alint_exclusions '<filename'>

417

ALINT

Macro Command Reference


Defines the name of .alintexclusions file. The file contains information about the elements (files, units, instances) that should be skipped during the linting session. See Exclusions Files section for details.

-alint_incremental Using this argument speeds up the repetitive design analysis. This option enables caching the intermediate internal data built during elaboration-time phase. If there are no essential changes in the design structure, then the intermediate data from the previous elaboration-time session is re-used. This option has a significant impact on the speed of subsequent runs. A different policy can be quickly applied to the design without re-computing most of the internal data. This optimization has Beta status in this release, thus the -alint_incremental option is not enabled by default. Use this argument at your own risk (it may cause stability issues). -alint_maxrulewarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine for any single rule. If the literal none is used, no limit is imposed and all warnings of every violated rule are reported. Note that total number of ALINT warnings still may be limited by the -alint_maxwarn. -alint_maxwarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine. If the literal none is used, no limit is imposed and all warnings are reported. -alint_nopragmas Disables reaction on //@alint pragmas inside Verilog comments. -alint_policy <policy_name> Selects the custom linting policy - ALINT active policy. For more information about defining policies in the ALINT Configuration Files see the help on Policy Configuration. -alint_policy_path <directory> Defines a policy search directory. Multiple policy directories may be specified using multiple -alint_policy_path arguments. These directories are used by the ALINT engine to look for the active policy specified in the -alint_policy argument and its inherited policies, in case they are not found in the working directory. -alint_pva omit|feedback Allows to choose between two interpretation strategies for previous value assignments (out = out); this is used to make the ALINT behavior match the behavior of either FPGA or ASIC synthesis tools. -alint_plugins_file Defines a path to the additional configuration file for ALINT rule plug-ins in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -alint_report console|null|<file> Specifies the output of the violation report target. -alint_ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -alint_ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in an active policy specified in the -alint_policy argument, in case they are not found in the working directory. -alint_skipfile <filename> Defines a file that will not be analyzed by ALINT. This means, that all the design units included into this file are treated as black boxes by linting engine, so no linting checks are performed for them.

418

ALINT

Macro Command Reference


See Options for ALINT Session for more information about design units specification.

-alint_skipunit <design_unit> Defines a design unit that will not be analyzed by ALINT. It provides same functionality as -alint_skipfile argument but allows specifying particular design unit that should be skipped. See Options for ALINT Session for more information about design units specification. -alint_synthesislog <filename> Lists external and internal clocks/resets that were detected in the design; clock domain crossings accompanied by the detailed information on source-destination and on destination-source registers; instances and the number of equivalent logic gates required to implement each instance; storage element inferences and top-level interface port connections analysis. -worklib <library_name> Defines a library which is used as destination library for the compilation (both VHDL and Verilog design units) and searched for top-level design unit during the elaboration stage. -alog <alog_options> Specifies any number of valid alog compilation options. -acom <acom_options> Specifies any number of valid acom compilation options. -asim <asim_options> Specifies any number of valid asim elaboration options. -f <filename> Specifies a plain text file with a list of arguments. Argument -f and a text file can be used instead of or in addition to arguments specified directly on the command line. Arguments specified in the file can be separated not only with spaces or tabs but also with new lines. Similar to alog -f or acom -f. -version Returns the name of the application (ALINT), the version number, and the build date. NOTE: The order of options is important. Options specific to the ALINT engine (-alint_maxwarn, -alint_policy, -alint_pva, -alint_report, etc.) must be used immediately after the alint command and cannot be preceded by or mixed with compiler options (introduced with the -alog or -acom arguments) or elaboration options (introduced with -asim).

Examples
alint -alog src/casepr4.v

Runs the ALINT engine for the casepr4.v source file. The ALINT engine will perform both compilation- and elaboration-time linting.

419

ALINT

Macro Command Reference

alintId command
Prints the version of the ALINT product.

Syntax
alintId

Arguments
None.

420

ALINT

Macro Command Reference

alintVersion command
Prints the detailed information about the version of the ALINT product.

Syntax
alintVersion

Arguments
None.

421

ALINT

Macro Command Reference

alintVersionString command
Prints the detailed information about the vendor, product name, version, and build date.

Syntax
alintVersionString

Arguments
None.

422

ALINT

Macro Command Reference

alint.ruleplugin.load command
Loads user-defined rule plug-in into the ALINT framework.

Syntax
alint.ruleplugin.load <plugin_library_name> ... | -help

Arguments
<plugin_library_path> Shows windows or unix name of the rule plug-in library to be loaded. NOTE: Pre-installed rule plug-ins are loaded automatically. So alint.ruleplugin.load should not be used for them.

Examples
# load compiled rule plug-in alint.ruleplugin.load "$aldec/examples/user_defined_rules/demo_ruleplugin/demo_plugin.dll"

423

ALINT

Macro Command Reference

alint.ruleplugin.register command
Registers ALINT rule plug-in in default or custom configuration file.

Syntax
alint.ruleplugin.register {-global | -file <plugins_file_name>} [-enabled {on | off}] {[-windows | -unix] <plugin_library_path>} ... | -help

Arguments
-global | -file <plugins_file_name> Registers ALINT rule plug-in within the default or custom plug-ins file. Custom plug-ins file may be loaded with -alint_plugins_file switch later. NOTE: Default plug-ins file default.plugins is located in the bin/alintplugins folder within the ALINT installation.

-enabled {on | off} Shows ALINT rule plug-in state. When the -enabled is off ALINT rule plug-in will not be loaded with the ALINT but it will be possible to enable it using the alint.ruleplugin.turn command. Default value of -enabled is on. [-windows | -unix] <plugin_library_path> This is the path to the ALINT rule plug-in library on different platforms. If -windows or -unix switches are not specified - the current platform is used by default.

Examples
# register compiled rule plug-in within the default rule plug-ins file alint.ruleplugin.register -global -windows "$aldec/examples/user_defined_rules/demo_ruleplugin/demo_plugin.dll" -unix "$aldec/examples/user_defined_rules/demo_ruleplugin/demo_plugin.so"

424

ALINT

Macro Command Reference

alint.ruleplugin.turn command
Enables and disables ALINT rule plug-ins in default or custom rule plug-ins file. When ALINT rule plug-in is disabled, information about it is not removed from corresponding file, so it can be enabled using this command.

Syntax
alint.ruleplugin.turn {on | off}{-global | -file <plugins_file_name>}<plugin_library_name> | -help

Arguments
{on | off} Enables/disables the plug-in -global | -file <plugins_file_name> Specifies default or custom plug-ins file that contains the plug-in to be enabled/disabled. <plugin_library_name> Shows windows or unix name of the rule plug-in library.

Examples
# turn off compiled rule plug-in from the default rule plug-ins file alint.ruleplugin.turn off -global -windows "$aldec/examples/user_defined_rules/demo_ruleplugin/demo_plugin.dll"

425

ALINT

Macro Command Reference

alint.ruleplugin.unload command
Unloads user-defined rule plug-in from the ALINT framework.

Syntax
alint.ruleplugin.unload <plugin_name> ... | -help

Arguments
<plugin_name> Shows name of the rule plug-in to be unloaded.

Examples
# unload user-defined rule plug-in alint.ruleplugin.unload DEMO_PLUGIN

426

ALINT

Macro Command Reference

alint.ruleplugin.unregister command
Unregisters information about ALINT rule plug-in from local or global configuration file.

Syntax
alint.ruleplugin.unregister {-global | -file <plugins_file_name>} <plugin_library_name> | -help

Arguments
-global | -file <plugins_file_name> Specifies default or custom plug-ins file that contains the plug-in to be unregistered. NOTE: Default plug-ins file default.plugins is located in the bin/alintplugins folder within the ALINT installation.

<plugin_library_name> Shows windows or unix name of the rule plug-in library.

Examples
# unregister compiled rule plug-in from the default rule plug-ins file alint.ruleplugin.unregister -global "$aldec/examples/user_defined_rules/demo_ruleplugin/demo_plugin.dll"

427

ALINT

Macro Command Reference

alist command
Lists library mappings. The mappings are read from the library.cfg file. ALINT first looks for the library.cfg file in the current directory and then in the vlib/ subdirectory of ALINT installation directory.

Syntax
alist [-mode] [-links|-structure] or alist -mode <library>

Arguments
-mode Prints the library mode. The mode can be either RW (read-write) or RO (read only). -links Prints links to library.cfg files in other directories. Links make all mappings from those directories visible in the current directory. -structure Displays a formatted list with the library structure. Links to other directories are preceded with a dash sign. Mappings imported from other directories are intended. <library> Selects the library whose mode should be printed.

Examples
alist

Lists all libraries visible from the current directory. Library logical names are followed by their physical location.
alist -mode

Lists all libraries visible from the current directory. Each line is preceded with the RW (read-write) or RO (read-only) indicator.
alist -structure

Prints the structure of the library tree. Mappings imported from other library.cfg files are intended.
alist -mode ieee

428

ALINT
Prints the status (read-write or read-only) of the ieee library.

Macro Command Reference

429

ALINT

Macro Command Reference

alog command
Invokes the Verilog/SystemVerilog compiler. By default the compiler accepts source code conforming to IEEE Std 1800-2005 with several extensions and fixes from the latest revision of IEEE Std 1800, i.e. IEEE Std 1800-2009. Those extensions can be disabled by using the -sv2k5 option. You can change the compiler mode of operation to Verilog 95 (-v95), Verilog 2001 (-v2k), or Verilog 2005 (-v2k5). The compiler compiles design units to the library specified with the -work argument. If the argument is omitted, source files are compiled to the library pointed by the $worklib ALINT variable. If the $worklib variable is not set, the compiler falls back to library named work, provided that it exists. The compiler sets the compilation unit scope to all files specified on the command line, according to the rules of the Verilog language. To have the compiler define a separate compilation unit scope for each file (as allowed by SystemVerilog), you need to compile the files separately, with a single invocation of the compiler for each file. NOTE: The compiler can also be invoked directly from the operating system shell. See vlog for details.

Syntax
alog [-alint] [-alint_avdb <filename>] [-alint_skipunit <design_unit>][-alint_exclusions <filename>][-alint_elabchecks] [-alint_maxrulewarn <number>|none] [-alint_maxwarn <number>|none][-alint_nopragmas] [-alint_policy <policy_name>] [-alint_policy_path <directory>] [-alint_pva omit|feedback] [-alint_report console|null|<file>] [-alint_ruleset_path <directory>] [-alint_plugins_file <config_file>] [-alint_skipfile <filename>] [-allow_duplicated_units] [-check] [+cdefine+<macro_name>] [+cdefine+<macro_name>=<macro_text>] [+define+<macro_name>] [+define+<macro_name>=<macro_text>] [-echo] [-err <message_id> <level>] [-error_limit <n>] [-f <cmd_line>] [-fl <lib_cfg>] [+force_celldefine] [-incdir<path>] [+incdir<+path>] [-j] [-l <library>] [-lc <lib_cfg>] [-lcu][+libext+<suffix>] [-msg <level>][-o <directory>] [-quiet] [-refresh <library_name>] [-sv2k5][-sysincdir <directory>] [+sysincdir+<directory>] [-time] [-timescale <timeunit>/<timeprecision>] [-u] [-v <filename>] [-v95] [-v2k|-v2005] [-v2k5] [-version] [-work|-w <lib_name>] [-y <path>] <filename> [<filename> ...]

ALINT Arguments
-alint Enables lint checks by the ALINT engine. -alint_avdb <filename> Sets the target AVDB file for violation reports. AVDB file (ALINT Violations DataBase) is a storage containing ALINT violations detected during a single linting session. This database allows post-linting model analysis, eliminating the need for running ALINT again and again to recall the violations collected in other parts of project. Once ALINT session results are saved to AVDB file, work with detected

430

ALINT

Macro Command Reference


violations becomes more convenient. For example, it is possible to display filtered subset of violations in the desired order - by using the avdb2txt command, or compare results of different linting sessions by using the avdbcompare command, or generate coloured HTML report using avdb2html command, or generate CSV report using avdb2csv for further processing in third-party software.

-alint_skipunit <design_unit> Defines a design unit that will not be analyzed by ALINT. It provides same functionality as -alint_skipfile argument but allows specifying particular design unit that should be skipped. See Options for ALINT Session for more information about design units specification. -alint_exclusions <filename> Defines the name of .alintexclusions file. The file contains information about the elements (files, units, instances) that should be skipped during the linting session. See Exclusions Files section for details. -alint_elabchecks It is strongly recommended to specify it. Without this switch only the simplest rules are checked. When used during the compile-time linting, this switch invokes generation of additional data in the working library that are used further to check complex rules (elaboration-time, while the whole design hierarchy is available). -alint_maxrulewarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine for any single rule. If the literal none is used, no limit is imposed and all warnings of every violated rule are reported. Note that total number of ALINT warnings still may be limited by the -alint_maxwarn. -alint_maxwarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine. If the literal none is used, no limit is imposed and all warnings are reported. -alint_nopragmas Disables reaction on //@alint pragmas inside Verilog comments. -alint_policy Selects the custom linting policy - ALINT active policy. For more information about defining policies in the ALINT Configuration Files see the help on ALINT Policy Configuration. -alint_policy_path <directory> Defines a policy search directory. Multiple policy directories may be specified using multiple -alint_policy_path arguments. These directories are used by the ALINT engine to look for the active policy specified in the -alint_policy argument and its inherited policies, in case they are not found in the working directory. -alint_pva omit|feedback Allows to choose between two interpretation strategies for previous value assignments (out = out); this is used to make the ALINT behavior match the behavior of either FPGA or ASIC synthesis tools. -alint_report console|null|<file> Specifies the output of the violation report target. -alint_ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -alint_ruleset_path. These directories are used by the ALINT engine to look for the rulesets used in an active policy specified in the -alint_policy argument, in case they are not found in the working directory.

431

ALINT

Macro Command Reference

-alint_plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -alint_skipfile <filename> Defines a file that will not be analyzed by ALINT. This means, that all the design units included into this file are treated as black boxes by linting engine, so no linting checks are performed for them. See Options for ALINT Session for more information about design units specification.

Arguments
-allow_duplicated_units Allows duplicated unit names within one compilation unit scope. When the compiler detects a unit with a name already seen in the compilation scope, it prints a warning and ignores that unit. In other words, when units with duplicated names are detected, the compiler uses the first unit seen. If the argument is omitted, duplicated unit names trigger an error. -check Tells the compiler to perform a syntax check only. During a syntax check, the files are analyzed but no data is saved to any library. +cdefine+<macro_name> Equivalent to the C-like compiler directive #define <macro_name>. +cdefine+<macro name>=<macro text> Equivalent to the C-like compiler directive #define <macro_name> <macro_text>. +define+<macro_name> Equivalent to the compiler directive `define <macro_name>. The argument can be used multiple times. It is also possible to chain multiple macro definitions in one +define argument, for example: +define+m1+w=16+m3 (define macro m1, assign 16 to macro w, and define macro m3). +define+<macro_name>=<macro_text> Equivalent to the compiler directive `define <macro_name> <macro_text>. The argument can be used multiple times. It is also possible to chain multiple macro definitions in one +define argument, for example: +define+m1+w=16+m3 (define macro m1, assign 16 to macro w, and define macro m3). -echo Sets verbose mode. -err <message_id> <level> Sets a warning level for a given compiler message. Message IDs are written as VCP<number>. The message ID string is used in error and warning messages printed by the compiler. The level can be one of E (compiler error), W1, W2, W3, W4, W5 (compiler warnings; printed in blue), W6, W7, W8, W9 (compiler messages). The sample compiler warning shown below uses VCP2515 message ID.

432

ALINT

Macro Command Reference


Warning: VCP2515 gen.v : (8, 1): Undefined module: and2 was used. Port connection rules will not be checked at such instantiations.

To change the level of this message to W9, run compilation with the following command:
alog -err VCP2515 W9 gen.v

To make the compiler error out instead of just printing a warning, use the following syntax:
alog -err VCP2515 E gen.v

-error_limit <n> Stops compilation after exceeding the error limit. -f <cmd_line> Specifies the name of a text file with arguments for the alog command. Argument -f and a text file can be used instead of or in addition to arguments specified directly on the command line. Arguments specified in the file can be separated not only with spaces or tabs but also with new lines. Environment variables inside argument files are expanded. The name of the environment variable should be preceded by the dollar ($) sign on all supported platforms, including Windows. If the string following the dollar sign is not a name of an existing variable then the whole object (the dollar sign followed by the string) will be expanded to an empty string. Variable expansion is usually used when the Verilog compiler is started directly from the operating system shell (see vlog). The file with arguments can contain comments. Both single line comments and multi line comments are supported. Single line comments begin with a double slash (//). Multi-line comments start with a slash/asterisk combination (/*) and are terminated with an asterisk followed by a slash (*/). The asterisk can also be used as a wildcard character when specifying source files to be compiled. To avoid any ambiguities, the slash used as the file system hierarchy separator must be escaped in front of the asterisk wildcard, for example:
src\/*.v

If the backslash is omitted, the compiler will assume that the /* string begins a comment. -fl <lib_cfg> Sets the library configuration file to <lib_cfg>. The <lib_cfg> string should contain both the directory path and the file basename, i.e. library.cfg. If the path to the library configuration file is specified twice (both with the -lc switch and the -fl switch) and both configuration files map the same logical name, the mapping from the configuration file specified with -fl takes precedence. +force_celldefine Forces the use of the `celldefine directive. -incdir <path> Specifies the directory to be searched for files included with the `include directive. +incdir<+path>[<+path> ...] Specifies directories to be searched for files included with the `include directive. Multiple directories specified with one +incdir switch should be separated with the (+) sign. -j Forces the strict LRM mode. Informal extensions to the LRM syntax are not allowed.

433

ALINT

Macro Command Reference

-l <library> Sets an alternative binary library to be searched for unknown units. -lc <lib_cfg> Sets the library configuration file to <lib_cfg>. The <lib_cfg> string should contain both the directory path and the file basename, i.e. library.cfg. Mappings in the file specified with the -lc argument may be overridden by mappings in the file specified with the -fl argument. -lcu Prints a list of all successfully compiled units (modules, classes, packages, etc.). If omitted, the compiler prints only a list of top modules and $root top modules. +libext+<suffix>[+<suffix>[...]] Sets extensions for source files in the source library directory. Multiple extensions specified with one +libext+ should be separated with the + sign. -msg <level> Sets message printing level. Typical values are: 0 (quiet), 5 (warnings only; warnings are printed in blue) and 9 (all messages). -o <directory> Sets output directory to <out_dir>. -quiet Limits compiler output to errors and warnings. -refresh <library_name> Refreshes the contents of a library created with an earlier version of the compiler. This is needed if the library format changes between subsequent releases of ALINT. Libraries created with earlier versions of the compiler have to be recompiled from sources. NOTE: Libraries can only be refreshed on the same architecture ( x86, x86_64) where they were originally compiled. This is a known limitation. -sv2k5 Forces the compiler to conform to SystemVerilog IEEE 1800-2005. If this argument is omitted, the compiler will accept selected SystemVerilog constructs that are listed in the IEEE Std 1800-2009 standard. -sysincdir <directory> Specifies a single path to the system include directory. System include directory is searched for files included with the `include <filename> directive when the file name is placed in the angled brackets. To specify multiple system directories, use the -sysincdir argument multiple times (once for each directory) or the +sysincdir+<directory> argument. Multiple specification of this argument is allowed. This is ALINT-specific C-like preprocessor extension. See Preprocessor Extensions for details. +sysincdir+<directory> Allows specifying multiple paths to the system include directories. Multiple system include directories are searched for files included with the `include <filename> directive when the file name is placed in the angled brackets. Multiple system directories can be chained with multiple plus signs, for example: +sysincdir+dir1+dir2 will add directories dir1 and dir2 to the search path. Multiple specification of this argument is allowed. This is ALINT-specific C-like preprocessor extension. See Preprocessor Extensions for details.

434

ALINT

Macro Command Reference

-time Prints the total compilation time before exiting. The wall time (not the CPU time) is shown. -timescale <timeunit>/<timeprecision> Sets the timescale for Verilog modules. This argument has effect only if the timescale is not set in the source code with the Verilog `timescale directive (or with the SystemVerilog `timeunit and `timeprecision directives). -u Converts regular Verilog identifiers to uppercase. -v <filename> Specifies the name of a source library file. -v95 Disables LRM 1364-2001 and SystemVerilog extensions. Only Verilog'95 constructs are allowed. -v2k Disables SystemVerilog extensions. Only Verilog 2001 constructs are allowed. -v2k5 | -v2005 Forces the compiler to conform to IEEE Std 1364-2005. SystemVerilog extensions are not allowed. -version Prints the name of the compiler (Verilog/SystemVerilog compiler), the version, the build number, and the build date. -w | -work <lib_name> Sets the working library name to <lib_name>. -y <path> Sets the path to a source library. If source files have an extension, it should be specified with the +libext+ argument. <filename> [<filename> ...] The name of the source file to be compiled. Several file names can be specified separated by spaces.

Examples
alog -f cmdline.txt

Invokes the alog command, all command line arguments are read from the cmdline.txt file.
alog -refresh oldlib

Refreshes the contents of the oldlib library to make it compatible with the current release of ALINT.

435

ALINT

Macro Command Reference

amap command
Creates or removes library mappings and library links stored in library.cfg files. Library mappings map logical names onto library index files (.lib). Library links import mappings from library.cfg file located in other directories. The amap command modifies the library.cfg file located in the current directory. If the current directory does not contain the library.cfg file, the amap command creates it automatically. The only exception to this rule is when the -global argument is used. It forces amap to modify the library.cfg file located in the vlib subdirectory of the ALINT installation directory. All library.cfg files created by the amap command contain a link to the global library.cfg file, i.e. the file located in the vlib subdirectory of the ALINT installation directory. This ensures that mappings visible in the vlib subdirectory are also visible in the current directory. The amap command can also be used to display the mapping for a given library (specified by its logical name).

Syntax
amap [-del] [-global] [-re] <logical_name> [<physical_name>] or amap [-link|-unlink] <directory>

Arguments
-del Deletes the mapping for the specified logical name. Mappings can be deleted both for libraries mapped in the library.cfg file located in the current directory and mappings imported from library.cfg located in another directory. If the mapping is imported from another file, it cannot be deleted (see -link). -global Creates mapping in the global library.cfg file rather than the library.cfg file in the current directory. <logical_name> The logical name of the library to be mapped or unmapped. <physical_name> The name of the library index file with the .lib extension (and preceded with the path). If the .lib extension is omitted, the last section of the path is interpreted as the directory name and it is assumed that the index file is located inside this directory, has the same name as the directory and the .lib extension. If this argument is omitted, the command will display the mapping for the specified <logical_name>. -link Adds a link to the library.cfg file in the specified <directory>. All mappings from the linked library.cfg file are imported and become visible in the current directory. -re

436

ALINT

Macro Command Reference


Forces amap to return an error if it fails to create or delete a mapping. This has no effect if the command is typed in the Console but if the failure happens in a macro, the macro execution will be aborted. By default amap only prints an error message but does not return an error so that macros continue to run. Note that creating the same mapping twice never causes an error. Using -re with either -link or -unlink does not cause a syntax error, however, the -re argument has no effect. (A failure to add or remove a link always triggers an error and aborts macro execution.)

-unlink Removes a link to the library.cfg file from the specified <directory>. <directory> The path to the directory with the library.cfg file that will be linked or unlinked.

Examples
amap ieee

Shows the mapping for the ieee library (ieee is the logical name).
amap mem work/work.lib

Maps the logical name mem to library work/work.lib.


amap mem work

Maps the logical name mem to library work/work.lib. Note that the name of the library file (i.e. work.lib) is appended automatically to the directory name.
amap -del test

amap -del test Removes mapping for the logical name test.
amap -link /home/designs

Imports mappings from the library configuration file (library.cfg) located in the /home/designs directory.

437

ALINT

Macro Command Reference

asim command
Invokes design elaboration. This includes building the design hierarchy, establishing connections between design units, and computing initial values for all objects. The first group of arguments is related to the ALINT engine. NOTE: The asim command can also be accessed from the OS shell as vsim or vsim.exe. See the description of the vsim command for details.

Syntax
asim [-alint] [-alint_avdb <filename>] [-alint_gclk <clock_signal> [...]][-alint_gclkjoin <clock_signal_1> <clock_signal_2>] [-alint_grst <reset_signal>] [-alint_exclusions <filename>][-alint_incremental][-alint_maxrulewarn <number>|no] [-alint_maxwarn <number>|no] [-alint_plugins_file <config_file>] [-alint_policy <policy_name>] [-alint_policy_path <directory>] [-alint_pva omit|feedback] [-alint_report console|null|<file>] [-alint_ruleset_path <directory>] [-alint_synthesislog <filename>] [-relax][-lib <library_name>][-L <library_name>] [-PL <library_name>] [-ieee_nowarn][-g<name=value>] [-G<name=value>] [-version]

ALINT Arguments
-alint Enables lint checks by the ALINT engine. The source files need to be compiled with the -alint and -alint_elabchecks arguments for this to work. -alint_avdb <filename> Sets the target AVDB file for violation reports. AVDB file (ALINT Violations DataBase) is a storage containing ALINT violations detected during a single linting session. This database allows post-linting model analysis, eliminating the need for running ALINT again and again to recall the violations collected in other parts of project. Once ALINT session results are saved to AVDB file, working with violation messages becomes more convenient. For example, it is possible to display filtered subset of violations in the desired order - using the avdb2txt command, or compare results of different linting sessions by using the avdbcompare command, or generate coloured HTML report using avdb2html command, or generate CSV report using avdb2csv for further processing in third-party software. -alint_gclk <clock_signal> Specifies a global clock signal. Multiple signals can be specified with multiple -alint_gclk arguments. -alint_gclkjoin <clock_signal_1> <clock_signal_2> Indicates ALINT engine to consider the FFs controlled with the specified clock signals as belonging to the same clock domain. -alint_grst <reset_signal> Specifies a global reset signal. Multiple signals can be specified with multiple -alint_grst arguments.

438

ALINT

Macro Command Reference

-alint_exclusions <filename> Defines the name of .alintexclusions file. The file contains information about the elements (files, units, instances) that should be skipped during the linting session. See Exclusions Files section for details. -alint_incremental Using this argument speeds up the repetitive design analysis. This option enables caching the intermediate internal data built during elaboration-time phase. If there are no essential changes in the design structure, then the intermediate data from the previous elaboration-time session is re-used. This option has a significant impact on the speed of subsequent runs. A different policy can be quickly applied to the design without re-computing most of the internal data. This optimization has Beta status in this release, thus the -alint_incremental option is not enabled by default. Use this argument at your own risk (it may cause stability issues). -alint_maxrulewarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine for any single rule. If the literal none is used, no limit is imposed and all warnings of every violated rule are reported. Note that total number of ALINT warnings still may be limited by the -alint_maxwarn. -alint_maxwarn <number>|none Sets the limit for the number of warnings reported by the ALINT engine. If the literal none is used, no limit is imposed and all warnings are reported. -alint_plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -alint_policy <policy_name> Selects the custom linting policy - ALINT active policy. For more information about defining policies in the ALINT Configuration Files see the help on ALINT Policy Configuration. -alint_policy_path <directory> Defines a policy search directory. Multiple policy directories may be specified using multiple -alint_policy_path arguments. These directories are used by the ALINT engine to look for the active policy specified in the -alint_policy argument and its inherited policies, in case they are not found in the working directory. -alint_pva omit|feedback Allows to choose between two interpretation strategies for previous value assignments (out = out); this is used to make the ALINT behavior match the behavior of either FPGA or ASIC synthesis tools. -alint_report console|null|<file> Specifies the output of the violation report target. -alint_ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -alint_ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in an active policy specified in the -alint_policy argument, in case they are not found in the working directory. -alint_synthesislog <filename> Lists external and internal clocks/resets that were detected in the design; clock domain crossings accompanied by the detailed information on source-destination and on destination-source registers; instances and the number of equivalent logic gates required to implement each instance; storage

439

ALINT
element inferences and top-level interface port connections analysis.

Macro Command Reference

Arguments (not language specific)


-G<name=value> Assigns values to VHDL generics and Verilog parameters. Overrides values that are assigned in VHDL generic maps, Verilog instantiations or through the Verilog defparam statement. Other than that, the behavior is the same as for the -g argument. -g<name=value> Assigns values to VHDL generics and Verilog parameters that are not assigned values in VHDL generic maps, Verilog instantiations or through the Verilog defparam statement. The name can be preceded with a hierarchy path, for example:
-g/UUT/DISPB_4_OMUX/TimingChecksOn=false

If the hierarchical path is omitted, the argument applies to all generics and/or parameters, for example:
-gTimingChecksOn=false

If multiple generics and/or parameters need to be assigned values, the -g argument should be used multiple times, for example:
-gTimingChecksOn=true -g MsgOn=false

-L <library_name> In Verilog, this argument allows specifying additional libraries that should be searched for units instantiated in Verilog. The elaboration engine resorts to libraries specified with -L only to search for units that were neither bound during the compilation-time linting nor would be found in the library where the top-level design unit is located. In VHDL ALINT by default binds units during compilation-time litning. If for some reasons instantiation bindings were not determined at compilation-time, you can still instruct the engine to search and bind components during elaboration-time. The -L argument allows specifying additional libraries that should be searched for VHDL units. The search is performed if the following conditions are met: The units were not bound during compilation-time linting. They cannot be found in a library where the top-level design unit is located They cannot be found in all other libraries that are visible by means of the library clause No libraries are specified with the -PL argument Multiple libraries should be specified with multiple -L arguments both in VHDL and Verilog. -lib <library_name> Specifies the logical name of the library containing the top-level design unit. If omitted, the current working library is assumed. -PL <library_name> Similar to -L however, the libraries specified with this argument are searched before libraries specified with the -L argument. In Verilog, -PL overrides bindings determined at compilation-time, i.e. if a given unit was visible during the compilation-time linting and another unit with the same name is also available in a library specified with the -PL argument, then the unit from the library specified by -PL will be bound at elaboration-time. In VHDL, the -PL argument takes effect if no instantiation bindings were determined

440

ALINT

Macro Command Reference


at compilation-time stage. Multiple libraries should be specified with multiple -PL arguments.

-version Returns the name of the application (ALINT), the version number, and the build date.

Arguments (VHDL)
-ieee_nowarn Disables warning generation from IEEE libraries. -relax Relaxes strict requirements related to 32-bit integers and the conv_integer function that requires an unsigned argument. The conv_integer function (located in the std_logic_arith) package allows unsigned arguments to be 31-bit wide at most. Passign a 32-bit wide argument causes a runtime error. When -relax is used, the elaborator treats the 32-nd bit as the sign bit and allows to make the assignment. See -relax for the acom command for information on 32-bit literals.

Example
asim bjack_tb -alint

Performs elaboration-time linting with the bjack_tb unit selected as a top-level. NOTE: The asim command can run elaboration-time linting for multiple top-level modules. But multiple top-level modules cannot come from different libraries. To run elaboration-time linting for several top-level modules from different libraries (e.g. user defined top-level module and glbl from Xilinx/Unisim library) following workarounds are possible: Create a wrapper for your top-level module and glbl and instantiate it as a top-level from single (working) library.

Example
module super_top; glbl glbl(); top top(); endmodule vlog -work work super_top.v ... vsim super_top

Compile a glbl() module into your working library.

441

ALINT

Macro Command Reference

Example
vlog -work work {$path2glbl/glbl.v} ... vsim top glbl

442

ALINT

Macro Command Reference

avdb2csv command
Converts a binary database with ALINT violations (.avdb) to a CSV (comma-separated value) report. Similar to avdb2txt, but the -report argument is required. The violations database can be created when the -alint_avdb argument is passed to the alint, alog, acom, or asim command.

Syntax
avdb2csv <filename> [-order|order_asc|order_desc origin|rule|rulelevel|severity|source] [[-summary severity |rule|rulelevel|unit|instance|source|policy] [-instance_regex {<instance_name>}] [-unit_regex {<design_unit_name>}] [-rule_regex {<rule_name>}] [-source_regex {<source_name>}] [-separator "<separator_name>"] [-new {<amount>|none|all}] [-changed{<amount>|none|all}] [-revised {<amount>|none|all}] [-unchanged {<amount>|none|all}] [-maxwarn <amoubt>|none] [-maxrulewarn <amount>|none] [-report <filename>] [-policy_path <directory>] [-ruleset_path <directory>] [-plugins_file <config_file>] [-unit <design_unit_name>] [-instance <inst_name>] [-minseverity {info | warning | critical | error}] [-maxseverity {info | warning | critical | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel rule|r1|r2|r3|sug]-regex_filters... | -help

Arguments
<filename> The name of the database file with ALINT messages. This argument is compulsory and must be placed immediately after the name of the command. -changed <number>|all Selects only changed rule violations - i.e. internally marked as changed in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then changed violations count will be limited to the specified value. If the predefined value all is specified, then all changed violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -instance <instance> Limits the scope of the dump to a specific design region. This argument can be used only for AVDB databases that contain checks from the elaboration stage. -instance_regex {<instance>} Same as -instance, but the argument is processed as regular expression. The argument must be enclosed in braces. -maxseverity <level> Sets the maximum severity level. Messages with the severity level higher than specified will be filtered

443

ALINT
out from the output.

Macro Command Reference

-minseverity <level> Sets the minimum severity level. Messages with the severity level lower than specified will be filtered out from the output. -maxrulewarn <number> | none Limits the maximum number of total rule violations listed for a single rule. -maxwarn <number> | none Limits the maximum number of total rule violations listed. -unit <unit> Filters the output by unit name. In case of using * and/or ? wildcards - enclose the argument in single-quotes or double-quotes. -unit_regex {<unit>} Same as -unit, but the argument is processed as regular expression. The argument must be enclosed in braces. -new <number>|all Selects only new rule violations - i.e. internally marked as new in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value all is specified, then all new violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -order|order_asc|order_desc origin|rule|rulelevel|severity|source Controls the order of violation messages output: order - sort in ascending order order_asc - same as -order - sort in ascending order order_desc - sort in descending order Sort order criterion is a predefined word that specifies a violation property, by which the sorting should be performed. Default sort order is by violation source point, ascending. -policy <policy> Limits the output to rules from the specified policy. -policy_path <directory> Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. -plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -regex_filters Turns on processing of all filters as regular expressions. -report <filename> Required argument that specifies the name of the output report file.

444

ALINT

Macro Command Reference

-revised <number>|all Selects only revised rule violations - i.e. internally marked as revised in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then revised violations count will be limited to the specified value. If the predefined value all is specified, then all revised violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -rule <rule_name> Limits the output to the specified rule. Rules can be specified by external names (e.g. STARC_VLOG.1.1.1.3) or internal names (e.g. STARC_VLOG.STARC_KEYWORDS). -rule_regex {<rule_name>} Same as -rule, but the argument is processed as regular expression. The argument must be enclosed in braces. -rulelevel rule|r1|r2|r3|sug Limits the output to specified rule level. Rule levels are: rule (Rule), r1 (Recommendation 1), r2 (Recommendation 2), r3 (Recommendation 3), or sug (Suggestion). -ruleset <ruleset> Limits the output to the specified ruleset. -ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. -separator "<text>" Sets the specified text as the separator for CSV format. Default separator is semicolon (";"). -source <source> Limits the output to violations detected in the specified source file. -source_regex {<source>} Same as -source, but the argument is processed as regular expression. The argument must be enclosed in single-quotes or double-quotes. -summary origin|policy|rule|rulelevel|severity|source Prints a summary according to specified criterion/criteria. Summary tree may be built combining several criteria. -unchanged <number>|all Selects only unchanged rule violations - i.e. internally marked as unchanged in source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then unchanged violations count will be limited to the specified value. If the predefined value all is specified, then all unchanged violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected.

445

ALINT

Macro Command Reference

avdb2html command
Converts a binary database with ALINT violations (.avdb) to an HTML report. Similar to avdb2txt, but the -report argument is required. The violations database can be created when the -alint_avdb argument is passed to the alint, alog, acom, or asim commands.

Syntax
avdb2html <filename> [{-order | -order_asc | -order_desc} {severity | rule | rulelevel | origin | source}][-instance_regex <instance_name>] [-unit_regex <design_unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] [-new {<amount> | none | all}] [-changed {<amount> | none | all}] [-revised {<amount> | none | all}] [-unchanged {<amount> | none | all}] [-maxwarn {<amount> | none}] [-maxrulewarn {<amount> | none}] [-report <filename>] [-policy_path <directory>] [-ruleset_path <directory>] [-plugins_file <config_file>] [-unit <design_unit_name>] [-instance <inst_name>] [-minseverity {info | warning | critical | error}] [-maxseverity {info | warning | critical | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel rule|r1|r2|r3|sug] -regex_filters ... | -help

Arguments
<filename> The name of the database file with ALINT messages. This argument is compulsory and must be placed immediately after the name of the command. -changed <number>|all Selects only changed rule violations - i.e. internally marked as changed in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then changed violations count will be limited to the specified value. If the predefined value all is specified, then all changed violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -instance <instance> Limits the scope of the dump to a specific design region. This argument can be used only for AVDB databases that contain checks from the elaboration stage. -instance_regex {<instance>} Same as -instance, but the argument is processed as regular expression. The argument must be enclosed in braces. -maxseverity <level> Sets the maximum severity level. Messages with the severity level higher than specified will be filtered out from the output. -minseverity <level> Sets the minimum severity level. Messages with the severity level lower than specified will be filtered out

446

ALINT
from the output. -maxrulewarn <number> | none Limits the maximum number of total rule violations listed for a single rule. -maxwarn <number> | none Limits the maximum number of total rule violations listed.

Macro Command Reference

-new <number> | all Selects only new rule violations - i.e. internally marked as new in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value all is specified, then all new violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -order|order_asc|order_desc instance|module|rule|rulelevel|severity|source Controls the order of violation messages output: order sorts in ascending order order_asc same as -order - sorts in ascending order order_desc sorts in descending order Sort order criterion is a predefined word that specifies a violation property, by which the sorting should be performed. Default sort order is by violation source point, ascending. -policy <policy> Limits the output to rules from the specified policy. -policy_path <directory> Defines policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. -regex_filters Turns on processing of all filters as regular expressions. -report <filename> Required argument that specifies the name of the output report file. -revised <number> | all Selects only revised rule violations - i.e. internally marked as revised in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then revised violations count will be limited to the specified value. If the predefined value all is specified, then all revised violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -rule <rule_name> Limits the output to the specified rule. Rules can be specified by external names (e.g. STARC_VLOG.1.1.1.3) or internal names (e.g. STARC_VLOG.STARC_KEYWORDS). -rule_regex {<rule_name>} Same as -rule, but the argument is processed as regular expression. The argument must be enclosed in braces. -rulelevel rule|r1|r2|r3|sug

447

ALINT

Macro Command Reference


Limits the output to specified rule level. Rule levels are: rule (Rule), r1 (Recommendation 1), r2 (Recommendation 2), r3 (Recommendation 3), or sug (Suggestion).

-ruleset <ruleset> Limits the output to the specified ruleset. -ruleset_path <directory> Defines ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. -plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -source <source> Limits the output to violations detected in the specified source file. -source_regex {<source>} Same as -source, but the argument is processed as regular expression. The argument must be enclosed in braces. -unchanged <number>|all Selects only unchanged rule violations - i.e. internally marked as unchanged in source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then unchanged violations count will be limited to the specified value. If the predefined value all is specified, then all unchanged violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -unit <unit> Filters the output by unit name. -unit_regex {<unit>} Same as -unit, but the argument is processed as regular expression. The argument must be enclosed in braces.

448

ALINT

Macro Command Reference

avdb2txt command
Converts a binary database with ALINT violations (.avdb) to a text report.By default the report is printed to the Console. If the -report argument is used, the output is redirected to a text file. The violations database can be created when the -alint_avdb argument is passed to the alint, alog, acom, or asim command.

Syntax
avdb2txt <filename> [{-order | -order_asc | -order_desc} {severity | rule | rulelevel | origin | source}] [-instance_regex <instance_name>] [-summary {severity | rule | rulelevel | unit | instance | source | policy}] [-unit_regex <design_unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] [-new {<amount> | none | all}] [-changed {<amount> | none | all}] [-revised {<amount> | none | all}] [-unchanged {<amount> | none | all}] [-maxwarn {<amount> | none}] [-maxrulewarn {<amount> | none}] [-report <filename>] [-policy_path <directory>] [-ruleset_path <directory>] [-plugins_file <config_file>] [-unit <design_unit_name>] [-instance <inst_name>] [-minseverity {info | warning | critical | error}] [-maxseverity {info | warning | critical | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel {rule | r1 | r2 | r3 | sug}] -regex_filters ... | -help

Arguments
<filename> The name of the database file with ALINT messages. This argument is compulsory and must be placed immediately after the name of the command. -changed <number>|all Selects only changed rule violations - i.e. internally marked as changed in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then changed violations count will be limited to the specified value. If the predefined value all is specified, then all changed violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -instance <instance> Limits the scope of the dump to a specific design region. This argument can be used only for AVDB databases that contain checks from the elaboration stage. -instance_regex {<instance>} Same as -instance, but the argument is processed as regular expression. The argument must be enclosed in braces. -maxseverity <level> Sets the maximum severity level. Messages with the severity level higher than specified will be filtered out from the output. Available levels are: info|warning|critical|error. -minseverity <level>

449

ALINT

Macro Command Reference


Sets the minimum severity level. Messages with the severity level lower than specified will be filtered out from the output. Available levels are: info|warning|critical|error.

-maxrulewarn <number>|none Limits the maximum number of total rule violations listed for a single rule. -maxwarn <number>|none Limits the maximum number of total rule violations listed. -new <number>|all Selects only new rule violations - i.e. internally marked as new in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value all is specified, then all new violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -order|order_asc|order_desc origin|rule|rulelevel|severity|source Controls the order of violation messages output: order sorts in ascending order order_asc same as -order - sorts in ascending order order_desc sorts in descending order Sort order criterion is a predefined word that specifies a violation property, by which the sorting should be performed. Default sort order is by violation source point, ascending. -policy <policy> Limits the output to rules from the specified policy. -policy_path <directory> Defines policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. -regex_filters Turns on processing of all filters as regular expressions. -report <filename> Specifies the name of the output log file. If omitted, ALINT messages are printed to the Console. -revised <number>|all Selects only revised rule violations - i.e. internally marked as revised in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then revised violations count will be limited to the specified value. If the predefined value all is specified, then all revised violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -rule <rule_name> Limits the output to the specified rule. Rules can be specified by external names (e.g. STARC_VLOG.1.1.1.3) or internal names (e.g. STARC_VLOG.STARC_KEYWORDS). -rule_regex {<rule_name>} Same as -rule, but the argument is processed as regular expression. The argument must be enclosed in braces.

450

ALINT

Macro Command Reference

-rulelevel rule|r1|r2|r3|sug Limits the output to the specified rule level. Rule levels are:rule (Rule), r1 (Recommendation 1), r2 (Recommendation 2), r3 (Recommendation 3), or sug (Suggestion). -ruleset <ruleset> Limits the output to the specified ruleset. -ruleset_path <directory> Defines ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. -plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -source <source> Limits the output to violations detected in the specified source file. -source_regex {<source>} Same as -source, but the argument is processed as regular expression. The argument must be enclosed in braces. -summary origin|policy|rule|rulelevel|severity|source Prints a summary according to specified criterion/criteria. Summary tree may be built combining several criteria. -unchanged <number>|all Selects only unchanged rule violations - i.e. internally marked as unchanged in the source AVDB file. This filter may be applied only to AVDB file containing a comparison result generated by the avdbcompare command. If <number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value all is specified, then all unchanged violations will be listed. If <number> is less than or equal to zero, then no violations of this kind will be selected. -unit <unit> Filters the output by unit name. -unit_regex {<unit>} Same as -unit, but the argument is processed as regular expression. The argument must be enclosed in braces.

451

ALINT

Macro Command Reference

avdbcompare command
Compares two ALINT violations database files (.avdb). Violations collected during two linting sessions are analyzed to detect new, revised and changed violations. Different filters may be applied to limit the comparison. The result of comparison maybe either shown in the Console (default), or saved to an .avdb and/or plain text file. The violations database can be created when the -alint_avdb argument is passed to the alint, alog, acom, or asim command.

Syntax
avdbcompare <old_file.avdb> <new_file.avdb> [{-order | -order_asc | -order_desc} {severity | rule | rulelevel | origin | source}] [-new {<amount> | none | all}] [-changed {<amount> | none | all}] [-revised {<amount> | none | all}] [-unchanged {<amount> | none | all}] [-maxrulewarn {<amount> | none}] [-report <filename>] [-summary <filename>] [-o <filename>] [-policy_path <directory>] [-ruleset_path <directory>] [-plugins_file <config_file>] [-unit <design_unit_name>] [-instance <inst_name>] [-minseverity {info | warning | critical | error}] [-maxseverity {info | warning | critical | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel rule|r1|r2|r3|sug] -regex_filters [-instance_regex <instance_name>] [-unit_regex <design_unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] ... | -help

Arguments
<old_file.avdb> <new_file.avdb> The names of the database files with ALINT messages. These arguments are compulsory and must be placed immediately after the name of the command. -changed <number>|all Selects only changed rule violations - i.e. detected in both compared AVDB files, but with different parameter values or details count. If <number> value is a positive integer number, then changed violations count will be limited to the specified value. If the predefined value all is specified, then all changed violations will be saved to comparison result and comparison report. If <number> is less than or equal to zero, then no violations of this kind will be selected. -instance <instance> Limits the scope of the comparison to a specific design region. This argument can be used only for AVDB databases that contain checks from the elaboration stage. -instance_regex <instance_name> Selects all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. -maxseverity <level> Sets the maximum severity level. Messages with the severity level higher than specified will be filtered out from the comparison.

452

ALINT

Macro Command Reference

-maxrulewarn <number> | none Sets the maximum number of total rule violations listed for a single rule. -minseverity <level> Sets the minimum severity level. Messages with the severity level lower than specified will be filtered out from the comparison. -new <number>|all Selects only new rule violations - i.e. detected only in the second specified (newer) AVDB file. If <number> value is a positive integer number, then new violations count will be limited to the specified value. If the predefined value all is specified, then all new violations will be saved to comparison result and comparison report. If <number> is less than or equal to zero, then no violations of this kind will be selected. -o <filename> Specifies the target AVDB file for comparison result output. This file may be used later for generating filtered/ordered text report using avdb2txt command. If omitted, result is saved to a file named "<old_file>new_file_compare_report.avdb", where <old_file> and <new_file> are names of the input AVDB files. -order|-order_asc|-order_desc instance|module|rule|rulelevel|severity|source Controls the order of violation messages output: order sorts in ascending order order_asc same as -order - sorts in ascending order order_desc sort in descending order Sort order criterion is a predefined word that specifies a violation property, by which the sorting should be performed. Default sort order is by violation source point, ascending. -policy <policy> Limits the comparison to rules from the specified policy. -policy_path <directory> Defines policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. -regex_filters ... | Controls processing of all filters as regular expressions. -report <filename>|console|null Specifies a target for comparison text report. -revised <number>|all Selects only revised rule violations - i.e. detected only in the second specified (older) AVDB file. If <number> value is a positive integer number, then revised violations count will be limited to the specified value. If the predefined value all is specified, then all revised violations will be saved to comparison result and comparison report. If <number> is less than or equal to zero, then no violations of this kind will be selected. -rule <rule_link> Limits the comparison to the specified rule. Rule can be specified by name (e.g. STARC.STARC_KEYWORDS) or alias (e.g. STARC.1.1.1.3).

453

ALINT

Macro Command Reference

-rule_regex <rule_name> Selects violations detected for specified rule. Same as -rule but allows regular expression matching. -rulelevel rule|r1|r2|r3|sug Limits the comparison to the specified rule level. Rule levels are: rule (Rule), r1 (Recommendation 1), r2 (Recommendation 2), r3 (Recommendation 3), or sug (Suggestion). -ruleset <ruleset> Limits the comparison to the specified ruleset. -ruleset_path <directory> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. -plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup -source <source> Limits the comparison to violations detected in the specified source file. -source_regex <source_name> Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. -summary <filename>|console|null Specifies a target for comparison summary. -unchanged <number>|all Selects only unchanged rule violations - i.e. detected in both compared AVDB files, and with equal parameter values and details count. By default, avdbcompare does not save/display any unchanged violations, unless -unchanged filter is specified. If <number> value is a positive integer number, then unchanged violations count will be limited to the specified value. If the predefined value all is specified, then all unchanged violations will be saved to comparison result and comparison report. If <number> is less than or equal to zero, then no violations of this kind will be selected - this is the default behavior. -unit <design_unit_name> Filters the output by unit name. -unit_regex <unit_name> Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching.

454

ALINT

Macro Command Reference

avdbclear command
It is a console command that clears binary database with ALINT violations (.avdb). The contents of the database can be deleted completely or by the specific design unit(s). This command can be used to remove unnecessary violations from the database or to clear the database before running new linting session.

Syntax
avdbclear <src_file.avdb> [-instance_regex <instance_name>] [-unit_regex <design_unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] [-policy_path <directory>] [-ruleset_path <directory>] [-plugins_file <config_file>] [-unit <design_unit_name>] [-instance <inst_name>] [-minseverity {info | warning | critical | error}] [-maxseverity {info | warning | critical | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel {rule | r1 | r2 | r3 | sug}] [-source <sourcefile_name>] [-global_scope <source_name>] -regex_filters | -help

Arguments
-instance_regex <instance_name> Selects all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. -unit_regex <unit_name> Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching. -rule_regex <rule_name> Selects violations detected for specified rule. Same as -rule but allows regular expression matching. -source_regex <source_name> Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. -policy_path <filename> Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. -ruleset_path <filename> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory. -unit <unit> Selects all rule violations detected in design unit.

455

ALINT
-instance <inst_name> Selects all rule violations detected in specified instance.

Macro Command Reference

-minseverity {info | warning | critical | error} Selects all rule violations with the severity greater or equal to specified level. The option is followed by one of the predefined severity levels (without curly brackets). -maxseverity {info | warning | critical | error} Selects all rule violations with the severity less or equal to the specified level. The option is followed by one of the predefined severity levels (without curly brackets). -rule <rule_link> Selects violations detected for specified rule. -policy <policy_name> Selects all violations of rules belonging to specified policy. -ruleset <ruleset_name> Selects all violations of rules belonging to the specified ruleset. -rulelevel {rule | r1 | r2 | r3 | sug} Selects all violations of rules corresponding to the specified rule level. Argument of this filter is a mnemonic of one of five rule levels. -regex_filters ... | Controls processing of all filters as regular expressions. -plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup. -source <source> Limits the comparison to violations detected in the specified source file. -global_scope <source_name> Selects all the global scope violations in the selected file.

456

ALINT

Macro Command Reference

avdbcopy command
It is a console command that copies a binary database with ALINT violations (.avdb) to another binary database of the same type. Unless any options are specified, the file is fully copied. This command enables selection of necessary violations subset to another database - for the further analysis. This feature is extremely useful from the performance standpoint - huge database can be reduced basing on dedicated set of parameters. The database with warnings can be created when the -alint_avdb argument is passed to the alint, alog, or asim command.

Syntax
avdbcopy <src_file.avdb> <new_file.avdb> [-instance_regex <instance_name>] [-unit_regex <unit_name>] [-rule_regex <rule_name>] [-source_regex <source_name>] [-policy_path <filename>] [-ruleset_path <filename>] [-plugins_file <config_file>] [-unit <unit>] [-instance <inst_name>] [-maxseverity {info | warning | critical | error}] [-minseverity {info | warning | critical | error}] [-rule <rule_link>] [-policy <policy_name>] [-ruleset <ruleset_name>] [-rulelevel {rule | r1 | r2 | r3 | sug}][-source <sourcefile_name>][-global_scope <sourcefile_path>] -regex_filters ... | -help

Arguments
-instance_regex <instance_name> Selects all rule violations detected in specified instance(s). Same as -instance but allows regular expression matching. -unit_regex <unit_name> Selects all rule violations detected in specified unit. Same as -unit but allows regular expression matching. -rule_regex <rule_name> Selects violations detected for specified rule. Same as -rule but allows regular expression matching. -source_regex <source_name> Selects all rule violations detected in the specified source file. Same as -source but allows regular expression matching. -policy_path <filename> Defines a policy search directory. Multiple policy directories may be specified using multiple -policy_path arguments. These directories are used by the ALINT engine to look for the policy specified in the -policy argument and its inherited policies, in case they are not found in the working directory. -ruleset_path <filename> Defines a ruleset search directory. Multiple ruleset directories may be specified using multiple -ruleset_path arguments. These directories are used by the ALINT engine to look for the rulesets used in the -ruleset argument, in case they are not found in the working directory.

457

ALINT

Macro Command Reference

-unit <unit> Selects all rule violations detected in design unit. -instance <inst_name> Selects all rule violations detected in specified instance. -minseverity {info | warning | critical | error} Selects all rule violations with the severity greater or equal to specified level. The option is followed by one of the predefined severity levels (without curly brackets). -maxseverity {info | warning | critical | error} Selects all rule violations with the severity less or equal to the specified level. The option is followed by one of the predefined severity levels (without braces). -rule <rule_link> Selects violations detected for specified rule. -policy <policy_name> Selects all violations of rules belonging to specified policy. -ruleset <ruleset_name> Selects all violations of rules belonging to the specified ruleset. -rulelevel {rule | r1 | r2 | r3 | sug} Selects all violations of rules corresponding to the specified rule level. Argument of this filter is a mnemonic of one of five rule levels. -source <source_name> Selects all rule violations detected in the specified source file. -global_scope <sourcefile_path> Selects all the global scope violations in the specified file. -regex_filters ... | Controls processing of all filters as regular expressions. -plugins_file Defines a path to the additional configuration file for ALINT rule plug-in in the format shown in the section Rule Plugins Registration. It will be loaded on ALINT startup.

458

ALINT

Macro Command Reference

bye command
A synonym for the quit command.

459

ALINT

Macro Command Reference

ccomp command
Compiles and links C and C++ applications into a shared object (Linux) or a dynamic-link (Windows) library. The command is a front-end for a C/C++ compiler. The command automatically sets the appropriate include directories, library directories and library files for ALINT API rule plug-in building. By default ccomp calls gcc. The required gcc version is included in installation packages and is installed to the gcc/ (or mingw/) subdirectory of the ALINT installation directory. Under Windows, Microsoft Visual C/C++ can be used instead of gcc. The compiler used by the command (gcc or cl) must be located in a directory listed in the $PATH variable.

Syntax
ccomp [@<filename>] [-dbg] [-alintapi] [-vc6|-vc7 |-vc71 |-vc8|-vc9|-vc10] [-o <output>] [-I <include_path>] [...] [-L <library_path>] [...] [-l <library>] [...] [<additional_compiler_options>] [-verbose] [-version] <source> [...] [/link <VC_link_options>]

Arguments
@<filename> Specifies the name of a file containing arguments for the ccomp command. Arguments read from the file can be mixed with arguments specified on the command line. -dbg Puts debugging information in the output shared object library or dynamic-link library. Debugging information is required for C/C++ debug (setting C/C++ code breakpoints, line debugging, etc.). The ccomp command translates the -dbg argument into switches for the C/C++ compiler used at the back-end. When -dbg is used, the gcc compiler will be invoked with the -g3 switch instead of the -O2 switch. (When -dbg is omitted, the ccomp command invokes gcc with the -O2 switch.) When Microsoft Visual C/C++ is used, the /O2 switch is replaced with the /ZI switch. Note that ALINT C/C++ debug cannot be used with libraries created by Microsoft Visual C/C++ even if debugging information has been generated. -alintapi Sets the type of the application to an ALINT rule plug-in library. -vc6 | -vc7 | -vc71 | -vc8 | -vc9 | -vc10 Changes the C/C++ compiler. Instead of using the default gcc, the command will call Microsoft Visual Studio version 6.0, 7.0, 7.1, 8.0, 9.0, or 10.0. This argument is available only under Windows. -verbose Prints the complete command line that will be passed to the back-end compiler. -version Prints the name of the compiler (C/C++ compiler), the version, the build number, and the build date.

460

ALINT

Macro Command Reference

-o <output> Specifies the name of the output library. If omitted, the default name is liboutput.so or output.dll. If the name of the library is specified but the extension omitted, the ccomp command appends the extension automatically (.so or .dll, depending on the OS). -I <include_path> Specifies the path to a directory with include files. The argument can be used multiple times. -L <library_path> Specifies a path to a directory with libraries to be linked. The arg STARC_VHDL.1.1.1.2 rule example isn't applicable ument can be used multiple times. -l <library> Specifies the name of a library that should be linked with the output library. The argument can be used multiple times. <additional_compiler_options> Specifies any additional compiler options. The options are passed verbatim to the underlying C/C++ (gcc or Microsoft Visual Studio). <source> Specifies the name of the source file. /link <VC_link_options> Additional options for the Visual Studio linker. Note that the link options (if any) must be placed after the source file(s).

Examples
ccomp -pli -o libstructure.so structure.c

Compiles file main.c and creates ALINT rule plug-in library libruleplugin.so. The following switches (required for compiling ALINT rule plug-in library) are automatically passed to the gcc compiler by the ccomp command: -shared Produces a shared object (.so). -I<path> Adds the directory specified by <path> to the list of directories to be searched for include files. The <path> argument is a full path to the interfaces/include directory in the ALINT installation directory. This directory contains header files required by ALINT rule plug-in libraries. -D_ALDEC Defines the _ALDEC symbol.

461

ALINT

Macro Command Reference

cd command
Selects the current working directory for ALINT.

Syntax
cd [<directory>]

Arguments
<directory> The directory name, either relative or with a full path. If omitted, the current directory name with the path will be displayed.

462

ALINT

Macro Command Reference

clear command
Clears the contents of the Console window. The command can be used in either the GUI or console mode.

Syntax
clear

463

ALINT

Macro Command Reference

do command
Executes Tcl macros using the Tcl interpreter built into ALINT. Tcl macros can have arbitrary extensions, typically either .do or .tcl is used. A breakpoint or a runtime error encountered during the execution interrupts the macro and can be handled by the onerror command. The do command can also execute a part of a macro specified with the -start and -end arguments followed by line numbers. This option is unlikely to be utilized inside macros; it is, however, used by the GUI for executing a part of the macro selected in the HDL Editor. The selection (e.g. a selection with a number of compilation commands) can be executed with the Execute Selection button on the toolbar. The do command can also run Perl scripts using an external Perl interpreter. The Perl interpreter is selected automatically for files with the .pl extension. If a Perl script has another extension, you can still force the do command to use the Perl interpreter by using the -perl argument. Note that ALINT commands are embedded only in the built-in Tcl interpreter. They are not visible to the Perl interpreter.

Syntax
do [-perl|-tcl] [-start <line_number>] [-end <line_number>] <filename> [ <argument> ...]

Arguments
-perl Executes a Perl script using an external Perl interpreter. This is the default for files with the .pl extension. -tcl Executes a marco using the Tcl interpreter built into ALINT. This is the default for all files, except for files with the .pl extension. -start <line_number> Specifies the line number from which the execution of the macro should start. This option has no effect if the Perl interpreter is used. -end <line_number> Specifies the line number where the execution of the macro should terminate. This option has no effect if the Perl interpreter is used. <filename> Specifies the name of a macro file to be executed. The file name can be preceded with a full or a relative path. If no path is specified, the file is assumed to be located in the current working directory. If a macro contains a call to another macro, the nested macro file is also assumed to be in the current working directory. <argument> Specifies optional command line arguments (separated by spaces) that can be passed to the macro. Their values can be accessed in the macro with $1 ... $99 variables, where the number in the variable name is the ordinal number of the argument. If there are fewer arguments in the command line than

464

ALINT
expected by the macro, the macro execution will trigger an error.

Macro Command Reference

Examples
do run.do

Executes macro run.do.


do -start 15 -end 25 runme.do

Executes macro commands located in runme.do file from in lines 15 through 25.
do -perl run.do do run.pl

Executes Perl scripts located in files run.do and run.pl.

465

ALINT

Macro Command Reference

echo command
Displays a message. The message can be composed of any number of strings. The strings are subject to the Tcl variable expansion. The color of the message can be set with the -c argument. ALINT variables in the string are expanded. Environment variables can be accessed in macros with a dollar sign (e.g. $now) and with the $env array (e.g. $env(PATH)). If this command is invoked without parameters, it displays empty line in Console window.

Syntax
echo [-c <color>] [<string> ... ]

Arguments
-c <color> Specifies the color of the message to be displayed. The color can be either an RGB value or a name. The RGB value should be specified with a hash sign (#) followed by hex digits. One, two, three, or four digits can be used for each color: #RGB, #RRGGBB, #RRRGGGBBB, or #RRRRGGGGBBBB. Definitions of color names (e.g. steelblue or gainsboro) have been provided by the World Wide Web Consortium and are available at http://www.w3.org/TR/SVG/types.html#ColorKeywords. Color transparent represents the absence of a color. <string> The string to be displayed. Multiple strings can be used.

Examples
echo -c #ff0000 Error in file

Displays message "Error in file" in red.


echo $worklib

Displays the value of the $worklib variable. (The $worklib variable stores the name of the current working library.)

466

ALINT

Macro Command Reference

echofile command
Appends a string to the specified file. ALINT variables in the string are expanded. Environment variables can be accessed in macros with a dollar sign (e.g. $now) and with the $env array (e.g. $env(PATH)).

Syntax
echofile <file> [<message>]

Arguments
<file> The name of the destination text file. <message> The text of the message. Embracing the message string with quotation marks is optional.

Examples
Assume that the current working library is v_bjack. The following command
echofile log.txt worklib = $worklib

appends the text worklib = v_bjack to the log.txt file. If file does not exist, command creates new file with log.txt name.

467

ALINT

Macro Command Reference

exit command
A synonym for the quit command.

468

ALINT

Macro Command Reference

msginfo command
Prints a verbose description of a compiler error or warning message. The descriptions are accompanied by code samples and possible code fixtures. The text of the description printed by the command matches the description provided in the Message Reference guide available from the Help menu. Instead of printing the description, the command can display it the HTML Viewer or in the HDL Editor. When invoked with the -html argument, the command is equivalent to the Show Description option available from the pop-up menu in the Console. The descriptions are currently available only for a subset of all compiler errors and warnings.

Syntax
msginfo [-html|-txt] <id>

Arguments
-html Opens the HTML Viewer and displays message description in html format. By default, message description is printed to the Console window. -txt Opens the HDL Editor and displays message description in text format. By default, message description is printed to the Console window. <id> The ID of the message, for example COMP96_0051 or VCP7601. The ID always prefixes an error or a warning message printed by the VHDL or Verilog compiler. You do not have to type in the complete ID; it is sufficient to provide a matching substring. For example, instead of COMP96_0051, you can type in 0051 or 051. If more than one description matches the specified substring, the list of matching descriptions will be printed. For example, the following message could be printed if you typed msginfo 51:
More than one description matches pattern 51: comp96_0551, comp96_0051, comp96_0251.

469

ALINT

Macro Command Reference

onerror command
Specifies commands to be executed when a macro is interrupted by an error. To resume the macro execution, terminate the list of commands with the resume command. The onerror command can only be used in macros (it cannot be typed to the Console). The opening brace must lie in the same line as the onerror keyword. Macro execution can be resumed in an onerror statement with the resume command only.

Syntax
onerror { [<command> [; <command>] [<command>]...] }

Arguments
<command> Any ALINT command. Commands should be separated by a semicolon or a line break.

Examples
onerror { echo ERROR_IN_COMPILATION resume } acom ./src/bjack.vhd acom ./src/testbench.vhd

The error occurred during compilation involves onerror command. This command displays the message ERROR_IN_COMPILATION and resumes the macro execution.

470

ALINT

Macro Command Reference

pause command
Suspends the execution of a macro for the specified time. If this command is invoked without an argument, it suspends the macro execution for the indefinite time. The macro execution can be resumed by the resume command from the Console window. When a macro is paused, another macro can be invoked, and if that one gets interrupted, it is possible to invoke another and go on. A nesting level doesn't have any limitation. The animation on the right top corner shows that one or more macros are interrupted.

Syntax
pause [<time>]

Arguments
<time> Suspension time in seconds.

Examples
pause 5

Suspends the execution of a macro for 5 seconds.

471

ALINT

Macro Command Reference

quiet command
Enables or disables the quiet mode (and sets the $quiet variable). In the quiet mode, dialog boxes are not displayed during the execution of a macro (e.g. you are not prompted to save changes while closing a modified file). If no argument is specified, the command displays the current mode setting. The command can be used when ALINT is running in the GUI mode.

Syntax
quiet [on | off]

Arguments
on | off Enables or disables the quiet mode.

472

ALINT

Macro Command Reference

quit command
Quits ALINT. If the argument -force is used, quits ALINT without asking for confirmation. Alternatively, you can quit ALINT by using the bye or exit commands.

Syntax
quit [-code <exit_code>] [-force]

Arguments
-force Quits without asking for confirmation. If omitted, ALINT asks you for confirmation before exiting if unsaved documents are opened. -code <exit_code> Specifies the application exit code. In the Bash shell, the exit code can be accessed with the $? variable. Under Windows/cmd.exe, use %errorlevel% instead. You can also specify a variable in place of the <exit_code>. Except for returning the exit code you can also print a message explaining the reason for exiting prior to executing the quit command.

473

ALINT

Macro Command Reference

resume command
Resumes macro execution after a breakpoint, an error or pause command. Can be used in the onerror command statement. In the onerror statement the resume command resumes the macro execution interrupted by an error. Also you can invoke resume command in Console window to resume macro execution stopped by the pause command.

Syntax
resume

Arguments
None.

Examples
onerror { echo COMPILATION_ERROR resume } vlog src/gates.v vlog src/johnson8.v

The resume command allows an error message to be printed without interrupting macro command execution.

474

ALINT

Macro Command Reference

runexe command
The runexe command can only be used to run stand-alone programs. It cannot be used to run shell built-in commands.

Syntax
runexe [-wait] [-capture] <file> [<parameter> ...]

Arguments
-wait The execution of the macro containing the runexe command will be suspended until the invoked program terminates its operation. If omitted, the macro will continue its execution regardless of the state of the launched executable file. -capture If this option is used then the standard output (STDOUT) of the executed program will be redirected to the Console window. <file> The name of the file to be executed with its command line parameters. <parameter> Sets the command line parameters for the executed <file>.

Examples
runexe -capture netstat

Prints network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. The standard output is redirected to the Console window.
runexe notepad {/home/joe/ipcore/advanced_dataflow.xml}

Runs the Notepad program with parameter on Windows.


runexe perl run.pl

Runs the perl program with a parameter. The standard output is not redirected.
runexe -capture perl run.pl

Runs the perl program with a parameter. The standard output now is redirected to the Console window.

475

ALINT

Macro Command Reference

runscript command
An alias for the do command.

476

ALINT

Macro Command Reference

setlibrarymode command
Sets the access mode for the specified library.

Syntax
setlibrarymode -ro|-rw <library>

Arguments
-ro Sets the mode to read only. -rw Sets the mode to read-write. <library> Specifies the logical name of the library.

477

ALINT

Macro Command Reference

show command
Prints all instances, signals, ports and memories defined in the specified design region. If the region argument is omitted, the command prints information for the hierarchy top-level.

Syntax
show [-rec] [<region>]

Arguments
-rec Specifies that the command should list items not only from the specified region but from subregions as well. <region> Specifies the hierarchical path to the design subregion.

Examples
show /top/UUT

List all units instantiated in the /top/UUT region and all ports, signals and memories in this region.

478

ALINT

Macro Command Reference

sh command
Runs an executable or a shell built-in command.

Syntax
sh <file>|<shell_command> [<parameter>... ]

Arguments
<file> The name of the file to be executed with its command line parameters. <shell_command> The name of the shell command to be executed with its command line parameters. <parameter> Sets the command line parameters for the executable or the shell built-in command.

Examples
sh dir

Runs a shell command for listing directory contents implemented in cmd.exe on Windows.
sh ls

Runs the ls program for listing directory contents. This program is available on Linux.
sh md new_folder sh rd new_folder

Runs shell commands to create (md) and remove rd) a folder on Windows.
sh readme.txt sh readme.htm

On Windows, starts programs associated with given file types and loads the files in the programs (a text editor and a browser).

479

ALINT

Macro Command Reference

transcript command
Enables or disables printing of commands executed in a macro. If transcript is on, all commands in the executed macro are printed to the Console. If transcript is off, commands are not printed to the Console (but the output of commands is). If no argument is specified, the command displays the current transcript setting (on or off).

Syntax
transcript [on|off]

Arguments
on Enables transcript. off Disables transcript.

480

ALINT

Macro Command Reference

transcript file command


Controls writing transcript to log files. Can be used to set, query or close transcript files. Transcript can be written concurrently to many log files. New log files can be opened either in the write or in the append mode. Data written to a log file can be filtered. Transcript shown in the console can contain both commands and command output. If printing of commands has been disabled with transcript off command, only command output is shown in the Console and stored in the log file.

Syntax
transcript file [-msgtype <type> ...] [-append] [-clear] [-close] [<file>]

Arguments
-msgtype <type> Sets a filter for messages. Only messages of the specified type will be logged to the log file. To log multiple message types, repeat the argument for each message type, for example: -msgtype acom -msgtype vsim. The following message types are allowed: alint, acom, adel, adir, alib, alist, alog, amap, ccomp, library_manager, reporter, and vsim. The names of message types are for the most part self-explanatory, for example acom sets a filter for messages from the VHDL compiler, alint - for messages from the linting engine etc. -append Opens the log file specified with the <file> argument in the append mode. If omitted, the file is opened in the write mode, that is previous contents, if any, are overwritten. -clear Clear the log file specified with the <file> argument. -close Closes the log file specified with the <file> argument. <file> The name of the log file.

481

ALINT

Macro Command Reference

vcom command
A synonym for the acom command. NOTE: The vcom command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

482

ALINT

Macro Command Reference

vdel command
A synonym for the adel command. The vdel command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

483

ALINT

Macro Command Reference

vdir command
A synonym for the adir command. NOTE: The vdir command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

484

ALINT

Macro Command Reference

view command
Brings a tool window into view, creates a new instance of a document window, or starts an external viewer. The type of the window/viewer must be specified immediately after the command. If a given window does not yet exist, the command creates it. If a tool window exists but is hidden by another tab, then the command brings the window tab on top. If a tool window exists and is visible, then the command has no effect. Commands that create new windows can now be invoked with the -title argument. The argument assigns a title to a newly opened window. The window title is displayed in brackets in the window title bar. Window titles must be unique. Windows with an assigned title can be designated by that title in subsequent commands.

Syntax
view designmanager | dm | filebrowser | hde or view hde [-<type>]

Arguments
designmanager | dm Shows the Design Manager window. The window is created if it does not yet exist. filebrowser Shows the File Browser window. The window is created if it does not yet exist yet. hde Opens the HDL Editor window. The type of the document opened in the HDL Editor can be specified with an optional -<type> argument. If -<type> is omitted, the document type is set to text. library Shows the Library Manager window. The window is created if it does not yet exist. -<type> Specifies the type of the untitled file to be loaded in the HDL Editor. The -<type> argument can be used only for view hde command. The following file types can be specified: -c, -cpp, -domacro, -h, -hpp, -perl, -tcl, -txt, -verilog, and -vhdl.

Examples
view library

Shows the Library Manager window.

485

ALINT
view hde -vhdl

Macro Command Reference

Creates a new instance of the HDL Editor window; the new file created in the editor is assumed to be a VHDL file.

486

ALINT

Macro Command Reference

vlib command
A synonym for the alib command. NOTE: The vlib command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

487

ALINT

Macro Command Reference

vlint command
A synonym for the alint command. The vlint command (unlike the alint command) is also available as a stand-alone executable that can be invoked from the operating system shell.

Stand-alone vlint Executable


The vlint executable starts ALINT, either in the GUI (-gui) or in the command-line (-c) mode and then runs linting. For example, the following command typed at the OS prompt
vlint test.v

is equivalent to running the alint program, by typing


alint

at the OS prompt and then executing command


alint test.v

inside the ALINT Console. The vlint executable accepts all alint arguments and the additional arguments listed below:

Syntax (for standalone vlint command)


vlint [-c|-gui] [-l <log_file>] [<alint_arguments>] [ -do <macro> [<arguments>] | <"commands"> ]

Arguments
-c Starts ALINT in the command-line mode. -gui Starts ALINT in the graphical mode. -l <log_file> Creates a log file with the Console output immediately after the application starts. If the log file already exists, it is overwritten. Logging is not aborted when linting terminates. -do <macro> [<arguments>] | <"commands"> Runs a macro or executes macro commands. The command assumes that the first word following the -do argument is the name of a macro. If no such macro exists in the file system, then the vlint command treats the string following the -do argument as a command sequence. If a command sequence is specified, then it should be enclosed in quotes so that it is visible to the vlint command as one argument. Multiple commands should be delimited with

488

ALINT

Macro Command Reference


semicolons, in accordance with Tcl syntax rules. If the OS shell supports it, you can also separate commands with new lines. If the vlint command determines that the -do argument is followed by a macro, then all words following the macro name are assumed to be macro arguments and can be accessed inside the macro as variables $1 , $2, .... Therefore, the -do argument followed by a macro and, optionally, macro arguments must be the last argument on the command line, specified after all alint arguments.

489

ALINT

Macro Command Reference

vlist command
A synonym for the alist command. NOTE: The vlist command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

490

ALINT

Macro Command Reference

vlog command
A synonym for the alog command. NOTE: The vlog command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

491

ALINT

Macro Command Reference

vmap command
A synonym for the amap command. NOTE: The vmap command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

492

ALINT

Macro Command Reference

vsim command
A synonym for the vsim command. NOTE: The vsim command is a standalone executable and can also be invoked directly from the operating system shell. This requires proper environment setup.

493

Installation and Licensing

Linux

Software and Hardware Requirements for Linux

Linux (32-bit version) The 32-bit version of ALINT for Linux requires: A PC with an x86 CPU Linux kernel 2.4 or 2.6 and GNU C Library version 2.3.2 or newer. The 32-bit version was verified on the following Linux distributions: RHEL (RedHat Enterprise Linux) release 5, RHEL (RedHat Enterprise Linux) release 4, RHEL (Red Hat Enterprise Linux) release 3 (including updates 1 through 4), Fedora release 1.0 through 8.0, Debian 3.1, Debian 4.0, Red Hat 9.0, Red Hat 8.0, Red Hat 7.3, Red Hat 7.2, Mandrake 9.2, Suse 9.1, Ubuntu 7, Ubuntu 8, Ubuntu 9, Ubuntu 10, Aurox 9.1, Aurox 9.3. ALINT cannot run on Red Hat 7.2 or Debian 3.0 because those distributions use an older version of the GNU C Library. A hard disk drive with at least 600 MB of free space. The amount of free space can be checked with the df command at the shell prompt. If ALINT is running on an NFS share, NFS locks must be available and properly configured. If the file locking mechanism is not available or is configured incorrectly (e.g. not all required services are enabled), ALINT may display incorrect behavior, for example report errors at the initialization of Verilog elaboration process, etc. Note that the NFS requirement applies to ALINT working directory rather than the directory where ALINT is installed. NOTE: The amount of available physical memory may have influence on linting performance. If the operating system needs to swap data in and out during linting process, then its speed may be severely degraded.

Linux (64-bit version) The 64-bit version of ALINT for Linux requires: A PC with an x86_64 CPU (AMD Opteron or compatible). Linux kernel 2.4 or 2.6 and libc 2.3.5 or newer. The 64-bit version was verified on the following Linux distributions: RHEL (RedHat Enterprise Linux) release 3 and 4, Fedora 3.0, Fedora 2.0, Fedora 1.0, and Suse 9.1.

494

ALINT

Installation and Licensing

NOTE: The 64-bit version of ALINT on Linux may crash on selected Linux distributions if the MALLOC_CHECK_ environment variable is set. This is caused by a bug in the 64-bit version of the glibc library. The bug affects all multi-threaded applications, not just ALINT. The problem is known to be reproducible on unpatched versions of Red Hat Enterprise Linux 5, CentOS 5.4, and CentOS 5.5. Note that variable MALLOC_CHECK_ is typically not set in production systems. (It is used to enable debugging of memory allocations.) If you happen to use an affected distribution, make sure that MALLOC_CHECK_ is unset or update/patch your distribution. A hard disk drive with at least 650 MB of free space. The amount of free space can be checked with the df command at the shell prompt. Network adapter. If ALINT is running on an NFS share, NFS locks must be available and properly configured. If the file locking mechanism is not available or is configured incorrectly (e.g. not all required services are enabled), ALINT may display incorrect behavior, for example report errors at the initialization of Verilog elaboration process, etc. Note that the NFS requirement applies to ALINT working directory rather than the directory where ALINT is installed. NOTE: The amount of available physical memory may have influence on linting performance. If the operating system needs to swap data in and out during linting process, then its speed may be severely degraded.

Installation Package
The main installation package consists of the following files: Install.sh is the main installation script. It will unpack main installation archive and configure ALINT. alint<version_number>_<platform>.tar.gz is a compressed archive with ALINT files. The name of the archive contains the version and build numbers and the name of the platform (linux or linux64). gcc-<version_number>_<platform>.tar.gz package contains the gcc compiler. The gcc compiler is required for compiling user-defined rule plug-in libraries (see Custom Rules section for details). Note that ALINT requires the gcc version included in the installation package. Applications developed with other versions of gcc may cause a variety of problems and are not supported. The gcc installation in ALINT will not interfere with gcc installed in the system. Additional rule plug-ins installation package: Install-alint-plugin.sh is the plug-ins installation script. It will unpack plug-in installation archives to ALINT installation directory (ALINT must be installed first). alint<version_number>_<plugin_name>_<platform>.tar.gz is a compressed archive with certain ALINT plug-in files. The name of the archive contains the version and build numbers, plug-in name and the name of the platform (linux or linux64). The .tar.gz archives must not be unpacked manually. They will be unpacked by the Install.sh (Install-alint-plugin.sh) script during installation.

495

ALINT

Installation and Licensing

Running the Installation Script


Before starting the installation, you should make sure that all relevant files have been copied to the same directory. You need the Install.sh script, the alint*.tar.gz archive with ALINT (the main and probably some plug-in archives) and, optionally, the gcc*tar.gz package. (See Installation Package for details.) To start the installation, run the ./Install.sh script. ./Install.sh If a permission denied message is displayed, use the following command: chmod u+x Install.sh After the Install.sh script starts, it will clear the contents of the console, display a summary of options (the version number, the installation directory, etc.) and the following menu: 1 2 3 4 5 Change installation directory... Run installation process and exit... Disable GCC installation Change target platform... Abort installation process and exit...

To select and modify an option, enter the number in front of the option name. The installer will display a text prompt or another menu. By default, ALINT is installed to the alint-<version> subdirectory in the user home directory. If the installation process is started by user root, the installation script will default to /usr/local/alint-<version>. The Change target platform option is used for switching between 32-bit and 64-bit versions. The installer guesses which version you want to install based on the name of the alint<version_number>_<platform>.tar.gz package. If <platform> in the name of the .tar.gz package equals linux64, then a 64-bit version is selected; otherwise the installer defaults to the 32-bit versions. When the installation completes successfully, the installer prints the following message: ALINT system was installed successfully into <installation_directory> If an error happens during installation, the installer will display an error message and wait until you hit the Enter key. Possible causes of installation problems include: Failure to create the installation directory. Failure to unpack the installation archive due to insufficient disk space. Failure to change the configuration files.

Additional plug-ins installation When ALINT is installed (with Install.sh script) it is possible to install additional rule plug-ins. To start plug-in's installation, run lnstall-alint-plugin.sh script. After the script starts, it will clear the contents of the console, display a summary of options (the version number, the installation directory, etc.), list of available plug-ins and the menu described above. All the available plug-in will be installed unless an error happens during installation.

496

ALINT

Installation and Licensing

Note, that rule plug-in installation archive(s) (alint<version_number>_<plugin_name>_<platform>.tar.gz) must be located in the same folder where lnstall-alint-plugin.sh script runs. In this case only plug-ins are available during installation.

Silent Mode Installation To install ALINT in the non-interactive mode, pass the -s switch to the installation script. ./Install.sh -s Install.sh in the silent mode does not prompt for the directory name but installs the application to the alint/ subdirectory in the user home directory. If you do not want to use the default location, precede the -s switch with a directory path, for example: ./Install.sh /home/joe/alint -s The above command can be followed by additional switches that set other installation options: -linux Specifies that the 32-bit Linux version should be installed. Requires the alint<version_number>_linux.tar.gz package and, optionally, the gcc-<version_number>_linux.tar.gz package. -linux64 Specifies that the 64-bit Linux version should be installed. Requires alint<version_number>_linux64.tar.gz archive and, optionally, the gcc-<version_number>_linux64.tar.gz package. -no-gcc Disables gcc installation. NOTE: When silent installation mode is used all the available plug-ins (i.e. plug-in installation files from the folder where Install.sh is located ) will be installed at ones. So running lnstall-alint-plugin.sh is not required.

Post Installation Setup The installation script places all required environment settings in the etc/setenv file in the ALINT installation directory. It is advisable (but not required) to source this file in the system-wide initialization file (/etc/profile) or the personal initialization file. (~/.bash_profile, ~/.bash_login, or ~/.profile; the bash shell will execute the first personal file that is readable.) To source the file, add the following statement to the initialization file (mind the dot at the very beginning of the line): . etc/setenv Sourcing the file offers the following benefits:

497

ALINT

Installation and Licensing

The bin/ subdirectory of the ALINT installation directory is added to the $PATH variable. This allows you to start programs included in ALINT by typing their name at the command prompt in the OS shell, for example: [joe@viper ~] alint The startup may be marginally faster because the etc/setenv script does not have to be sourced. This is usually; the effect may be measurable in some corner cases such as compiling many small files one by one by calling the compilers (vcom, vlog) directly from the OS shell. NOTE: The directory where you installed ALINT must not be moved or renamed. Note that an unwanted change in the directory location may be caused by changes to the file system mount points. For example, installing ALINT to a drive mounted as /usr/local and then mounting that drive as /opt/local (possibly on a different machine) will render ALINT inoperable. Prior to starting ALINT, you must configure the license environment. See Licensing for details.

498

ALINT

Installation and Licensing

Windows

Software and Hardware Requirements for Windows


ALINT for Windows (32-bit version) requires: A PC with an x86 CPU. Windows XP, Windows Vista, or Windows 7. A hard disk drive with at least 400 MB of free space. A network adapter.

NOTE: The amount of available physical memory may have influence on linting performance.

ALINT Setup Program


The installation package consists of main installation file: ALINT-<version>.exe. The setup program prompts for the installation directory, the components to be installed, and file types to be associated with ALINT. The default installation directory is C:\Program Files\Aldec\ALINT-<version>. Additional rule plug-ins installation package contains plug-in installation files: ALINT-<version>-<plugin_name>.exe. They may be installed only if ALINT has been installed previously (with running main installation file ALINT-<version>.exe).

499

ALINT

Installation and Licensing

Licensing
Two types of licenses are available for ALINT. Basic Functional Evaluation License Commercial License

Obtaining an Evaluation License


The basic evaluation license gives access to limited number of the software basic features. To receive the license, contact Aldec or fill out the on-line download registration form and under the Evaluation License section make sure to select Please send me a free, fully functional temporary license check box. Using the evaluation license requires setting up a license server. Aldec no longer provides node-locked licenses (i.e. licenses that do not require the server and can be used only on the machine with the host ID provided at registration).

Setting Up the License Server


Prior to running ALINT, you need to set up a license server. Workstations communicate with the server to verify if a license is available. The server allows to start as many copies of ALINT as there are licenses available. A license acquired from the license server is referred to as a floating license. Setting up the server gives you the benefit of being able to run ALINT on any supported operating system on any machine that can communicate with the license server. Assuming that 5 licenses are available, you could start 2 copies of ALINT on Windows and three on Linux. After quitting ALINT on Windows, two more copies could run on Linux and so on. Information on setting up the license server is available in the online Knowledge Base in the article How to set up the ALDEC License Server. ALINT uses version 11.5 of the FLEXlm licensing software. To set up workstations to use the floating license, open the etc/setenv script (Linux) or the etc/setenv.bat batch file (Windows) in a text editor. Then, locate the line that says: ALDEC_LICENSE_FILE='/<installation_dir>/license.dat' Edit this line to read: ALDEC_LICENSE_FILE=<port.no>@<server_name_or_ip_number> where <port.no> is the number of port where ALINT is running and <server_name_or_ip_number> is the host name or the IP number of the server.

License Variables
The location of the license file (or a license server) can be stored in any of the two environment variables:

500

ALINT
ALDEC_LICENSE_FILE LM_LICENSE_FILE

Installation and Licensing

ALINT first checks the ALDEC_LICENSE_FILE variable. If, and only if, the ALDEC_LICENSE_FILE variable is not set, ALINT checks the LM_LICENSE_FILE variable. The setenv script (Linux) located in the etc/ subdirectory of the ALINT installation directory sets only the ALDEC_LICENSE_FILE variable. The etc/setenv script is sourced by all run* scripts from the ALINT installation directory (for example runalint or runalintcon). Therefore, environment settings may be overridden when ALINT starts up. Likewise, the setenv.bat batch file (Windows) located in the etc/ subdirectory of the ALINT installation directory sets only the ALDEC_LICENSE_FILE variable. The etc/setenv.bat batch file is executed whenever an application from the ALINT suite is started from the windows Start menu. It overrides environment settings from the Control Panel. Examples 1) The license server is running on port 27009 on a machine with the IP number 10.0.0.1. Set the environment variable ALDEC_LICENSE_FILE to 27009@10.0.0.1. (The variable must be set on the workstation where you use ALINT, not on the license server.) Instead of setting the variable you can also edit the etc/setenv script or etc/setenv.bat batch file. Load the file in the editor, locate the line that reads: ALDEC_LICENSE_FILE=$ALDEC_LICENSE_FILE:$ALDEC_PATH'/license/license.dat' and change it to read: ALDEC_LICENSE_FILE=27009@10.0.0.1:$ALDEC_LICENSE_FILE Under Windows, change: set ALDEC_LICENSE_FILE=%ALDEC_LICENSE_FILE%;<installdir>\license\license.dat to set ALDEC_LICENSE_FILE=27009@10.0.0.1;%ALDEC_LICENSE_FILE% You can use host names instead of IP numbers provided that the names are correctly resolved. 2) You want to use the LM_LICENSE_FILE variable to specify the license location. Edit the etc/setenv script (Linux) or the etc/setenv.bat batch file (Windows) so that the ALDEC_LICENSE_FILE variable is neither set nor exported. Make sure that the ALDEC_LICENSE_FILE variable is not set in the environment either. (ALINT will not use the LM_LICENSE_FILE variable if variable ALDEC_LICENSE_FILE is set.) After clearing ALDEC_LICENSE_FILE, you can use the LM_LICENSE_FILE variable.

501

ALINT

Installation and Licensing

License Diagnostics
ALINT comes with a utility that can check the number of available licenses and help diagnose license-related issues. The utility displays a complete information about the license, including: A detailed list of license features; each license feature allows using a certain functionality in the software, for example STARC_VHDL rules, Violation Viewer, etc. The utility lists the total number of features, the number of features in use, expiration dates, their names, and locations. The license number. The name of the environment variable used from which the location of the license server was read. The default is ALDEC_LICENSE_FILE. The value of the environment variable. Diagnostics log. There are several ways to start the utility. Use the License Diagnostics command from the Help menu in ALINT. Run the licensediagnose program located in the bin/ subdirectory of the ALINT installation directory. Try to run ALINT either in the GUI or command-line mode. If the license environment is configured incorrectly (and ALINT cannot start), the license diagnostics will be launched automatically.

GPL-licensed Software Delivered with ALINT


For convenience and a more straight-forward setup, the ALINT installation package includes several applications licensed under the GPL license, including the gcc compiler (used as the back-end for the ccomp command) and the gdb debugger. The complete text of the GPL license is available in a file located in the license/third_party directory.

502

ALINT

Installation and Licensing

How to Check Product Version


This article describes how to determine the exact version of the ALINT product installed on a system. The table below displays the list of different ways for checking the compiler, library, etc. versions. Table 1. Tool Command / Options alintId alintVersion alintVersionString Description Prints the version of the ALINT product. Prints the detailed information about the version of the ALINT product. Prints the detailed information about the vendor, product name, version, and build date. Prints the detailed information about the vendor, product name, version, and build date of the elaboration engine. Prints the name of the compiler (Verilog/SystemVerilog compiler) the version, the build number, and the build date.

ALINT version

alint -version Elaboration engine

alog -version Verilog/SystemVerilog compiler version

The Standard Version list box on the You can check the Preferences dialog box. Verilog/SystemVerilog compiler Verilog/SystemVerilog standard standard version in the Standard version Version list box in the Linting | Languages | Verilog category of the Preferences dialog box. VHDL standard version The Standard Version list box on the You can check the VHDL compiler Preferences dialog box. standard version in the Standard Version list box in the Linting | Languages | VHDL category of the Preferences dialog box. The compiler standard version is defined as an argument of the acom command. For example, acom -93 Invokes the VHDL compiler and compiles files with the VHDL 1993 syntax. acom -2002 Invokes the VHDL compiler and compiles files with the VHDL 2002 syntax. acom -2008

503

ALINT

Installation and Licensing


Invokes the VHDL compiler and compiles files with the VHDL 2008 syntax.

VHDL compiler version

acom -version

Prints the name of the compiler (VHDL compiler) the version, the build number, and the build date. Prints verbose information about units in the library. Such information includes the library name of the unit, the name of the source file, detailed information of the compiler, including the version string and the OS name, etc. Note that a library may contain units compiled by different compiler versions on different operating systems. Prints the name of the compiler (C/C++ compiler), the version, the build number, and the build date. The required gcc version is included in installation packages and is installed to the gcc/ (or mingw/) subdirectory of the ALINT installation directory. Under Windows, for compiling and linking ALINT API applications into a shared object (Linux) or a dynamic-link (Windows) library can be used Microsoft Visual C/C++ instead of gcc. You can check the Microsoft Visual C/C++ compiler version in the Compiler type list in the Linting | Languages | C/C++ category in the Preferences dialog box. The Tcl interpreter is embedded in the application and extended with commands for controlling both the linting engine and the GUI. The embedded Tcl interpreter version number is 8.4.19. The tcllib library, version 1.11.1, is located in the scripts/ subdirectory in the ALINT installation directory. You can check the version of each package using package require <package_name> code. See User's Guide | Framework Basics | Tcl and Macros | tcllib Library topic for details.

Information of library units

adir -l

C/C++ compiler version

ccomp -version

GCC compiler version

Version 3.4.3 for 32-bit version of ALINT for Linux; version 3.4.4 for the 64-bit version of ALINT for Linux; version 3.4.5 for ALINT for Windows. The Compiler type list in the Linting | Languages | C/C++ category in the Preferences dialog box.

Microsoft Visual C/C++ compiler version

The embedded Tcl interpreter version

8.4.19

The tcllib library

package require <package_name>

504

Release History

Release Notes for ALINT 2009.02


The Release Notes list new features, changes, and additions implemented in ALINT 2009.02 The new version of ALINT includes various engine enhancements and new commands for violation results management. The quantity of VHDL rules has been significantly increased.

What's New in this Release

Rule Libraries STARC_VHDL The library has been extended with 38 new rules and now it includes 93 VHDL rules covering the "STARC RTL Design Style Guide for VHDL, First Edition". For detailed information about rules included in STARC_VHDL rule library, please refer to the starc_vhdl_rules.pdf document provided with the installation. ALDEC_VLOG The library has been extended with 14 new rules and now it includes 26 Verilog rules. This library includes those Verilog rules that are not covered by the STARC_VLOG rule library.

Macro Commands avdbcopy command has been implemented. This console command allows copying of violation messages from one .avdb file to another .avdb file. Special switches may be applied to copy violations that meet different criteria. Unless specified otherwise, the whole file is copied. avdbclear command has been implemented. This is a console command that clears binary database with ALINT violations (.avdb). The contents of the database can be deleted completely or by the specific design unit(s). This command can be used to remove unnecessary violations from the database or to clear the database before running new linting session. The -lcu option is available for the Verilog compiler (alog). Using this options forces the compiler to print a list of successfully compiled units. (If the option is omitted the compiler will only print the list of top-level modules.) The -l <logfile> argument is available for the asim command. Using this argument forces the application to create a log file with the contents of the Console window, similarly to the transcript file command. Logging does not terminate until you quit the application or close the log file with the transcript file -close command. (SPT21107)

505

ALINT
Framework

Release History

Document windows (e.g. HDL Editor) can now be undocked from the Framework and displayed as if they were stand-alone applications. This option is especially useful if you have multiple monitors attached to your machine and would like to display the Framework on one monitor and a document window on the other. To dock or undock a document window, use the Dock or Undock buttons on the top of the document tab. An undocked window can be configured to stay on top of other ALINT windows. The Stay On Top button is located in the upper right corner of the undocked window, next to the Dock button. (SPT20228) Commands Compile, Execute, and Execute Selection have been added to the HDE menu. The first command is used for compiling HDL sources. Note that after opening a design (.rdsn), only files included in the design can be compiled using the GUI. Commands Execute and Execute Selection are used to execute scripts loaded in the editor. The latter command executes only the lines that are selected.

Console The blinking + sign shown at the prompt in the command-line version of ALINT has been removed. This simplifies copying the transcript selected in the Console to the clipboard. You can now hide message identifier - a string shown at the beginning of each message in the Console and used as an indication of the message origin, for example: ALINT, AVDB2TXT, AVDBCOMPARE, etc. To do so, open the Tools | Console | General page in the Preferences window and clear the Show message identifier check box. This will affect both new messages and messages already displayed in the transcript area.

Rule Description Viewer Syntax highlighting is enabled in example section. Examples for complex checkers are illustrated with pictures now.

Configuration Viewer 32 new built-in policies representing different design methodology topics have been added. Built-in policies assist linting process by eliminating the need to create the policy manually. 33 new built-in rulesets representing different design methodology topics have been added. Built-in rulesets assist linting process by eliminating the need to create the rulesets manually.

Violation Viewer Violation messages can be assigned with a different status to simplify violation analysis process. The following statuses can be set for violations: New -- the violation was newly detected. Read -- the violation was considered. Once the status is set, the appearance of the violation changes from bold to regular font.

506

ALINT

Release History

Fixed -- the violation has been fixed. Once the status is set, the appearance of the violation changes from regular to strikethrough font. Irrelevant -- the violation is not related to the matter. Once the status is set, the appearance of the violation is changed from regular to grayed out. Violation messages can be filtered based on their status (e.g. only new and read violations can be viewed). User-defined policies and rulesets can be dragged and dropped directly into opened database with violations. This feature allows rapid filtering of linting results based on specific policy requirements. Current view can now be exported to another .avdb file (see the avdbcopy console command for details).

HDL Editor If a design workspace is loaded and you use the Compile button to compile a file that is not included in any design, the HDL Editor will prompt whether the file should be added to the active design. If you answer Yes, the file will be incorporated in the active design and the compilation will run. If you answer No, the file will be neither added to the design nor compiled. (SPT20403) After loading a file in the HDL Editor by double clicking on an error or a warning message printed at the Console the corresponding line of source code is highlighted with a pale red or pale blue color. Similarly, when the Open Source File command is used in the Violation Viewer pop-up menu, the corresponding line of source code is highlighted.

Design Manager Column widths in the Dependencies window are now adjustable. The Rename command is available in the pop-up menu. Renaming a file in the Design Manager renames the accompanying file on disk. Renaming a folder does not affect the file system because all folders in the Design Manager are virtual folders. (SPT20382)

GUI Preferences The Violation Viewer settings can now be configured in the Preferences window. The following categories have been added: General Allows to enable/disable assigning a status for warnings. The built-in or user-defined HDL editor can be selected to display the source code when cross-probing the violations. Appearance Allows setting font, colors, and style of violation messages. The Rule Description Viewer settings can now be configured in the Preferences window. The following categories have been added: General

507

ALINT

Release History

Allows to select the type of information about the rules (e. g. rule name, example, image) that should be displayed. Appearance Allows to set font, color, and style for different parts of rule description (e.g. rule name, example, image)

Documentation Documentation in the PDF format can now be accessed from the Help menu. Search highlight in the HTML version can now be turned off by clicking the button with the eraser icon (next to the Search button).

License ALINT 2009.02 provides a license diagnostics utility that can check the number of available licenses and help diagnose license-related issues. The utility displays complete information about the license, including: a detailed list of license features, the license number, the names of environment variables, and a diagnostics log. The utility can be started with the License Diagnostics command from the Help menu or by executing the licensediagnose program located in the bin/ subdirectory of the ALINT installation directory. If the license environment is configured incorrectly (and ALINT cannot start), the license diagnostics will be launched automatically. (SPT20591, SPT20815)

Problems Corrected in Version 2009.02

General There was no message about locked AVDB file. The issue was resolved and now appropriate message is displayed if database is locked in GUI. (SPT21109) It was impossible to see all the messages in the database without grouping them by rules. This problem was fixed and currently there is an option that allows to flatten the hierarchy in the Violation Viewer and simplify the analysis process. (SPT21350) Separate databases were generated for compilation- and elaboration-time violations if a design folder was located in a workspace folder. Now this issue is resolved and violations are saved into a single database. (SPT20853) STARC_VLOG.2.10.3.6 rule checker did produce false reports on replication operations, for example: module test( SIG, A, B, SEL, RES ); input SIG, A, B; input [4:0] SEL; output RES; // unexpected violation: base specifier was required for "2" assign RES = ( {(2){SIG,1'b1}} == SEL )? A : B; endmodule

508

ALINT

Release History

(SPT20539) Two AVDB files were created if a design folder was located in a workspace folder. The problem was resolved and currently a single file is generated. (SPT20853)

Framework The binding to the F12 (Full Screen) key was lost temporarily if you exited ALINT in the full screen mode and then started it again. (SPT20347) The installation folder (i.e. Aldec/ALINT-<version>) was the default directory used in previous versions of ALINT while opening (File | Open) or saving new files (File | Save As). Since version 2009.02, the recently-used path is remembered and set by default in the Open Files and Save As dialog boxes. (SPT20857)

Known Problems

General The Backspace key is known not to work in the alintcon program on selected Linux distributions. As a work-around, you may use Ctrl+H. (SPT20290, SPT20439) The terminal window where ALINT is running in the character-based mode (without the graphical user interface) cannot be resized. (JKL753) Software for detection of the input language and automatic switching of the keyboard layout may crash ALINT. (ANT21)

Framework ALINT policy and ruleset file extensions cannot be changed (only .alintruleset and .alintpolicy are legal ones). (SPT21509) Documents tabs are shifted to the right while saving document or dragging the window boundary. (ARG2678)

Library Manager All libraries are collapsed each time the Refresh option is used. (MRP1816)

File Browser The File Browser is not refreshed automatically. You need to click the Reload button to refresh it. (KAM2252)

509

ALINT
Macro Commands

Release History

The script engine may take a long time (a couple of seconds) to detect that a given command does not exist. (PSL724) The find command does not work correctly for designs that have more than one top-level unit - only one top-level unit (and its contents) is searched. (REM208)

Reaching Technical Support


If you experience any problems with the software, please submit your support request at: http://support.aldec.com/ContactSupport/. Remember to include the following information: Your name, company name, phone/fax number, e-mail address The license file Detailed description of the problem

510

ALINT

Release History

Release Notes for ALINT 2009.06


Aldec Release Notes list new features, changes, and additions implemented in ALINT 2009.06

Summary:
ALINT 2009.06 is the first version which enables custom rules (C++-based API provides access to the language-level layer of the linting engine functions). The current version of the API enables customers to create new rules directly in the ALINT framework. Countless VHDL synthesis enhancements, new constructs support and bug fixes are included in ALINT 2009.06. The majority of VHDL rules and overall tool stability were seriously improved on complex designs. Within the GUI there are two major improvements. Violation databases comparison results can now be visualized. Linting Flow component was added (to help new users get started). 30 new rules have been added: STARC_VHDL library was extended with 25 new complex rules, ALDEC_VLOG rules library was extended with 5 new rules.

What's New in this Release

Custom Rules ALINT 2009.06 features API for User-Defined Rules -- custom rules may be written using C/C++ language and linked to ALINT engine: The new API for user-defined rules may be used for VHDL and Verilog design rules checking. API is provided in the form of header files written in pure C and precompiled static library (alintapi/interface and alintapi/lib folders ). Windows users may choose between precompiled libraries for Microsoft Visual Studio ( lint.api.tools.lib ) or MinGW ( liblintapitools.a ). API provides access to functions required to implement a variety of checks upon Verilog and VHDL language constructs. The suggested methodology of writing custom rules is similar to handling events in popular GUI development frameworks: Custom rules subscribe and react on the various forms of events during the semantic model traversing. Rules may trigger any number of HDL constructs, optionally limited with an easily configurable context constraints. User can query several construct attributes, such as object names, their locations in source code or signal types User-defined rules do not generate violation messages directly to the Console, instead they create violation data objects containing message actual parameters.

511

ALINT

Release History

Violations may be hierarchical (main violation and details ), multiple versions of the generated messages are possible depending on the user state. Detected violations are handled with ALINT engine similarly to the pre-packaged rules, and may be printed to the Console, text file or saved in the violation database (AVDB). Multiple custom rules are grouped into custom rule plug-ins, which should be compiled into a shared library. User may compile using pre-installed C/C++ compiler (MinGW under Windows, GCC under Linux32/64 ) or using any other C/C++ compiler supporting standard C library formats. Utility scripting command 'ccomp -alintapi' is provided to ease the compilation with pre-installed compiler and also with multiple versions of Microsoft Visual Studio under Windows. Registered custom rule plug-in can be immediately used for linting HDL models with built-in rule plug-ins. There are no restrictions during linting for custom rule plug-ins compared to built-in plugins regarding rule configurability, policy management, violations storage in AVDB format. GUI features in this release have certain limitations related to rule plug-in reloading after updates, which will be addressed in further releases.

Rule Libraries STARC_VHDL The library has been extended, adding 25 new rules, and now it includes 118 VHDL rules covering the "STARC RTL Design Style Guide for VHDL, First Edition". For detailed information about the rules included in the STARC_VHDL rule library, please refer to the appropriate document provided with the installation (Help --> STARC VHDL Rules). Brief and detailed context-dependent rule references are also available directly from the Rule Description Viewer in GUI. ALDEC_VLOG The library has been extended, adding 5 new rules, and now it includes a total of 31 Verilog rules. For detailed information about the rules included in the ALDEC_VLOG rule library, please refer to the appropriate document provided with the installation (Help --> ALDEC Verilog Rules). Brief and detailed context-dependent rule references are also available directly from the Rule Description Viewer in GUI.

VHDL Synthesis The synthesis emulation engine now supports the following constructs: Aggregates. Loops. Inouts. Multidriven nets. Enumerations.

512

ALINT
Linting Flow

Release History

A Linting Flow wizard was added to the product. The wizard helps to manage linting process for first time users. It is a separate window that appears on the left side of the framework on the first launch. It includes the following stages: 1. Design Setup: Create New Design Open Existing Design. Change Source Directory Open Sample Design blackjack_mixed blackjack_vhdl blackjack_vlog 2. Run Linting Set Linting Options Linting Compile Run Linting View Results 3. Advanced Create New Rule Create New Ruleset Create New Policy

See product help for more information on each stage execution.

Violation Databases Besides the following enhancements and new features in AVDB engine were added: New -global_scope filter was added for avdb-related commands. Violations belong to the global scope (they do not have particular source pointer -- no relation with particular code construction) may not be filtered. (AME93) It is now possible to clean the violations database by instances (new switch in the avdbclear command). (AME101) New "ruleset" sorting criteria is available for the AVDB listing commands to sort selected violations by rulesets and ruleplugins. (AME153)

513

ALINT

Release History

It is now possible to use system variables in the AVDB commands (e.g. "set f1 rx.v" to further use the $f1 variable). (PVM334) New framework-related features and changes in AVDB: Violation messages descriptions wrapping has been implemented in the Violation Viewer. Now it is easy to read them without scrolling. (SPT22396) Global-scope related warnings are now displayed per file in the Violation Viewer ($root_<filename> was changed to <filename>). (SPT22768) The Use single AVDB file for workspace option is now enabled by default in the Preferences. (DMI558) A warning message is displayed instead of an error on attempt of using avdbclear for non-existing database. (DMI535) A new "Export" page is available in Violation Viewer Preferences. Separator can be specified (affects CSV report generation). (SPT22875) Option "Save" is now available in Violation Viewer. It allows user to save changes to the active database ("Save As" only was available before).(SPT22402) -alint_policypath and -alint_rulesetpath switches were changed to -policypath and -rulesetpath correspondingly in AVDB-related commands (OLL297)

Comparison Databases Violation databases comparison may now be opened within the GUI for the results cross-comparison between Violation Databases. The content of compared databases is displayed in two vertical panes with differences highlighted.

Framework Legal values for boolean parameters changed to "yes"/"no" from "1"/"0" in the following checkers: STARC_VHDL.1.1.1.2, 1.1.1.7, 1.1.4.2, 1.1.6.1, 2.1.2.2, 3.2.4.1; STARC_VLOG.1.1.1.2, 1.1.1.6, 1.1.1.7, 1.1.4.3, 1.1.5.2, 1.2.1.2, 1.2.1.3, 1.5.1.3, 2.10.3.7, 2.4.1.4, 3.5.3.3; ALDEC_VLOG.2601. It may require appropriate replacements in policy files created with previous versions of the software. (PVL118) The "Compilation" node is now available in the Preferences as the member of the "Linting" node. (SPT22421) The Execute Macro option is now available in the Tools menu. (SPT22018) Using the Alt+Enter shortcut opens the Object Properties dialog box. The shortcut is ubiquitous, for example, Alt+Enter in the Design Manager shows properties of the selected design; after selecting a signal in the Waveform Viewer, Alt+Enter shows properties for that signal, and so on. (SPT21878) The Brake Current Operation button is implemented in the panel. It allows user to break any operation (e.g. linting) in any moment.

VHDL 2008 New standard types (integer_vector) are now supported. case? and with-select? constructs are now supported (PVL166)

514

ALINT

Release History

The -2006 compiler option was renamed -2008 after the new revision of the VHDL standard was released. The names of GUI options and the documentation have been updated accordingly. Additionally, the optional -2006 parameter for the --vhdl_comp_off pragma was changed to -2008. New standard (IEEE Std 1076"-2008) defines a language informally known as VHDL 2008. Previously used term VHDL 2006 referred to languages defined in the drafts of IEEE Std 1076-2008.

Macro Commands The asim/vsim command follow the behavior of the compilers with respect to the working library, i.e. if the working library is not set, the command will use library work, provided that such library is available. (SPT21940) The script engine no longer prints the Script execution aborted message when the macro execution is terminated with the quit, exit, or bye commands. (SPT20229, SPT22224) The alias command can now be used to create aliases comprising many commands, for example: alias prepare_worklib { alib work set worklib work adel -all } In the previous version of ALINT creating such multi-command aliases triggered an error. Note that the native Tcl proc command may be a better option for creating user-defined commands. (SPT22251)

Tcl Interpreter The Tcl interpreter in ALINT has been updated to version 8.4.19. The previous version of ALINT used version 8.4.15. The execution of Tcl scripts has been accelerated. Scripts that spend most of the execution in the Tcl interpreter will run twice as fast.

Console The filter in the Console window can now be made case sensitive by pressing the Case Sensitive button in the filter toolbar above the transcript area. The number of visible lines in the Console can be adjusted by setting the Console buffer size option in the Tools | Console | General category in the Preferences dialog box. The buffer size can be specified within the range between 100 and 100000 lines. (SPT22046)

Alintcon Program

515

ALINT

Release History

The string returned by the alintcon -version command is now terminated with the new line character. (SPT21902) The output of the character based console in the alintcon program remains visible after the alintcon program terminates. The contents of the terminal window where the alintcon program is or was running can be scrolled with a scroll bar. (The previous implementation required using the PgUp key.) The console output no longer includes special characters for setting the font colors. Additionally, several issues with piping and entering selected character codes have been resolved. (SPT19401, SPT19425, SPT20153, SPT20290, SPT20439, SPT20826, SPT21277, SPT21394, SPT21420, SPT21510, SPT21873)

Installer An additional stage has been added to installation process: MinGW compiler is installed now. The etc/setenv and etc/setenv.sh scripts in the ALINT installation directory are now the only files that store the installation path on Linux. This simplifies moving the installation directory, for example after the mount point in the file system changes. (KAM4030)

HDL Editor Verilog and C/C++ header files included with the Verilog `include directive or the C/C++ #include directive can now be opened by right-clicking on the line containing the directive. For example, if you right-click on a line containing directive `include "test.h", then the command Open test.h will be available as the first item in the pop-up menu.

Documentation Detailed ALINT rules descriptions are now available in the HTML version (Help menu). A new reference document with error and warning messages from the VHDL compiler and Verilog compiler is available. The document currently contains a small subset of all available messages. It will be expanded in subsequent releases. The search engine in the HTML version of the documentation allows searching not only for single words but also for complete phrases. (A phrase should be enclosed by quotes in the search box.) The search results include not only page titles but also excerpts from matching pages.

Problems Corrected in Version 2009.06

General 1. Fatal error that occurred in case with more than 10000 detail messages is fixed. (SPT22254) 2. Fatal error occurred in some Verilog designs because of the problem with multidimensional arrays handling in ALDEC_VLOG.2201 rule checker. (SPT22299) 3. False STARC_VHDL.1.1.2.6 and STARC_VHDL.2.1.2.2 violation were reported because of the letter case sensitivity. (SPT22332, SPT22333, SPT22255)

516

ALINT

Release History

4. Control signals detection algorithm was improved: usability of STARC_VLOG.1.1.5.2, 1.1.1.7, 3.1.3.2 (the number of irrelevant warnings was significantly decreased). (SPT22441) 5. All rule levels are now corresponding to the latest version of STARC RTL Design Style Guide for Verilog. The list of fixed rules is following: STARC_VLOG.1.1.1.7, 2.7.2.1, 2.9.2.3, 4.1.2.3; STARC_VHDL.1.1.4.8, 2.6.1.4. (DMI544) 6. Default naming pattern was changed in the STARC_VHDL.1.1.1.8 (there is a misprint in the English version of the STARC Design Guide; correct pattern is 'U<entity name>' or 'U<entity name>_<quantity>' if multiple instances exist). (SPT22740) 7. Declaring aliases to variables defined inside subprograms could crash the compiler. (SPT22532) 8. The error message indicating that the module instantiated in the generate statement is missing is printed at the elaboration stage. (SPT22213)

Violation Databases and Violation Viewer 1. The result of export from Violation Viewer to other formats now depends on active tab structure. (AME150) 2. The linting process is not executed and appropriate error messages are reported if .avdb file is opened (=locked) in GUI.(SPT21109, DMI487, DMI488, DMI489) 3. While avdbclear is executed with 'unit' filter it does not delete instances anymore. (AME103) 4. Sorting by origin is not letter case-sensitive anymore. (OLL273) 5. Non-relevant message was reported on attempt of database with VHDL violations filtering by module. (OLL261) 6. Violations statuses are now saved to the resulting database while using the avdbcopy command. (DMI495) 7. Violations are now marked as read when focus leaves (appropriate option should be enabled in the Violation Viewer Preferences). (PVL130) 8. Appropriate message is now reported on attempt of avdbclear usage on empty database. (AME82) 9. HTML report index tree is now correct while using the -rulelevel sorting order in avdb2html command. (AME154, AME155)

Comparison Databases 1. Information message is now reported once the avdbcompare execution is completed (resulting file location). (AME127) 2. Correct message is now reported if differences are not detected for selected set of filters (compared databases can still contain differences that can be listed with another set of filters). (PVL43)

HDL Editor 1. The Find and Replace dialog box failed to locate names of Verilog objects prefixed with ! or ~ when the Match whole words option was selected. (SPT16586)

Design Manager 1. The working library was not changed correctly when the active design was removed from a multi-design workspace. The Design Manager now sets the library associated with the new active design as the new working library. (SPT21915)

517

ALINT

Release History

Macro Commands 1. Blackbox specification syntax is now consistent in all the available commands. The following design units can be independently marked as blackboxes: module_name, entity_name, "entity_name(architecture_name)", "entity_name(configuration_name)", package_name.. (DMI511). 2. Using the return command inside a script executed with do command no longer triggers the Script execution terminated due to error(s) message. (SPT22020)

Framework 1. The order of perspective buttons has been unified and is now the same on all platforms - Default, Console, Documents, Policy, Ruleset. There is no tool to manage the order. (SPT22048) 2. An issue with highlighting options in the menu was resolved. (SPT20318)

Known Problems

General There are the following major VHDL synthesis engine limitations: (1) subprograms synthesis is not supported yet; (2) generics are not analyzed properly yet (rule checkers do not consider actual values during the elaboration-time linting). Software for detection of the input language and automatic switching of the keyboard layout may crash ALINT. (ANT21)

Framework Documents tabs are shifted to the right while saving document or dragging the window boundary. (ARG2678)

HDL Editor ALINT allows setting fonts that are invisible in the Preview area in the Preferences dialog box. On some Linux distributions such fonts can cause application errors. (WOW1082)

Library Manager All libraries are collapsed each time the Refresh option is used. (MRP1816)

518

ALINT
File Browser

Release History

The File Browser is not refreshed automatically. You need to click the Reload button to refresh it. (KAM2252)

Macro Commands The script engine may take a long time (a couple of seconds) to detect that a given command does not exist. (PSL724) The find command does not work correctly for designs that have more than one top-level unit - only one top-level unit (and its contents) is searched. (REM208)

Reaching Technical Support


If you experience any problems with the software, please submit your support request at: http://support.aldec.com/ContactSupport/. Remember to include the following information: Your name, company name, phone/fax number, e-mail address The license file Detailed description of the problem

519

ALINT

Release History

Release Notes for ALINT 2009.10


The Release Notes list new features, changes, and additions to ALINT implemented since the last release version, i.e. ALINT 2009.06.

What's New

ALDEC Rule Plug-ins ALDEC_VHDL The basic rule plug-in has been extended and now it includes 10 VHDL rules above the STARC specification we plan to significantly increase the total number of rules in the next release. For detailed information about rules included in ALDEC_VHDL rule plug-in please see the appropriate section in the HELP menu. ALDEC_VLOG The basic rule plug-in has been extended and now it includes 39 Verilog rules above the STARC specification. For detailed information about rules included in ALDEC_VLOG rule plug-in please see the appropriate section in the HELP menu.

DO-254 Rule Plug-ins New rule plug-ins are available: DO254_VLOG The library includes 57 Verilog rules. DO254_VHDL The library includes 39 VHDL rules. These rule libraries are tuned to the needs of DO-254 projects and contain the most essential design rules. They are recommended for safety-critical designs. The following three topics are addressed: coding practices, design reviews, and safe synthesis guidelines.

STARC Rule Plug-ins STARC_VLOG The library has been extended and now it includes 195 Verilog rules.

520

ALINT

Release History

For detailed information about rules included in STARC_Verilog rule plug-in please see the appropriate section in the HELP menu. Significantly improved overall performance and stability on Verilog designs STARC_VHDL The library has been extended and now it includes 136 VHDL rules. For detailed information about rules included in STARC_VHDL rule plug-in please see the appropriate section in the HELP menu. Significantly improved overall performance and stability on VHDL designs

FPGA Primitives Support ALINT is now aware of internal structure of all the Xilinx unisim/ovi_unisim components. It means that the number of black boxes in the FPGA designs decreases significantly and designs are analyzed more comprehensively; all the high level rules receive complete information about the design hierarchy and detect more extensive area of design flaws; important rule violations are not missed if vendor components are used improperly. See the FPGA Vendor Components help section for detailed information. 2009.10 is the first release that supports this feature. The list of libraries provided by vendor is extensive and all the essential vendor libraries will be supported in the future releases. For example, the most essential Xilinx and Altera libraries are scheduled for the next release.

API Functions The set of functions was significantly extended. New types of rules can be implemented using the API: L-value events handling. L-value events are intended for checking left part of expression in the assignment operator. They may be used to implement rules that check: expressions bit widths mismatches; using signal types in l-value expressions; checking multiple assignments and drivers. Edge events. Edge events are intended for checking expressions from the sensitivity lists. They may be used to implement checkers which scan: mixed edge in sensitivity lists polarity using signals and operations under edge. Non-synth events. Non-synth events are intended for checking processes for presence of non-synthesizable contents. Such process can be skipped and initiated analysis may be aborted by the synthesis related checker. Lexical events (Verilog only). Lexical events allow checking code formatting and many others related issues.

521

ALINT

Release History

ALINT Value. ALINT value concept provides convenient approach to working with constants. Constant type and value can be requested, and constant conversion functions are also available (e.g. from binary to integer). Signal sets. This concept allows handling collection of signals in convenient manner. Standard operations are available for signal sets: unite, intersect, browse; and additionally there is rich set of functions to work with sets. Bus reconstruction feature is available (automatically creates vectors from signals and slices collected independently). Rule classification. This feature allows users to create custom classification in GUI. Classifications allow to group rules by any custom criteria and significantly improve user experience with a rule plug-in. The API demo was extended. New sample project implements a rule checker which verifies that assignment style (blocking or non-blocking) is used depending on the type of the circuit (combinatorial or sequential). See the API demo workspace at $alint_install_dir/examples/user_defined_rules.

Advanced CDC Reports The new -alint_ctslog switch is available. It displays advanced data that can be used for detailed CDC analysis. The feature is aimed to the designs with multiple clock domains. The following information is displayed: The list of external and internal clocks/resets that were detected in the design. The list of clock domain crossings accompanied by the detailed information on source-destination and on destination-source registers. The list of storage element inferences. Top-level interface port connections analysis. Sample fragment from the -alint_ctslog report: ========================================= Clock domain crossings (sorted BY SOURCE) ========================================= Clock domain crossing detected Source register: MIXED_BJACK.I10.DOINT[0] clocked by MIXED_BJACK.GEN_CLK Destination registers: MIXED_BJACK.I6.Ace clocked by MIXED_BJACK.SYS_CLK MIXED_BJACK.I6.Total[0] clocked by MIXED_BJACK.SYS_CLK ...

522

ALINT
============================================== Clock domain crossings (sorted BY DESTINATION) ============================================== Clock domain crossing detected Destination register: MIXED_BJACK.I6.Ace clocked by MIXED_BJACK.SYS_CLK Source registers: MIXED_BJACK.I10.DOINT[0] clocked by MIXED_BJACK.GEN_CLK ...

Release History

VHDL Linting Built-in synthesis engine supports new constructs: Generics (there was a limitation in the previous version). It means that parameter-dependent objects are handled properly and actual values are delivered to all the rule checkers during the elaboration-time linting. Consider quick example: generic ( BL: integer := 8; ); port ( CLK: in std_logic; DATA: in std_logic; Q: out std_logic_vector (BL-1 downto 0) ); ... if( CLK'event and CLK = '1' ) -- the number of synthesized flip-flops -- depends on the "BL" generic value Q <= DATA; end if;

523

ALINT

Release History

Generates. It significantly improves output of rules that check interconnections between blocks and those rules which need high-level information about design hierarchy. generate_1: for i in 1 to 5 generate process (clk) begin if (enable = '1') then data_out(i) <= data_in(i); else data_out(i) <= 'Z'; end if; end process; end generate; ... process (...) begin -- violation: STARC_VHDL.2.5.1.7 (tri-state output used in condition) if (data_out = "0000") then ... end if; end Records are fully supported for the synthesis now: type st_arg is (ST_FULL, ST_EMPTY, ST_HF, ST_HE); type pr_instruction is record ... arg: st_arg; cr1: std_logic_vector(7 downto 0); cr2: std_logic_vector(7 downto 0); ... end record;. ...

524

ALINT

Release History
-- violation: STARC_VHDL.2.2.1.1 (latch for "next_instruction.cr1") case (curr_instruction.arg) is when ST_FULL => next_instruction.cr1 <= ...;

when ST_ENMPTY => next_instruction.cr1 <= ...; when ST_HF when ST_HE => next_instruction.cr1 <= ...; => next_instruction.cr2 <= ...;

end case; Complex index expressions within multidimensional arrays are supported now,. Component binding during the elaboration-time linting is supported. If for some reasons instantiation bindings were not determined at the compilation-time, the engine can be still instructed to search and bind components while loading a design. The -L and -PL arguments of the asim command allow specifying additional libraries that should be searched for units that were not bound during the compilation-time linting, could not be found in the library where the top-level design unit is located or all other libraries that are visible by means of the library clause. For additional information refer to the description of the asim command. (SPT45059)

Built-in Synthesis Engine Synthesis algorithms for complex sequential logic descriptions were significantly improved: more accurate control circuitry is now generated for flip-flops. False warnings from several high-level rules do not appear anymore, e.g.: STARC_VLOG.1.5.1.1 and STARC_VHDL.1.5.1.1, STARC_VLOG.1.1.1.7 and STARC_VHDL.1.1.1.7, STARC_VLOG.2.3.5.1 and STARC_VHDL.2.3.5.1, STARC_VLOG.3.3.3.2 and STARC_VHDL.3.3.3.2, and several other rules related to enable signal connections. (DMI728, SPT22051, SPT46328, SPT46342, SPT46344). The synthesis pragmas are now supported (e.g. translate_on and translate_off). Code surrounded by these pragmas is ignored by synthesis engine. See the Synthesis Constraints help section for details (SPT45649). Bit widths are automatically extended in assignments with decimal constants the in the right-hand-sides. (SPT22370, SPT46315, SPT46345). For example: reg [7:0] swf_ts8; ... // equal to assignment of "00000000" // (all "swf_ts8" bits are assigned but not the swf_ts8(0) only) swf_ts8 <= 'b0; swf_ts8 <= 0;

525

ALINT
Batch Mode

Release History

The vlint command was enabled. This command allows to run the linting process directly from the OS prompt: vlint test.v is now equivalent to running the linting process, by typing alintcon at the OS prompt and then executing command alint test.v inside the ALINT Console. The vlint executable accepts the same arguments as the alint command.

Graphical User Interface Violation Databases Locked Violation Database is closed automatically once another linting session is executed. This behavior is controlled by option in the Preferences (enabled by default). (SPT45668). Now it is more convenient to review and analyze the linting results -- the following features were enabled: Context-dependent removal. Now it is possible to remove any node from the analyzed violations database. (SPT45121). The undo/redo actions. They help to rollback the database to any of its previous states. This important feature prevents unintentional data lost and especially useful on big designs with correspondingly huge violation databases. (KOL418). Violation description can be copied to the clipboard. (SPT22359) Error, Warning 1--9 severity levels were changed to Erorr, Warning, and Info. New severity tab was added correspondingly: it allows user to review violations grouped by rule severity. (SPT22762, SPT45039). Rule Plug-in Viewer Automatic classification merge was implemented in the Rule Plug-in Viewer window. Design Manager Files can be excluded from the linting process directly in the Design Manager. It is possible to exclude any file from the linting or compilation by selecting the appropriate option from the popup menu. Files that are excluded from the compilation are marked as crossed out (strikethrough); files that are excluded from linting are grayed out (SPT45855). HDL Editor A new word completion feature is available. Pressing the Alt + / keys searches the current file backwards for the first word matching the string at cursor and inserts the match. Pressing Alt + / again cycles through the possible completions. The editor finds one match at a time, searching the file backwards and then forward.

526

ALINT

Release History

This functionality comes in very handy when typing in identifiers. Note that identifiers are not shown in the autocomplete pop-up list. (This list contains keywords only.) The HDL Editor can now print files. Library Manager The Library Manager has been enhanced to show VHDL package contents with more details. Displayed items now include types, subtypes, and shared variables. In the previous version of ALINT those items were not shown. The type (or subtype) is displayed next to package constants, shared variables, signals, and VHDL 2008 generics. In the previous version of ALINT no type information was displayed next to object names. An option to make the selected library global is available in the pop-up menu. When you select a library and use this option, the library mapping will be copied to the library.cfg file in the vlib/ subdirectory in the ALINT installation directory. Consequently, the library will be visible globally, in all directories. (SPT20409)

Framework New Linting Flow perspective is added to the default set of perspectives. It is default at the first run and contains the Linting Flow window enabling quick access to basic functions of the product. Whereas the Default perspective has all the design management windows activated (File Browser, Design Manager, Library Manager, Console). This perspective is recommended as a starting point for users that have some background experience with Aldec products or previous versions of ALINT. Preferences and Design Properties Two separate entries are now available in the Preferences and the design Properties dialog boxes for specifying included directories for Verilog and SystemVerilog files. The Include Directories entry affects files included with `include "filename" directive and is translated to the -incdir option for the Verilog compiler (alog). The System Include Directories entry affects files in angled brackets (`include <filename>) and is translated to the -sysincdir option. In the previous version of ALINT using the Preferences dialog box set the -sysincdir option and using the design Properties dialog box set the -incdir option. Additional options edit box is available in Preferences. They are automatically enabled during the compilation- and elaboration-time linting. The number of reported warnings is not limited by default anymore (-alint_maxwarn and -alint_maxrulewarn are set to none by default). (SPT45590).

Tcl and Macro Commands The adir command (i.e. the command for listing library contents) has been enhanced to show VHDL packages with more details. The output of the command will now include types, subtypes, and shared variables defined in packages. Additionally, items such as package constants, shared variables, signals, and VHDL 2008 generics will have their type (or subtype) listed. In the previous version of ALINT, the adir command had shown only object names, without the type information. Verbose descriptions of error and warning messages generated by the VHDL and Verilog compilers can be printed by the new msginfo command. The descriptions are accompanied by code samples and possible code fixtures. The description text printed by the command matches the description provided in the Message

527

ALINT
Reference guide available from the Help menu.

Release History

To print the description, type msginfo followed by <ID> where <ID> is the error or warning identifier, for example COMP96_0051 or VCP7601. (You can also specify a substring matching the ID, for example 7601.) The descriptions are currently available only for a subset of all compiler errors and warnings. Values of Verilog parameters assigned on the command line with the -g and -G arguments for asim can now use Verilog size constant number notation, for example 6'h0_a. Tcl Library, version 1.11.1, has been added to ALINT installation. The Tcl Library (or tcllib for short) is a set of Tcl extensions written in Tcl. The library extends Tcl in a number of areas such as file manipulation, file processing, networking, encryption, mathematics, object oriented programming, and so on. The documentation for library modules is available on-line at the tcllib home page at http://www.tcl.tk/software/tcllib. (SPT45331)

Supported Platforms Windows 7 is now supported. Starting with the 2009.10 version, Windows 2000 is no longer supported.

Problems Corrected in Version 2009.10

Verilog Linting An issue with assigning parameter values with defparam statements that contain hierarchical references through arrays of instances was resolved. (SPT45173) An issue with compiling assignments at declaration inside the generate statement in the -v2k mode was resolved. This issue could surface when compiling the xilinxcorelib library. (SPT45804) Omitting parenthesis in a method call that did not require any arguments triggered a bogus error at the elaboration-time linting. (SPT45251) The compiler by mistake reported an error when compiling an event expression containing a hierarchical name with an instance array index. (SPT45990) An issue with using multi-dimensional arrays on module ports was resolved. (SPT45402) The "{ObjectType}" token did not correspond to actual port name in ALDEC_VLOG.2201 violation message. (SPT45301). False violations were reported by STARC_VLOG.3.5.3.3 rule checker. (SPT45670, SPT46005).

VHDL Linting An issue with compiling array aggregates was resolved. (SPT21126) Using a for loop after an empty wait statement could trigger a bogus compilation error if the compiler ran in the -dbg mode. (SPT46125) File name was incorrectly defined by STARC_VHDL.1.1.1.1 when automatic compilation order was enabled (acom -o). (SPT45333). False violation was reported by STARC_VHDL.1.3.2.2 on design with 'open' port. (SPT45370).

528

ALINT

Release History

Error messages "lint.starc.vhdl.dll" cannot be loaded occurred in some environments. (SPT45505). False violation was reported by STARC_VHDL.2.1.2.3 on integer numbers in generic declarations. (SPT45666).

Graphical User Interface Linting Flow The "Compile" and "Run Linting" action names were misleading: the linting process might be considered as a single stage process and therefore compilation can be preformed only once. These actions were renamed to "Compilation-time Linting" and "Elaboration-time Linting" correspondingly. (DMI632, DMI737). Compilation-time linting is executed for active design but not for workspace by default. This can be controlled by the appropriate setting in Preferences. (SPT45671). HDL Editor The HDL Editor displayed an unnecessary dialog box notifying that an unmodified read-only file cannot be saved. The dialog box was displayed before compilation. (SPT45256) Preferences and Design Properties Coverage related option was removed from the advanced language options (Tools | Preferences | Languages | VHDL/Verilog | Advanced). This option was not relevant. (SPT45321).

Tcl and Macro Commands Accessing an empty argv variable no longer triggers an error. (The variable holds the list of arguments passed to the macro; if no arguments are specified, the variable is set to an empty list.) (SPT45330)

Documentation Default setting of STARC_VHDL.1.1.1.7 rule parameter (CHECK_MIXED_EDGE_SIGNALS) now corresponds to the actual default setting in the tool. (SPT45270).

Miscellaneous Other defects repaired for this release: SPT19499, SPT22130, SPT45278, SPT45321, SPT45391, SPT45724, SPT46229, SPT46232, SPT46246, SPT46301, SPT46434, SPT46475.

Known Problems

529

ALINT
General

Release History

ALINT GUI for Linux does not work reliably over remote connections from Windows machines running the Hummingbird Exceed X-Server version earlier than 13.0.14.542. This issue is not ALINT specific, it affects other software, including KDE applications running with the RENDER extension enabled. To work-around the issue upgrade to Hummingbird Exceed version 13.0.14.542 or newer. If you do not have access to the latest Hummingbird Exceed version or do not want to upgrade, change the widget look in ALINT. This can be done by editing the runalint script in the installation directory and specifying the -style switch for the alint executable. The -style switch must be followed by the style name: windows, motif, cleanlooks, or cde. Do not use the plastique style. This style causes frequent crashes in the X-Server. Software for detection of the input language and automatic switching of the keyboard layout may crash ALINT. (ANT21)

Rules The STARC_VLOG.2.3.5.1 rule checker triggers on flip-flop inference that is defined as correct one in STARC RTL Design Style Guide for Verilog HDL, Second Version (Example 2-21): always @(posedge CLK or negedge RESET_X) begin if (!RESET_X) Q <= 1'b0; else if (START) Q <= 1'b1; end Actually this description infers a flip-flop "Q" with negative asynchronous reset "RESET_X" and constant input (VDD). Therefore violation report is correct but incompatible with STARC guideline. (SPT22814).

Framework Documents tabs are shifted to the right while saving document or dragging the window boundary. (ARG2678)

HDL Editor ALINT allows setting fonts that are invisible in the Preview area in the Preferences dialog box. On some Linux distributions such fonts can cause application errors. (WOW1082)

530

ALINT
Library Manager All libraries are collapsed each time the Refresh option is used. (MRP1816)

Release History

File Browser The File Browser is not refreshed automatically after a new file is created. You need to switch focus to the browser or click the Reload button. (KAM2252)

Macro Commands The script engine may take a long time (a couple of seconds) to detect that a given command does not exist. (PSL724)

Reaching Technical Support


If you experience any problems with the software, please submit your support request at: http://support.aldec.com/ContactSupport/. Remember to include the following information: Your name, company name, phone/fax number, e-mail address The license file Detailed description of the problem

531

ALINT

Release History

Release Notes for ALINT 2010.02


The Release Notes list new features, changes, and fixes to ALINT implemented since the last release, i.e. ALINT 2010.02.

What's New

RMM Rule Plug-in New optional dual-language rule plug-in is now available. It includes 65 rules (32 Verilog and 33 VHDL rules). The plug-in automates design rules and guidelines that are provided in the Reuse Methodology Manual (RMM). RMM is an industry-proven 300+ page manual which defines the design methodology for effective design reuse and verification. RMM contains detailed guidelines and design examples on planning, specifications, design practices, coding, testing, and documentation. ALINT with RMM plug-in helps to guide all levels of engineers and ensure that reusable functionality is integrated into SoC designs.

Basic plug-ins (ALDEC) These plug-ins contain basic rules that are complementary to the STARC Verilog and VHDL Design Guides. ALDEC_VHDL: The basic rule plug-in has been extended and now it includes 17 VHDL rules. The plan is significantly increase the total number of rules in the next release. ALDEC_VLOG: The basic rule plug-in has been extended and now it includes 44 Verilog rules.

DO-254 Rule Plug-ins The RTCA DO-254 document ("Design Assurance Guidance for Airborne Electronic Hardware") is a recent standard that was developed by the avionics industry to establish hardware deployment guidelines and ensure safety of in-flight hardware. More details are available at www.do254.com. DO254_VHDL: The DO-254 plug-in has been extended and now it includes 43 VHDL rules. DO254_VLOG: The DO-254 plug-in has been extended and now it includes 58 Verilog rules.

532

ALINT
STARC Rule Plug-ins

Release History

Semiconductor Technology Academic Research Center (STARCR). STARC is a consortium of major Japanese ASIC foundries that has established a set of industry-proven design rule guidelines. STARC plug-ins contain automated design guidelines that cover wide range of design issues, from naming conventions and synthesizability to advanced topics such as optimizations, clock domain crossings, and design for test. STARC_VHDL: The plug-in has been extended and now it includes 151 VHDL rules. STARC_VLOG: The plug-in has been extended and now it includes 195 Verilog rules.

FPGA Primitives Support Native support was enabled for the following FPGA Vendor Libraries: Altera: altera, ovi_altera, lpm, ovi_lpm. Xilinx: simprim, ovi_simprim. Complex RAMs and PLLs from the following libraries are now supported: Xilinx/unisim. Xilinx/ovi_unisim.

Chip-Level Checks New -alint_gclkjoin switch was implemented. It allows specifying clocks that belong to the same clocks domain -- and thus avoid redundant CDC rule violations. Global clocks and resets auto-detection mechanism is now capable of automatic testbench detection. This new feature enables accurate detection of control signals even if a testbench is selected as a top-level design unit for RTL linting.

API Functions Use clauses are now accessible via API -- user-defined rules are able to retrieve all necessary information about used libraries (SPT46672). Extended information about signed/unsigned numbers is now available via API. The AlintVerilogDataType was extended with new data type: ALINT_SIGNED_TYPE. And AlintVlogModelIsDataType function was added -- it allows creating checkers like: "Do not use signed and unsigned numbers in the same expression" (SPT46664).

533

ALINT
Framework - Design Quality Metrics

Release History

Detailed report about design quality can be generated once design analysis is completed and violation database available: Quality reports are based on the ratio of violated and non-violated rule-weights. Any classification (e.g. Design Methodology Topics) can be used for report generation.

Framework - Violation Viewer Upgrade New policy can be automatically generated from a violation database. This feature is very convenient for quick creation of custom policy which contains only those rules that are relevant for particular design. Several algorithms to suppress irrelevant rules are available (SPT46474). Rules can be enabled/disabled directly from the Violation Viewer. This feature allows user to disable irrelevant rules conveniently, during analysis of detected violations. Currently activated policy is modified automatically (SPT22398). Violation database can be automatically filtered by any classification (e.g. Design Methodology Topics). This feature is very convenient to see violations grouped by different criteria. Filtered view can be created using simple drag-and-drop of a classification to Rulesets tab of Violation Viewer (DMI766). Filters tab was re-designed. Any combination of multiple filters of the same type is now available (PVL103). Huge violation databases can be opened up to 5 times faster now (SPT46531).

Graphical User Interface Enhancements

534

ALINT
HDL Editor

Release History

The HDL Editor has been enhanced with a new option that allows opening source code of packages identified by the use clause directly from a VHDL source file. Additionally, depending on the suffix of the selected_name in the use clause, the HDL Editor can locate the cursor in the line of code where the package is declared (if the suffix is the reserved word all) or where a package declarative item is defined (in case the suffix of the selected_name is a simple name, a type mark, a character literal, or operator symbol). Note that alternatively, you can still open source code of any package by using the Show Source option from the context menu of an object visible in the Library Manager window.

Console The functionality of the auto-complete feature has been enhanced. Now, the commands that use library units as arguments, e.g. adel, adir, asim can use the autocomplete list to select the unit name.

Framework The buttons for creating and switching perspectives are now shown on the status bar rather than a separate Perspective Navigator bar. This enlarges the screen available to the user. The user can now display toolbars on the status bar. To display a toolbar, right-click on the status bar and select the desired toolbar (Linting, Design Management Views, etc.) from the pop-up menu. The Favorites toolbar is available. This toolbar can hold an arbitrary set of buttons or macros. To add a new button or a macro to the toolbar, click the Add to Favorites button. To remove a button, click the Remove from Favorites button. Initially, the Favorites toolbar contained only the two buttons for adding and removing new items.

Problems Corrected in Version 2010.02

Verilog Linting Global clock/reset signals were not auto-detected properly in designs with RAM from XILINX corelib library and automatic file reordering enabled (SPT47404). Unknown error during linting occurred in designs with GTX_DUAL component from XILINX secureip library (SPT47333). Libraries to be searched for missing design units are now correctly passed to the elaboration stage (SPT47257). Crash occurred when a vendor component was instantiated several times using different parameter values (SPT47261). The STARC_VLOG.2.10.6.3 considered 0/1 as signed numbers (DMI569).

VHDL Linting

535

ALINT

Release History

Integer constants with unspecified range are auto-extended to the target range (SPT46612). Issue with multidimensional array ranges is now resolved (SPT46611). Compilation randomly failed on Linux when source files were located outside of the tool installation directory (SPT47047). False STARC_VHDL.1.3.2.2 rule violation occurred on component description with missing ports (SPT47263). False STARC_VHDL.2.7.1.3 rule violation occurred on complete if statements (SPT46801). STARC_VHDL.1.1.1.8 rule now behaves correctly in cases with instantiations of design units that occur only once (SPT47234). Intended polarity is not longer indicated by STARC_VHDL.1.1.1.7 rule (SPT45054). Using an indexed name with a function prefix inside a port map randomly crashed the compiler. (SPT46652) An elaboration error messages about out-of-range index indicated the formal part instead of the actual part where the violation had really occurred. (SPT46687)

Built-in Synthesis Engine Fixed false flip-flop inference for assignment after edge sensitive branch (PVL173). One flip-flop will be inferred for the "res" signal from the following code: process (clk) begin

if (set = '0') then res <= '1'; elsif (clk = '1' and clk'event) then res <= data; end if;

q <= not res;

end process;

Graphical User Interface Violation Viewer Summary tab is now activated by default (SPT46564). 'Enter' button applies Violation Viewer filters now (SPT46562). Built-in variables such as $dsn and $wsp can be used in the Preferences (SPT46812). Previously, ALINT reported an error and terminated loading a workspace if any of attached designs was missing or could not be found. Now, a warning is printed to the console. (SPT46147)

536

ALINT

Release History

Previously, if ALINT was opened from the user's home directory with no write permission, an error was reported. Now, if access to the home directory is restricted and .aldec directory cannot be created, both GUI and alintcon run without an error. Note, that settings are not saved after program shutdown. (SPT46602)

Tcl and Macro Commands Switch -alint_ctslog was renamed in the -alint_cdclog (OLL442).

Documentation Additional examples added to the STARC_VHDL.3.1.4.4 description (SPT47305). Several DO-254 rule titles were changed to clarify rule scopes (SPT46848).

Licensing Previously, when ALINT temporarily lost the connection to the license server, the license manager displayed a message window informing that license server is unreachable, and then ALINT exited, which might cause loss of data. In version 2010.02, this behavior has been changed. Now, if the connection to the license server is lost, ALINT is trying to check out the license features and displays appropriate messages. Work can be resumed as soon as connection to the license server is available.

Known Problems

General ALINT GUI for Linux does not work reliably over remote connections from Windows machines running the Hummingbird Exceed X-Server version earlier than 13.0.14.542. This issue is not ALINT specific, it affects other softwares, including KDE applications running with the RENDER extension enabled. To work-around the issue upgrade to Hummingbird Exceed version 13.0.14.542 or newer. If you do not have access to the latest Hummingbird Exceed version or do not want to upgrade, change the widget look in ALINT. This can be done by editing the runalint script in the installation directory and specifying the -style switch for the alint executable. The -style switch must be followed by the style name: windows, motif, cleanlooks, or cde. Do not use the plastique style. This style causes frequent crashes in the X-Server. Software for detection of the input language and automatic switching of the keyboard layout may crash ALINT. (ANT21)

Rules The STARC_VLOG.2.3.5.1 rule checker triggers on flip-flop inference that is defined as correct one in STARC RTL Design Style Guide for Verilog HDL, Second Version (Example 2-21):

537

ALINT
always @(posedge CLK or negedge RESET_X) begin if (!RESET_X) Q <= 1'b0; else if (START) Q <= 1'b1; end

Release History

Actually this description infers a flip-flop "Q" with negative asynchronous reset "RESET_X" and constant input (VDD). Therefore violation report is correct but incompatible with STARC guideline. (SPT22814).

Framework Documents tabs are shifted to the right while saving document or dragging the window boundary. (ARG2678)

HDL Editor ALINT allows setting fonts that are invisible in the Preview area in the Preferences dialog box. On some Linux distributions such fonts can cause application errors. (WOW1082)

Library Manager All libraries are collapsed each time the Refresh option is used. (MRP1816)

File Browser The File Browser is not refreshed automatically after a new file is created. You need to switch focus to the browser or click the Reload button. (KAM2252)

Macro Commands The script engine may take a long time (a couple of seconds) to detect that a given command does not exist. (PSL724)

Reaching Technical Support


If you experience any problems with the software, please submit your support request at: http://support.aldec.com/ContactSupport/. Remember to include the following information:

538

ALINT
Your name, company name, phone/fax number, e-mail address The license file Detailed description of the problem

Release History

539

ALINT

Release History

Release Notes for ALINT 2010.06


The Release Notes list new features, changes, and fixes to ALINT implemented since the last release, i.e. ALINT 2010.02.

What's New

Flow Manager New tool called Flow Manager is now available in ALINT user interface. It implements stage-based approach to design refinement process via linting flows. Flows are used to organize, prioritize, and control linting process. This approach has two major benefits: fixing violations in the most effective order so that corrections at the current stage eliminate violations at the next stages; analyzing the design from a particular perspective (coding style, logic synthesis, clock domains, etc). Every flow is divided into a set of sequentially executed stages. Each stage is a separate linting session and has its own parameters. There are regular and optional stages. When entire flow is run only regular stages are executed automatically by default. Flow is considered to be completed when all its regular stages are completed. Optional stages represent additional checks that may be useful but are not critical. Predefined design rule checking flow is delivered with each rule plug-in, and creation of custom ones is allowed as well.

Exclusions Editor Exclusions Editor manages the content of exclusion files. Files of this type provide flexible way to disabling specified rules for particular design elements - files, design units, and instances. An exclusions file can be created using the File | New | Exclusions File menu and used for linting session via design properties option or -alint_exclusions command line argument. alint -alint_exclusions my_config.alintexclusions -alog *.v -asim top

Quick Launch Panel The window formerly known as Linting Flow was renamed to Quick Launch Panel. Related commands were also changed from alint.flow.* to alint.qlp.*.

Console

540

ALINT
The following commands can now be used to control the filtering options in the Console. console.filter.text <text> console.filter.casesensitive -on|-off console.filter.severity [-errors] [-warnings] [-messages]

Release History

When the argument to console.filter.text is an empty string (i.e. "" or {}), the filter is cleared. (SPT47616) To display the description of messages generated by the compiler and elaboration engine (syntax error, unresolved hierarchical reference, etc.) use the Show Description option from the context menu.

Framework The top-level selection can be preserved between different executions of elaboration-time linting - now it is not necessary to specify it every time when linting is executed. This option is available in the Elaboration-time Linting window which is displayed during the first execution of elaboration-time linting. The corresponding option is available in design Properties. The Rule Plug-in Viewer window state (Toggle Rules Classifications Merge option and classification tree) is preserved once application is restarted again. The position and the docking status of the document windows are stored in the workspace file (.rwsp). (SPT22112)

GUI Preferences The Visual Studio 10.0 option has been added to the Compiler type list in the Languages | C/C++ | General category of the Preferences dialog box. New options Internal HTML viewer and External HTML viewer are available in the Environment | Documentation category of the Preferences dialog box. Options allow specifying the viewer for displaying HTML-based on-line documentation delivered with the installation of ALINT.

Appearance Preferences New options Export and Import are available in the Tools | Appearance menu. The Export option allows saving color and font settings to a configuration file (.appearance). To load a configuration file use the Import option from the Tools | Appearance menu. (SPT19474, SPT47552)

Preferences and Design Properties The Design units to skip during checking, Global clock signals and Global reset signals are design specific entries and now they are available in design properties only (not available in global preferences any more).

541

ALINT
HTML Viewer

Release History

The Embedded HTML Viewer is now available on Linux. (SPT20456) By default, the ALINT product documentation is opened in the embedded HTML Viewer. To change this behavior use the Environment | Documentation category of the Preferences dialog box. (SPT20845)

Basic plug-ins (ALDEC) These plug-ins contain basic rules recommended for getting started with the tool. ALDEC plug-ins are complementary to the other plug-ins. ALDEC_VHDL: The basic rule plug-in has been extended and now it includes 22 VHDL rules. ALDEC_VLOG: The basic rule plug-in has been extended and now it includes 46 Verilog rules.

ALDEC Rules Improvements ALDEC_VHDL.2201 rule reported false violations. Now it works correctly. (SPT47890, SPT48033, SPT47005)

RMM Rule Plug-in This dual-language plug-in automates design rules and guidelines that are provided in the Reuse Methodology Manual (RMM). RMM is the industry-proven 300+ page manual which defines the design methodology for effective design reuse and verification. It contains detailed guidelines and design examples on design practices and coding. The RMM plug-in has been extended and now it includes 76 rules.

STARC Rule Plug-ins Semiconductor Technology Academic Research Center (STARC) is a consortium of major Japanese ASIC foundries that has established a set of industry-proven design rule guidelines. STARC plug-ins contain automated design guidelines that cover wide range of design issues, from naming conventions and synthesizability to advanced topics such as optimizations, clock domain crossings, and design for test. STARC_VHDL: The plug-in has been extended and now it includes 156 VHDL rules. STARC_VLOG: The plug-in has been extended and now it includes 198 Verilog rules.

542

ALINT
STARC Rules Improvements

Release History

clock, reset, or enable ports can be skipped in the STARC_VLOG.3.1.3.2 DESIRED_PORT_ORDER rule parameter definition. In this case such ports are treated as regular inputs. The same behavior is implemented for the STARC_VHDL.3.1.3.2 rule. (SPT48181) New EXCEPTION_FOR_INTERFACE_SIGNALS parameter was added for the rule STARC_VHDL.1.1.1.5. Once enabled the rule allows different letter case for components and connected signals. (SPT48201) If a signal is used as asynchronous reset and also connected to enable or data pin of the same flip-flop then this signal is recognized as implicit synchronous reset as well and STARC_VHDL.1.3.1.6 rule violation is issued. (SPT47987)

Macro Commands The -vc10 argument has been added to the ccomp command. The new argument allows changing the back-end C/C++ compiler. Instead of using the default gcc, the command will call Microsoft Visual Studio 10.0. This argument is available only under Windows. The -vc10 argument is an equivalent of the Compiler type option available in the Languages | C/C++ | General category of the Preferences dialog box. The -alint_exclusions argument has been added to the alog, acom, asim, and alint commands. The argument is used to specify the name of .alintexclusions file. Exclusions files provide convenient way to disabling specified rules for particular elements - files, design units, and instances.

Problems Corrected in Version 2010.06

Verilog Linting False ALDEC_VLOG.1017 rule violation had been issued on for statement header. (SPT48221) Unknown error occurred when analyzed file name was implicitly specified twice on the command line (+libext+ argument that specifies extension of files to compile and regular file in the same folder). alog +libext+.v -y ./ -alint ./test.v Currently there is no failure in this case. (SPT47737)

VHDL Linting Working library was not updated properly - letter case in VHDL signal names was not updated after re-compilation. This problem caused false STARC_VHDL.1.1.1.9 and STARC_VHDL.1.3.1.3 rules violations. (SPT48249) Entity name was checked in the architecture definition and false violations have been issued for the rule STARC_VHDL.1.1.1.9. Now it is checked in the entity definition only. (SPT48242) STARC_VHDL.1.1.5.2 rule IDENT_CHAR_NUMBER parameter is now properly precessed. (SPT47904)

543

ALINT
Tcl and Macro Commands Using selected packages from the tcllib library could result in an error at exit. (SPT47779)

Release History

Library System The library system has been enhanced to support large library files. In the previous version library files (.lib, .mgf) that grew larger than 2GB could cause unexpected behavior during compilation and elaboration-time linting, or library refresh.

Documentation Example for the STARC_VHDL.1.1.1.2 rule now reflects the rule behavior properly. (SPT48209) Description of how to join more than two clock signals into the same domain using -alint_gclk command line argument has been cleared. (SPT47981) HTML documentation resources are fixed (STARC_VHDL.1.7.1.1, STARC_VHDL.2.1.8.10, STARC_VHDL.2.3.2.2, STARC_VHDL.2.6.1.3, STARC_VHDL.3.5.6.7). (SPT47788, SPT47782) Description of command line execution mode was extended. (SPT47781)

Known Problems

General ALINT GUI for Linux does not work reliably over remote connections from Windows machines running the Hummingbird Exceed X-Server version earlier than 13.0.14.542. This issue is not ALINT specific, it affects other softwares, including KDE applications running with the RENDER extension enabled. To work-around the issue upgrade to Hummingbird Exceed version 13.0.14.542 or newer. If you do not have access to the latest Hummingbird Exceed version or do not want to upgrade, change the widget look in ALINT. This can be done by editing the runalint script in the installation directory and specifying the -style switch for the alint executable. The -style switch must be followed by the style name: windows, motif, cleanlooks, or cde. Do not use the plastique style. This style causes frequent crashes in the X-Server. Software for detection of the input language and automatic switching of the keyboard layout may crash ALINT. (ANT21)

Chip Level Engine There is no possibility to set an instance output as global clock or reset signal (e.g. when DCM is used). sub (.in(d), .out(clk)); Considering the example out cannot be specified for -alint_gclk argument directly: alint -alint_gclk top.sub.out -asim top

544

ALINT

Release History

The following workaround can be used - specify signal connected to the output as global clock (reset). alint -alint_gclk top.clk -asim top

Exclusions Files Exclusions files mechanism does not work properly with a few rules during the elaboration-time linting. Configuration name should be specified manually with typing entyty_name(configuration_name) (it cannot be chosen from Add new design unit drop-down list).

Flow Manager Critical rules are not highlighted when resulting .avdb file is closed automatically and then reopened (it happens when a stage is re-executed). Design properties option that override a global one is not displayed properly in a stage properties. However the actual option value is used during a stage execution.

Framework Documents tabs are shifted to the right while saving document or dragging the window boundary. (ARG2678)

HDL Editor ALINT allows setting fonts that are invisible in the Preview area in the Preferences dialog box. On some Linux distributions such fonts can cause application errors. (WOW1082)

Library Manager All libraries are collapsed each time the Refresh option is used. (MRP1816)

File Browser The File Browser is not refreshed automatically after a new file is created. You need to switch focus to the browser or click the Reload button. (KAM2252)

Macro Commands The script engine may take a long time (a couple of seconds) to detect that a given command does not exist. (PSL724)

545

ALINT

Release History

Reaching Technical Support


If you experience any problems with the software, please submit your support request at: http://support.aldec.com/ContactSupport/. Remember to include the following information: Your name, company name, phone/fax number, e-mail address The license file Detailed description of the problem

546

ALINT

Release History

Release Notes for ALINT 2010.10


These Release Notes list new features, changes, and fixes to ALINT implemented since the prior version, i.e. ALINT 2010.06.

What's New

Phase-Based Linting

Flow Methodology Now it is possible to organize the flow structure in a hierarchical manner, so that phases may be grouped. A multi-level flow satisfies the needs of hierarchically organized design checking procedures. This is useful to group related issues addressing particular technology aspects. Grouping rules by topics provides significant advantages over addressing all the aspects at once. Within a smaller group of related rules it is much easier to identify interdependencies between root-causes and detailed rule reports. This simplifies the complicated task of creating effective flows catching the root-causes first. Well-classified flow naturally reflects the cumulative in-house technical knowledge and experience.

Flow Editor Flow documents (.alintflow files) can now be created and easily maintained in GUI within a new dedicated Flow Editor window. The following operations were moved from the Flow Manager window to the Flow Editor: Creating and editing .alintflow files Organizing phase structure and setting execution order Defining pass criteria Customizing phase preferences

The responsibilities of the Flow Manager window are now restricted to flows execution and the monitoring of phase results. After a fine-grain flow is prepared in Flow Editor, there is no frequent need for its modification, and users may focus on running the flows and analyzing the feedback in Flow Manager. Phases are now associated with their own linting policies (.alintpolicy files). An embedded Policy Editor; may be used to create and modify phase policies without leaving the Flow Manager window. There is no longer a need to prepare phase policies manually in advance, as they are now created and attached automatically. Also no effort is necessary to make these policies visible for the linting engine, as search path settings are configured implicitly. When a rule is included to the phase pass criterion, the severity is automatically set to Critical Warning level in the phase policy.

547

ALINT
Create New Flow Wizard

Release History

The wizard was extended with a new flow type - Based on Classification - to automatically build a hierarchical flow structure matching the selected rule classification. It is possible to select parts of the classification hierarchy that should be imported to the new flow. Policies associated with the phases in the new flow are filled with all corresponding rules from classification chapters.

Chip Level Engine Internal clocks and resets are now handled more accurately by ALINT. Currently it is possible to verify correctness of the internal clock and reset signals generation schemes and their connections with other design elements. Now ALINT is capable of classifying design instances for the needs of special hierarchical design rules that help achieve the optimal layout. The classification is based on splitting the design on relatively independent hierarchical segments of limited size. The segments are usually processed by synthesis and layout tools independently. Those segments are often referred to as 'basic blocks'. It is assumed that design hierarchy consists of 2 levels: Basic blocks that implement portions of the chip functionality. Upper-level blocks that only contain the structural connections between the basic blocks and system-wide resources, such as clock, reset, external interfaces, and memories.

Licensing New license ALINT_EDU (Educational Edition) is provided in terms of Aldec's University Program (http://www.aldec.com/Company/University). This license gives access to a limited number of the software's basic features that are essential for students to learn and use. The following features are available under the ALINT_EDU license: Basic rule plug-ins (ALDEC_VLOG, ALDEC_VHDL) Limited functionality of Violation Viewer Limitation of the license (disabled features): Configuration management windows (Policy Editor, Ruleset Editor) AVDB files comparison Violation Viewer export options (to .txt, .csv, and .html formats) Custom rules support Vendor primitives support

548

ALINT
Graphical User Interface

Release History

Configuration Viewer A new item is added to the pop-up menu: Set as Active Policy. A currently selected policy (either built-in or custom) can be activated for current design directly from Configuration Viewer.

Violation Viewer The accessibility of rule exclusions entry for a particular design context was enhanced. Integration of Exclusions Editor with Violation Viewer provides a convenient way to adjust exclusion settings while doing the results analysis. It is possible to disable the selected rule for a source file, design unit or HDL instance directly from Violation Viewer just using the corresponding options in pop-up menu. (SPT46528) Active Policy column is now available in the Violation Viewer main panel, and indicates whether a rule is enabled or disabled within the active policy for configuration convenience.

AVDB Compare Dialog To make comparison of violation databases more convenient the AVDB Compare dialog was reorganized and now is available in two modes: Basic AVDB Compare dialog with the most essential options are required to compare violation databases. Advanced AVDB Compare dialog that provides filters to narrow the scope of violations to compare and enables generation of comparison summary report.

HDL Editor Autocomplete for macro files has been enhanced. (SPT20433) Autocomplete in the HDL Editor now works similarly to Autocomplete in the Console, that is: Commands that control the GUI. For example, commands that typically consist of several words joined by dots, e.g. lm.tree.select, can be completed to the nearest dot. Native Tcl commands and commands defined by the user with the Tcl proc command can be completed. Prompts for command arguments are available. For example, the HDL Editor will show a complete list of options for the alint command after you type alint -. File path prompts are available for commands that accept file path arguments. For example, after typing the name of the compiler (acom,alog, etc.) followed by ./, the prompt in the HDL Editor will show all files and subdirectories from the current directory.

549

ALINT

Release History

Now the Toggle Columnar Selection button that can be used to toggle the Columnar Selection mode is available on the Tools toolbar in the HDL Editor. The Alt+C keyboard shortcut is an equivalent of using the Toggle Columnar Selection button. When the Columnar Selection mode is set, put the mouse pointer above the desired text, press the left mouse button and move the mouse to make the column selection. (SPT48972)

Library Manager The new Copy Testbench option from the context menu allows generating the testbench source code and inserting it to any source file document. The Copy VHDL Component Declaration, Copy VHDL Instantiation and Copy Verilog Instantiation options copy to the clipboard a part of code representing component declaration or instantiation statement of any design unit residing in the selected library. Settings for the Copy VHDL Instantiation, Copy Verilog Instantiation and Copy Testbench options can be specified in the Tools | Library Manager category of the Preferences dialog box. (SPT20581, SPT48973, SPT48974) The configuration unit now contains the entity and architecture compiled for that entity. (STK224)

Find Results It is now possible to search multiple files using the new Find in Files command available from the Edit menu. The search scope can be set to the current directory, all opened documents, files compiled into working library, the active design, or the entire workspace. Search results are shown in the Find Results window in a tree-like view comprising directories, subdirectories, files, and matching lines within the files. (SPT22061) It is now possible to replace text in multiple files using either the new Replace In Files option from the Edit menu or the Replace in Selected Files button in the Find Results window. In the latter case, you can select which matches should or should not be replaced by selecting or clearing the check box in front of a matching line, file, or subdirectory. (The check box should be set prior to invoking Replace In Selected Files.) (SPT22061)

Embedded HTML Viewer The embedded HTML Viewer in ALINT for Linux can now read the proxy settings from the HTTP_PROXY environment variable. This behavior follows a common Linux practice. The variable can be set to the name and port of the host where the proxy is running, for example: HTTP_PROXY=http://192.168.1.100:8080

Rule Plug-ins A new severity level named Critical Warning is now available. Severity levels grow by relevance in the following order: Info, Warning, Critical Warning, and Error. Critical Warning and Error severity levels indicate that a rule should have the highest priority for the

550

ALINT

Release History

user. Unlike Error severity level, Critical Warning violations do not interrupt the compilation/elaboration process. Rules having the severity level Critical Warning are treated as a pass criterion of linting flow phases. Messages with Critical Warning severity are displayed in the Console similarly to Warning messages with additional "Critical: " prefix in the beginning of the message. Violation Viewer provides controls for filtering and grouping violations of Critical Warning severity.

STARC Semiconductor Technology Academic Research Center (STARC) is a consortium of major Japanese ASIC foundries that has established a set of industry-proven design rule guidelines. STARC plug-ins contain automated design guidelines that cover wide range of design issues, from naming conventions and synthesizability to advanced topics such as optimizations, clock domain crossings, and design for test. STARC_VHDL: The plug-in has been extended and now includes 160 VHDL rules. STARC_VLOG: The plug-in has been extended and now includes 202 Verilog rules.

STARC Rules Improvements New rules verifying the design hierarchical structure are now supported: The top most hierarchy should contain only hierarchical blocks, and no logic gates should be placed directly (STARC_VHDL.1.6.1.4, STARC_VLOG.1.6.1.4); Make all basic blocks combinational circuit input and FF output (STARC_VHDL.1.6.2.1, STARC_VLOG.1.6.2.1); The upper levels of basic blocks should contain only the connections of each block (STARC_VHDL.1.6.4.1, STARC_VLOG.1.6.4.1). The behavior of STARC_VHDL.2.1.1.2 checker is now different from the original STARC VHDL RTL Design Style Guide specification by default. Using numeric_std package is de-facto an industry standard. Previously recommended std_logic_arith and std_logic_unsigned packages are considered obsolete due to portability issues, and are no longer recommended for use. The initial rule behavior is still accessible using the rule configuration parameter FORBIDDEN_LIBRARIES_LIST. (SPT49327) New configuration parameter FORBIDDEN_CHARACTERS_LIST was added to STARC_VHDL.1.1.1.9/STARC_VLOG.1.1.1.9 checkers. The list of forbidden characters for this rule is now customizable. (SPT49326) STARC_VHDL.2.1.4.2 rule level was changed from Rule to Suggestion to match the original rule level defined in STARC specification. (SPT47277)

551

ALINT

Release History

If a signal is used as an asynchronous reset and is also connected to enable or data pin of the same flip-flop then this signal is now recognized as an implicit synchronous reset as well, and STARC_VHDL.1.3.1.6 rule violation is issued. (SPT47987)

ALDEC These plug-ins contain basic rules recommended for getting started with the tool. ALDEC plug-ins are complementary to the other plug-ins. ALDEC_VHDL: The basic rule plug-in has been extended and now includes 24 VHDL rules. ALDEC_VLOG: The basic rule plug-in has been extended and now includes 48 Verilog rules.

RMM This dual-language plug-in automates design rules and guidelines that are provided in the Reuse Methodology Manual (RMM). RMM is the industry-proven 300+ page manual which defines the design methodology for effective design reuse and verification. It contains detailed guidelines and design examples on design practices and coding. The RMM plug-in has been extended and now includes 80 rules.

Macro Commands -alint_incremental argument was added to alint and asim commands. Using this argument speeds up the repetitive design analysis. This option enables caching the intermediate internal data built during elaboration-time phase. If there are no essential changes in the design structure, then the intermediate data from the previous elaboration-time session is re-used. This option has a significant impact on the speed of subsequent runs. A different policy can be quickly applied to the design without re-computing most of the internal data. This optimization has Beta status in this release, thus the -alint_incremental option is not enabled by default. The -alint_cdclog argument is renamed to -alint_synthesislog. The -alint_synthesislog lists the following information: external and internal clock/reset signals that were detected in the design; clock domain crossings information; the detailed information on source-destination and destination-source relations between registers; instances and the number of equivalent logic gates; storage element inferences and top-level interface port connections.

The -alint_blackbox argument is renamed to -alint_skipunit. The -alint_skipunit defines a design unit that is skipped by ALINT engine. Such design units are handled as if compiled without -alint argument. There is no confusion with synthesis-level black boxes anymore (that are inferred from modules

552

ALINT

Release History

with no implementation and unsupported vendor primitives). The msginfo command is now available also as a stand-alone executable and can be called from the operating system prompt. The command prints verbose descriptions of selected compiler and elaboration engine messages. Unlike the msginfo command in ALINT GUI, it cannot be invoked with the -html argument and display the description in the HTML format. (SPT49249)

Startup Macro The scripts/startup.tcl macro contains statements that will automatically source the script pointed by the ALDEC_STARTUPTCL operating system environment variable. This allows per-user customization of ALINT. To execute custom commands at ALINT startup, perform the following steps: Create a Tcl script and save it to a file. Such script could configure the GUI, set required variables, define custom procedures, etc. Set variable ALDEC_STARTUPTCL to the full path name of the script created in the previous step. The scripts/startup.tcl macro contains two statements that check the license expiration date and print a warning if less than a month is left. Those statements are by default commented out. To enable license expiration notice at startup, uncomment the two statements. (SPT49038)

FPGA Vendor Libraries Support ALINT now recognizes Xilinx vendor libraries both with new naming style (name ending with '_ver') and previous style (name starting with 'ovi_'). (SPT48984) Previous version was not able to recognize the instances of FPGA primitives from '_ver' libraries. The 'cycloneive' and 'ovi_cycloneive' Altera libraries are now supported.

Documentation The description of the API for User-Defined Rules was moved to the separate ALINT API Reference, and now it is available directly from the Help menu.

Installation The default installation directory on Windows changed from C:\Program Files\Aldec\ALINT-`<version`> to C:\Aldec\ALINT-`<version`>. (SPT48425, SPT48311)

Problems Corrected in Version 2010.10

553

ALINT
Chip Level Engine

Release History

Previously, there was no possibility to set an instance output as a global clock or reset signal, for example when DCM was used. sub (.in(d), .out(clk)); Currently global attributes can be applied to an instance output directly, for example ports can be marked as global clocks or resets.

Built-in Synthesis Engine Previously, an unknown error printed when a black box component and multiple non-tristate drivers were connected to the same pin along with flip-flop inference. (SPT48964) A crash also occurred when lpm library of Altera was used and there was port bit width mismatch. This does not occur in the new version. (SPT48981)

Verilog Linting It is now possible to specify a list of additional libraries to be searched for unresolved design units to the elaboration stage. (SPT48759)

VHDL Linting Previously, a false violation was issued by the STARC_VHDL.2.1.1.2 rule when having an arithmetic operation with a constant operand within the index expression. Now it is excluded from analysis, and no violation is issued in this case. (SPT48021) False warning from ALDEC_VHDL.2201 rule for fully referenced two-dimensional signal no longer appears. SPT49581

Exclusion files Previously, a crash occurred on Linux when linting a file containing lines with more than 110 characters and using -alint_exclusions argument in the command line. In the current version the crash no longer occurs. (STK244)

Flow Manager Critical rules are properly highlighted when .avdb file is reopened. (SPT49227) Previously, an error occurred while linting was executed via the Flow Manager and the tool installation folder did not have the write access. This problem no longer occurs. (SPT49084)

554

ALINT
Violation Viewer

Release History

When a design unit is excluded from linting using the -alint_skipunit (-alint_blackbox in previous releases) switch, all unit's violations from previous runs are now automatically removed from the AVDB file. Previously, such violations were not cleaned automatically. This behavior was a common source of confusion. (SPT49426)

Macro Commands Operator != can now be used when specifying the condition argument for the when command. The behavior of this operator is identical to the behavior of operator /=. Several rules were reporting violations at elaboration-time, regardless of the exclusion settings for the related source files. Violations are no longer reported for excluded files. (SPT49310)

Design Manager Previously, the Design Manager compiled files in the alphabetical order ignoring the order set by the user after a file was removed from the design. The problem persisted until the workspace was reopened. This behavior was corrected in the new version. (SPT48507)

Known Problems

General ALINT GUI for Linux does not work reliably over remote connections from Windows machines running the Hummingbird Exceed X-Server version earlier than 13.0.14.542. This issue is not ALINT specific, it affects other software, including KDE applications running with the RENDER extension enabled. To work-around the issue upgrade to Hummingbird Exceed version 13.0.14.542 or newer. If you do not have access to the latest Hummingbird Exceed version or do not want to upgrade, change the widget look in ALINT. This can be done by editing the runalint script in the installation directory and specifying the -style switch for the alint executable. The -style switch must be followed by the style name: windows, motif, cleanlooks, or cde. Do not use the plastique style. This style causes frequent crashes in the X-Server. ALINT GUI for Linux may crash over a remote connection from Windows running X Window server delivered with Cygwin version earlier than 1.5.3.0 (released 2009.01.21). The crash is most likely to happen when a new window or a new document (e.g. a new waveform) is created or closed. This issue is not ALINT specific, it may affect all programs running remotely and displayed on the X Window server delivered with Cygwin. To resolve the issue, upgrade to Cygwin version 1.7.1 or newer. (JKL1880) Software for detection of the input language and automatic switching of the keyboard layout may crash ALINT. (ANT21)

Exclusions Files Configuration name should be specified manually by typing entity_name(configuration_name) (Note: it cannot be chosen from Add new design unit drop-down list).

555

ALINT

Release History

Flow Manager and Flow Editor Design preferences that override global preferences are not displayed properly in the phase preferences dialog. This does not affect the phase execution, correct property values are taken regardless.

Framework Documents tabs are shifted to the right while saving document or dragging the window boundary. (ARG2678) When document tabs do not fit into the document area, clicking a tab somewhere in the middle of the tab row may shift all tabs, causing the clicked tab to appear either on the left or on the right edge of the document area. (ARG4000)

Library Manager All libraries are collapsed each time the Refresh option is used. (MRP1816)

File Browser The File Browser is not refreshed automatically after a new file is created. You need to switch focus to the browser or click the Reload button. (KAM2252)

Macro Commands The script engine may take a few seconds to detect that a given command does not exist. (PSL724) The find command does not work correctly for designs that have more than one top-level unit; only one top-level unit and its contents are searched. (REM208)

Reaching Technical Support


If you experience any problems with the software, please submit your support request at: http://support.aldec.com/ContactSupport/. Remember to include the following information: Your name, company name, phone/fax number, e-mail address The license file Detailed description of the problem

556

You might also like