The Verilog Netlist Parser

This document describes the function of the software unit that reads Verilog netlist files and stores the connectivity (with parameters) in the hierarchical database ZDB for later processing.

Introduction

In addition of using the StarVision PRO GUI to read Verilog netlist files either the stand alone binary verilog2zdb or the Tcl command zverilog can be used.

The verilog2zdb binary reads the given Verilog files and creates a binfile containing the connectivity of the input file:

verilog2zdb -o binfile.zdb <OPTIONS> <FILE.V>

The zverilog Tcl command reads the given Verilog files and returns the created in-memory database:

set db [zverilog <OPTIONS> <FILE.V>]

The Tcl command is available in the Console window of the StarVision PRO GUI and in the starsh shell .

This document describes the usage of this flow.

Options

Option Parameters Description

-argsFromFile

<file>

Read cmdline arguments from file.

-binlib

<file>

Open this binfile as a precompiled library.

-breakOnError | -breakOnErr

on|off

Stop on errors during parsing.
(The default value for this option is off.)

-connectByName

<netnamepattern>

Connect matching net by name, i.e. don’t route it.

-createBus

on|off

Create buses for ports with Verilog conform, consecutive numbering.
(The default value for this option is off.)

-createHier

<sep>

Create hierarchy from flat instance names. Split the instance names at the given hierarchy separator. If the given hierarchy separator character is an empty string then the hierarchy separator character is guessed.

-createUniqConsts

on|off

Create unique nets for all constants.
(The default value for this option is off.)

-debugFlag

<flag>

Enable a specific debug flag.

-define

<macro>

Define a Verilog macro on the command line.

+define+

<m>=<v>

Define Verilog macros on the command line.

-dontCut

Don’t cut long filenames in messages.

-F

<fileset>

Read Verilog fileset file. The files in the fileset are relative to the fileset file.

-f

<fileset>

Read Verilog fileset file. Files in the fileset are relative to the current working directory.

-forceSymlib

Overwrite existing symbols with the symbols from the given symbol library files (option -symlib).

-globalInclude

<file>

Define global Verilog include files. Global includes are processed before any other source files (this option can be repeated multiple times).

-guessBus

<open> <close>

Guess buses based on net and port names with a bit subscript enclosed in the given 'open' and 'close' characters.

-guessInstArray

<open> <close>

Guess instance arrays based on instance names with a bit subscript enclosed in the given 'open' and 'close' characters.

-help | -h

Print a help text with a short description of each option.

-hierSep

<hiersepchar>

Set the desired hierarchy separator 'hiersepchar' of your choice. Any character can be used. To be able to identify the hierarchy separator, a character that is not already used in an identifier should be used.

-incdir

<dir>

Define an include directory (this option can be repeated multiple times).

+incdir+

<d1>+<d2>…​

Define include directories.

-info

None|Error|Warning|Verbose|Debug

Level of verbosity for issued messages.
(The default value for this option is Error.)
(This option is only available for the verilog2zdb executable.)

-into

<dbname>

Compile the given files into an already existing database.
(This option is only available for the zverilog command.)

+libext+

<e1>+<e2>…​

Define the file name extensions for the -y option.

-logAppend

Append to logfile.

-logfile

<file>

Generate log file.
(This option is only available for the verilog2zdb executable.)

-netlistPattern

<pattern>

Matching files are structural Verilog files.

-noHierSep

Don’t search for a hierarchy separator.

-nologo

Print no greeting message.

-o | -out

<file>

Name of the zdb output binfile.
(This option is only available for the verilog2zdb executable.)

-pedantic

on|off

Toggle pedantic language checking mode (in relaxed mode some errors are just warnings and some warnings are suppressed).
(The default value for this option is on.)

-preserveAssign

on|off

Preserve assignments in the netlist.
(The default value for this option is off.)

-prog

Print progress information.
(This option is only available for the verilog2zdb executable.)

-reduceInvChain

on|off

Replace odd number of INVs in a chain by one INV and remove an even number of INVs in a chain.
(The default value for this option is off.)

-removeBuffer

on|off

Remove all BUF and WIDE_BUF instances and merge the connected nets.
(The default value for this option is off.)

-renameSuffix

<suffix>

Suffix for renaming duplicate cells.

-resolveDuplicates

on|off

Resolve duplicate cells. If "off" all duplicate cells are renamed.
(The default value for this option is on.)

-spos

on|off

Create source code references.
(The default value for this option is on.)

-suppress

<type> <pattern>

Suppress messages which match pattern.
(This option is only available for the verilog2zdb executable.)

-sym2zdb

Preload symbol library file(s) given with the -symlib option.

-symlib

<symlib>

Specify a symbol library file.

+systemverilogext+

<e1>+<e2>…​

Define SystemVerilog file name extensions.

-tempDir

<dir>

Specify a directory for temporary files.

-time

Print CPU time consumption (requires enabled progress updates).
(This option is only available for the verilog2zdb executable.)

-top

<name>

Define this module as the top module. If * is set, then all unreferenced cells are used as top.

-v

<libfile>

Read <libfile> as Verilog library file.

-validate

Validate DB before creating the zdb output file.

+verilog1995ext+

<e1>+<e2>…​

Define Verilog 1995 file name extensions.

+verilog2001ext+

<e1>+<e2>…​

Define Verilog 2001 file name extensions.

-wait_for_license | -waitForLicense

<sec>

Wait 'sec' seconds for a license. If the value is -1 then the started tool will not wait for the next free license. Use a value of 0 to wait forever.
(The default value for this option is -1.)
(This option is only available for the verilog2zdb executable.)

-y

<libdir>

Read files matching the extension given with +libext+ from the specified directory as Verilog library files.