<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.verific.com/faq/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vince</id>
		<title>Verific Design Automation FAQ - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.verific.com/faq/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vince"/>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Special:Contributions/Vince"/>
		<updated>2026-05-02T11:12:24Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=How_to_save_computer_resources&amp;diff=963</id>
		<title>How to save computer resources</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_save_computer_resources&amp;diff=963"/>
				<updated>2025-10-10T17:40:54Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are compile flags &amp;amp; runtime flags that may help to reduce memory consumption and/or runtime.&lt;br /&gt;
Below are some common ones.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERIFIC_MEMORY_MANAGER&amp;quot;    in util/VerificSystem.h&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Enables the new, zero-overhead, Verific memory manager. Typically reduces memory usage of the Verific software by an additional 20% over the default system memory manager.&lt;br /&gt;
 - Compile flag &amp;quot;DB_USE_PORT_ORDERED_PORTREF&amp;quot;     in database/DBCompileFlags.h&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Organizes the PortRef structures in an ordered array rather than a hash table. This saves a significant amount of memory since PortRefs are no longer individually allocated,&lt;br /&gt;
and the overhead of a hash table is also saved.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERILOG_QUICK_PARSE_V_FILES&amp;quot;     in verilog/VeriCompileFlags.h&lt;br /&gt;
Normally a -v file may contain multiple module definitions. The Verilog parser is supposed to pick only the required modules from that file.&lt;br /&gt;
&lt;br /&gt;
However, the file may not contain any of the required modules; instead it is a large file containing many other modules of no interest. In such a case, analyzing and creating a parse tree for the full file will consume much time and memory.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we provide this compile flag to quickly parse the file and see if it is actually required or not, without creating the parse tree. If it is not required we will ignore the file, otherwise we will fully parse it and pick the required modules.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERIFIC_LINEFILE_INCLUDES_COLUMNS&amp;quot;     in util/VerificSystem.h&lt;br /&gt;
If you don't need the starting and ending locations including column info, turn this flag off.&lt;br /&gt;
&lt;br /&gt;
For more details, see [[LineFile data from input files|LineFile data from input files]]&lt;br /&gt;
 - Runtime flag &amp;quot;veri_improve_include_dir_processing_runtime_for_network_file_system&amp;quot;&lt;br /&gt;
Adds directory caching for include directories with simple files (files without a directory specification).&lt;br /&gt;
&lt;br /&gt;
We read the contents of the directory on first encountering it while checking for an include file. Subsequent searches will find the file in the cache instead of the actual disk.&lt;br /&gt;
&lt;br /&gt;
The cache is automatically cleared at the end of the veri_file::Analyze() or veri_file::AnalyzeMultipleFiles() calls. Note that we cannot keep it alive after the two analyze calls since there could possibly be a chdir() call which would make the cache invalid.&lt;br /&gt;
 - Runtime flag &amp;quot;veri_share_nodes_in_static_elab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Reduces memory and runtime for large designs. This flag will ensure that only one node will be created in static elaboration for each unique signature of a module, regardless of whether it is a top module or instantiated. The number of nodes that can be reduced depends on the nature of the design. For more details on this flag check [https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration here]&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;veri_ignore_always_constructs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This enables a &amp;quot;light-weighed&amp;quot; RTL elaboration. &amp;quot;always&amp;quot; constructs in the input RTL Verilog file will be skipped over.&lt;br /&gt;
&lt;br /&gt;
The output netlist is not complete, but is useful if you are interested only in module interfaces and instantiations.&lt;br /&gt;
&lt;br /&gt;
Note that this flag is active only during RTL elaboration, not analysis. The input files still need to be Verilog-legal.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_delete_view_contents_after_processing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Deletes the &amp;quot;contents&amp;quot; of a &amp;quot;view&amp;quot; after processing it, i.e., after creating the netlist. We still keep the &amp;quot;interface&amp;quot;, i.e., ports alive so that the view can be instantiated.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_link_case_insensitive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
EDIF LRM does not define how existing external cells (maybe parsed from another language) should be linked to EDIF cells. We implemented case-insensitive (linear) search for these, which causes an N^2 complexity problem that slows down the reader for very large designs. Switching to case-sensitive search significantly speeds up the process, but there may be incidental cases where the EDIF reader does not link to an existing cell parsed from a different file.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_keep_existing_view&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
When stitching designs from multiple files, a view may be defined in more than one file. By default (&amp;quot;edif_keep_existing_view&amp;quot; disabled), the view being currently read survives, replacing the existing view. This may slow down the process because the existing view and all of its references in the Netlist Database has to be updated.&lt;br /&gt;
&lt;br /&gt;
Enabling &amp;quot;edif_keep_existing_view&amp;quot; allows the reader to ignore the (duplicated) view being currently read. All references to the view being ignored will be updated to point to the existing view in the Netlist Database. Only the references to the current view (in the current read operation) need to be updated to point to the existing view.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=How_to_save_computer_resources&amp;diff=962</id>
		<title>How to save computer resources</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_save_computer_resources&amp;diff=962"/>
				<updated>2025-10-10T17:36:45Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are compile flags &amp;amp; runtime flags that may help to reduce memory consumption and/or runtime.&lt;br /&gt;
Below are some common ones.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERIFIC_MEMORY_MANAGER&amp;quot;    in util/VerificSystem.h&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Enables the new, zero-overhead, Verific memory manager. Typically reduces memory usage of the Verific software by an additional 20% over the default system memory manager.&lt;br /&gt;
 - Compile flag &amp;quot;DB_USE_PORT_ORDERED_PORTREF&amp;quot;     in database/DBCompileFlags.h&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Organizes the PortRef structures in an ordered array rather than a hash table. This saves a significant amount of memory since PortRefs are no longer individually allocated,&lt;br /&gt;
and the overhead of a hash table is also saved.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERILOG_QUICK_PARSE_V_FILES&amp;quot;     in verilog/VeriCompileFlags.h&lt;br /&gt;
Normally a -v file may contain multiple module definitions. The Verilog parser is supposed to pick only the required modules from that file.&lt;br /&gt;
&lt;br /&gt;
However, the file may not contain any of the required modules; instead it is a large file containing many other modules of no interest. In such a case, analyzing and creating a parse tree for the full file will consume much time and memory.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we provide this compile flag to quickly parse the file and see if it is actually required or not, without creating the parse tree. If it is not required we will ignore the file, otherwise we will fully parse it and pick the required modules.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERIFIC_LINEFILE_INCLUDES_COLUMNS&amp;quot;     in util/VerificSystem.h&lt;br /&gt;
If you don't need the starting and ending locations including column info, turn this flag off.&lt;br /&gt;
&lt;br /&gt;
For more details, see [[LineFile data from input files|LineFile data from input files]]&lt;br /&gt;
 - Runtime flag &amp;quot;veri_improve_include_dir_processing_runtime_for_network_file_system&amp;quot;&lt;br /&gt;
Adds directory caching for include directories with simple files (files without a directory specification).&lt;br /&gt;
&lt;br /&gt;
We read the contents of the directory on first encountering it while checking for an include file. Subsequent searches will find the file in the cache instead of the actual disk.&lt;br /&gt;
&lt;br /&gt;
The cache is automatically cleared at the end of the veri_file::Analyze() or veri_file::AnalyzeMultipleFiles() calls. Note that we cannot keep it alive after the two analyze calls since there could possibly be a chdir() call which would make the cache invalid.&lt;br /&gt;
 - Runtime flag &amp;quot;veri_share_nodes_in_static_elab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Reduces memory and runtime for large designs. This flag will ensure that only one node will be created in static elaboration for each unique signature of a module, regardless of whether it is a top module or instantiated. The number of nodes that can be reduced depends on the nature of the design. For more details on this flag check [https://www.verific.com/faq/index.php?title=Source_code_customization_%26_Stable_release_services here]&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;veri_ignore_always_constructs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This enables a &amp;quot;light-weighed&amp;quot; RTL elaboration. &amp;quot;always&amp;quot; constructs in the input RTL Verilog file will be skipped over.&lt;br /&gt;
&lt;br /&gt;
The output netlist is not complete, but is useful if you are interested only in module interfaces and instantiations.&lt;br /&gt;
&lt;br /&gt;
Note that this flag is active only during RTL elaboration, not analysis. The input files still need to be Verilog-legal.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_delete_view_contents_after_processing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Deletes the &amp;quot;contents&amp;quot; of a &amp;quot;view&amp;quot; after processing it, i.e., after creating the netlist. We still keep the &amp;quot;interface&amp;quot;, i.e., ports alive so that the view can be instantiated.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_link_case_insensitive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
EDIF LRM does not define how existing external cells (maybe parsed from another language) should be linked to EDIF cells. We implemented case-insensitive (linear) search for these, which causes an N^2 complexity problem that slows down the reader for very large designs. Switching to case-sensitive search significantly speeds up the process, but there may be incidental cases where the EDIF reader does not link to an existing cell parsed from a different file.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_keep_existing_view&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
When stitching designs from multiple files, a view may be defined in more than one file. By default (&amp;quot;edif_keep_existing_view&amp;quot; disabled), the view being currently read survives, replacing the existing view. This may slow down the process because the existing view and all of its references in the Netlist Database has to be updated.&lt;br /&gt;
&lt;br /&gt;
Enabling &amp;quot;edif_keep_existing_view&amp;quot; allows the reader to ignore the (duplicated) view being currently read. All references to the view being ignored will be updated to point to the existing view in the Netlist Database. Only the references to the current view (in the current read operation) need to be updated to point to the existing view.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration&amp;diff=961</id>
		<title>Parse tree node sharing in Static Elaboration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration&amp;diff=961"/>
				<updated>2025-10-10T17:31:18Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The static elaboration process internally creates a fully instantiated hierarchy tree where each node represents a top level or instantiations of design units. &lt;br /&gt;
&lt;br /&gt;
Consider the following design : &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    module top () ;&lt;br /&gt;
        parameter LOOP_LIMIT = 200 ;&lt;br /&gt;
        genvar i ;&lt;br /&gt;
        for ( i=0; i&amp;lt;LOOP_LIMIT; i++) begin : in_top&lt;br /&gt;
            mid m() ;&lt;br /&gt;
        end&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
    module mid () ;&lt;br /&gt;
        genvar i ;&lt;br /&gt;
        for ( i=0; i&amp;lt;100; i++) begin : in_mid&lt;br /&gt;
            bot #(i/10) b() ;&lt;br /&gt;
        end&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
    module bot () ;&lt;br /&gt;
        parameter P = 0 ;&lt;br /&gt;
        reg [P:0] w1 ;&lt;br /&gt;
    endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default static elaboration will create a hierarchy tree with 20201 nodes (1 for module 'top', 200 for 'mid', and 20000 for 'bot') for this design. &lt;br /&gt;
&lt;br /&gt;
Note that if the runtime flag 'veri_alternative_generate_elab' is set, additional nodes will be created for each generate block (200 block nodes for block 'in_top' and 20000 for 'in_mid') resulting in a total of 40401 nodes created. &lt;br /&gt;
&lt;br /&gt;
Static elaboration, being an iterative process, traverses this hierarchy tree multiple times to resolve hierarchical names, defparams, and bind statements.  It evaluates parameters and elaborates generate constructs. This may lead to long runtimes for big designs with many modules and instantiations. Moreover a large amount of memory may be required to create this many nodes.&lt;br /&gt;
&lt;br /&gt;
The runtime flag &amp;quot;veri_share_nodes_in_static_elab&amp;quot; was introduced to reduce runtime and memory for large designs. It will ensure that only one node will be created in static elaboration for each unique signature of a module (top or instantiated). So for the above design, elaboration will use only 1 node for module 'mid' as it has no parameter overwrite. However, module 'bot' will have multiple signatures like 'bot(P=1)', 'bot(P=2)' etc and so multiple nodes will be created for module 'bot'. If a design contains hierarchical names, more nodes can be created to resolve such names.&lt;br /&gt;
&lt;br /&gt;
The number of nodes that can be reduced largely depends on the nature of the design, which in turn reflects on the runtime and memory improvements. &lt;br /&gt;
&lt;br /&gt;
Limitation: For VHDL or mixed language designs, nodes are created for VHDL instances and top levels as well. However, VHDL nodes are currently not shared under this runtime flag. It applies only to the Verilog/SystemVerilog nodes.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration&amp;diff=960</id>
		<title>Parse tree node sharing in Static Elaboration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration&amp;diff=960"/>
				<updated>2025-10-10T17:29:12Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The static elaboration process internally creates a fully instantiated hierarchy tree where each node represents a top level or instantiations of design units. &lt;br /&gt;
&lt;br /&gt;
Consider the following design : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
    module top () ;&lt;br /&gt;
        parameter LOOP_LIMIT = 200 ;&lt;br /&gt;
        genvar i ;&lt;br /&gt;
        for ( i=0; i&amp;lt;LOOP_LIMIT; i++) begin : in_top&lt;br /&gt;
            mid m() ;&lt;br /&gt;
        end&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
    module mid () ;&lt;br /&gt;
        genvar i ;&lt;br /&gt;
        for ( i=0; i&amp;lt;100; i++) begin : in_mid&lt;br /&gt;
            bot #(i/10) b() ;&lt;br /&gt;
        end&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
    module bot () ;&lt;br /&gt;
        parameter P = 0 ;&lt;br /&gt;
        reg [P:0] w1 ;&lt;br /&gt;
    endmodule&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default static elaboration will create a hierarchy tree with 20201 nodes (1 for module 'top', 200 for 'mid', and 20000 for 'bot') for this design. &lt;br /&gt;
&lt;br /&gt;
Note that if the runtime flag 'veri_alternative_generate_elab' is set, additional nodes will be created for each generate block (200 block nodes for block 'in_top' and 20000 for 'in_mid') resulting in a total of 40401 nodes created. &lt;br /&gt;
&lt;br /&gt;
Static elaboration, being an iterative process, traverses this hierarchy tree multiple times to resolve hierarchical names, defparams, and bind statements.  It evaluates parameters and elaborates generate constructs. This may lead to long runtimes for big designs with many modules and instantiations. Moreover a large amount of memory may be required to create this many nodes.&lt;br /&gt;
&lt;br /&gt;
The runtime flag &amp;quot;veri_share_nodes_in_static_elab&amp;quot; was introduced to reduce runtime and memory for large designs. It will ensure that only one node will be created in static elaboration for each unique signature of a module (top or instantiated). So for the above design, elaboration will use only 1 node for module 'mid' as it has no parameter overwrite. However, module 'bot' will have multiple signatures like 'bot(P=1)', 'bot(P=2)' etc and so multiple nodes will be created for module 'bot'. If a design contains hierarchical names, more nodes can be created to resolve such names.&lt;br /&gt;
&lt;br /&gt;
The number of nodes that can be reduced largely depends on the nature of the design, which in turn reflects on the runtime and memory improvements. &lt;br /&gt;
&lt;br /&gt;
Limitation: For VHDL or mixed language designs, nodes are created for VHDL instances and top levels. However, such VHDL nodes are not shared yet under this runtime flag. It applies only to the Verilog/SystemVerilog nodes.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration&amp;diff=959</id>
		<title>Parse tree node sharing in Static Elaboration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_tree_node_sharing_in_Static_Elaboration&amp;diff=959"/>
				<updated>2025-10-10T17:27:14Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Created page with &amp;quot;The static elaboration process internally creates a fully instantiated hierarchy tree where each node represents a top level or instantiations of design units.   Consider the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The static elaboration process internally creates a fully instantiated hierarchy tree where each node represents a top level or instantiations of design units. &lt;br /&gt;
&lt;br /&gt;
Consider the following design : &lt;br /&gt;
&lt;br /&gt;
    module top () ;&lt;br /&gt;
        parameter LOOP_LIMIT = 200 ;&lt;br /&gt;
        genvar i ;&lt;br /&gt;
        for ( i=0; i&amp;lt;LOOP_LIMIT; i++) begin : in_top&lt;br /&gt;
            mid m() ;&lt;br /&gt;
        end&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
    module mid () ;&lt;br /&gt;
        genvar i ;&lt;br /&gt;
        for ( i=0; i&amp;lt;100; i++) begin : in_mid&lt;br /&gt;
            bot #(i/10) b() ;&lt;br /&gt;
        end&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
    module bot () ;&lt;br /&gt;
        parameter P = 0 ;&lt;br /&gt;
        reg [P:0] w1 ;&lt;br /&gt;
    endmodule&lt;br /&gt;
&lt;br /&gt;
By default static elaboration will create a hierarchy tree with 20201 nodes (1 for module 'top', 200 for 'mid', and 20000 for 'bot') for this design. &lt;br /&gt;
&lt;br /&gt;
Note that if the runtime flag 'veri_alternative_generate_elab' is set, additional nodes will be created for each generate block (200 block nodes for block 'in_top' and 20000 for 'in_mid') resulting in a total of 40401 nodes created. &lt;br /&gt;
&lt;br /&gt;
Static elaboration, being an iterative process, traverses this hierarchy tree multiple times to resolve hierarchical names, defparams, and bind statements.  It evaluates parameters and elaborates generate constructs. This may lead to long runtimes for big designs with many modules and instantiations. Moreover a large amount of memory may be required to create this many nodes.&lt;br /&gt;
&lt;br /&gt;
The runtime flag &amp;quot;veri_share_nodes_in_static_elab&amp;quot; was introduced to reduce runtime and memory for large designs. It will ensure that only one node will be created in static elaboration for each unique signature of a module (top or instantiated). So for the above design, elaboration will use only 1 node for module 'mid' as it has no parameter overwrite. However, module 'bot' will have multiple signatures like 'bot(P=1)', 'bot(P=2)' etc and so multiple nodes will be created for module 'bot'. If a design contains hierarchical names, more nodes can be created to resolve such names.&lt;br /&gt;
&lt;br /&gt;
The number of nodes that can be reduced largely depends on the nature of the design, which in turn reflects on the runtime and memory improvements. &lt;br /&gt;
&lt;br /&gt;
Limitation: For VHDL or mixed language designs, nodes are created for VHDL instances and top levels. However, such VHDL nodes are not shared yet under this runtime flag. It applies only to the Verilog/SystemVerilog nodes.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=958</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=958"/>
				<updated>2025-10-10T17:10:57Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
* [[Python pretty-printer for gdb | Python pretty-printer for gdb]]&lt;br /&gt;
* [[Yosys-Verific Integration | Yosys-Verific integration]]&lt;br /&gt;
* [[How to enable long paths on Windows? | How to enable long paths on Windows?]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Port Expressions]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Modules with '_1' '_2' suffix in their names | Verilog: After static elaboration, there are modules with &amp;quot;_1&amp;quot;, &amp;quot;_2&amp;quot;, ..., suffix in their names. Why?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Parse tree node sharing in Static Elaboration | SystemVerilog: Parse tree node sharing in Static Elaboration.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units/interfaces with &amp;quot;_default&amp;quot; or &amp;quot;or &amp;quot;_1, _2&amp;quot; suffix in their names. What are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[How to use MessageCallBackHandler Class | Util/C++: How to use MessageCallBackHandler Class]]&lt;br /&gt;
* [[How to use RegisterPragmaRefCallBack() | Util/C++: How to use RegisterPragmaRefCallBack()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Post processing port resolution of black boxes | Database/C++: Post processing port resolution of black boxes]]&lt;br /&gt;
* [[Finding hierarchical paths of a Netlist | Database/C++: Finding hierarchical paths of a Netlist]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Type Range example | Database/Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Database/Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[Using TypeRange table to retrieve the originating type-range for an id | Database/Verilog/C++: Using TypeRange table to retrieve the originating type-range for an id]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[In Verilog parsetree adding names to unnamed instances | Verilog/C++: In Verilog parsetree adding names to unnamed instances]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Getting design hierarchy from input RTL files | Verilog/C++/Python: Getting design hierarchy from input RTL files]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Create DOT diagram of parse tree | Verilog/C++: Create DOT diagram of a parse tree]]&lt;br /&gt;
* [[How to evaluate a Verilog expression | Verilog/C++: How to evaluate a Verilog expression]]&lt;br /&gt;
* [[How to get parameters creation-time initial expression/value after Static Elaboration | Verilog/C++: How to get parameters creation-time initial expression/value after Static Elaboration]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Evaluate 'for-generate' loop | Verilog/C++: Evaluate 'for-generate' loop]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[How to replace a statement that has a label | SystemVerilog/C++: How to replace a statement that has a label]]&lt;br /&gt;
* [[How to insert/add a statement, or a module item, into a sequential block and a generate block | SystemVerilog/C++: How to insert/add a statement, or a module item, into a sequential block and a generate block]]&lt;br /&gt;
* [[Simple examples of VHDL visitor pattern | VHDL/C++: Simple examples of VHDL visitor pattern]]&lt;br /&gt;
* [[Traverse instances in parsetree | VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[How to evaluate a VHDL expression | VHDL/C++: How to evaluate a VHDL expression]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;br /&gt;
&lt;br /&gt;
'''INVIO Code examples'''&lt;br /&gt;
* [[Simple port modification | SystemVerilog/Python: Simple port modification]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Static_elaboration&amp;diff=957</id>
		<title>Static elaboration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Static_elaboration&amp;diff=957"/>
				<updated>2025-10-10T17:07:39Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: What does 'static elaboration' do?'''&lt;br /&gt;
&lt;br /&gt;
Static elaboration runs after analysis. It modifies the parsetree. During static elaboration:&lt;br /&gt;
&lt;br /&gt;
* Identify top-level modules and tree of instantiations under this.&lt;br /&gt;
* Defparam statements and module instantiations are processed to calculate the parameter values of the modules for every instantiation.&lt;br /&gt;
* Hierarchical names are checked for their validity and usage. These hierarchical names remain in designs.&lt;br /&gt;
* Generate statements are processed. For generate unrolled, if/case generate selects the correct concurrent statements to be present in the module.&lt;br /&gt;
* Instance arrays are flattened.&lt;br /&gt;
* Depending on hierarchical name usage and defparam values the same module gets different signatures. They are replicated and proper values are passed within them hierarchically before attaching them to the corresponding instantiations.&lt;br /&gt;
* In each module, parameter values are replaced with constant values by evaluating the constant expression assigned to them. Constant expressions include constant function calls, some system function calls AMS function calls and all operators.&lt;br /&gt;
* Function and task calls are checked for their validity (if they are defined in higher level of hierarchy and used in lower level).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sequential code, blocking assignments, tasks and functions are left as is because they are not part of any static context. Only exception are constant function calls - they are replaced with their return values.&lt;br /&gt;
&lt;br /&gt;
If the purpose of the application is to synthesize the design (RTL elaboration), static elaboration is not needed.&lt;br /&gt;
&lt;br /&gt;
Runtime flag 'veri_replace_const_exprs' when set to 1 is to replace following constant expressions with literals:&lt;br /&gt;
&lt;br /&gt;
* Bounds of packed and unpacked ranges in all data declarations.&lt;br /&gt;
* Default values of all declared objects if those are constant.&lt;br /&gt;
* Delay values&lt;br /&gt;
* Reject and error limits of VeriPathPulse values.&lt;br /&gt;
* Indexed expressions only if the indexed expression is a bit-select on the LHS of a continuous assignment or output/inout port of module or gate instantiation.&lt;br /&gt;
&lt;br /&gt;
Using 'veri_replace_const_exprs' makes an extra pass on the elaborated parsetree, increasing total time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are other runtime flags controlling static elaboration process, e.g.&lt;br /&gt;
&lt;br /&gt;
 veri_cleanup_base_modules&lt;br /&gt;
 veri_copy_top_before_static_elab&lt;br /&gt;
 veri_do_not_uniquify_interface_instances&lt;br /&gt;
 veri_preserve_array_instances&lt;br /&gt;
 veri_preserve_interface_array_instances&lt;br /&gt;
 veri_share_nodes_in_static_elab&lt;br /&gt;
 vhdl_uniquify_all_instances&lt;br /&gt;
 vhdl_copy_top_before_static_elab&lt;br /&gt;
 vhdl_replace_const_exprs&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Please see vhdl/VhdlRuntimeFlags.h and verilog/VeriRuntimeFlags.h for a complete list and for more details.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=How_to_save_computer_resources&amp;diff=956</id>
		<title>How to save computer resources</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_save_computer_resources&amp;diff=956"/>
				<updated>2025-10-10T16:51:32Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are compile flags &amp;amp; runtime flags that may help to reduce memory consumption and/or runtime.&lt;br /&gt;
Below are some common ones.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERIFIC_MEMORY_MANAGER&amp;quot;    in util/VerificSystem.h&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Enables the new, zero-overhead, Verific memory manager. Typically reduces memory usage of the Verific software by an additional 20% over the default system memory manager.&lt;br /&gt;
 - Compile flag &amp;quot;DB_USE_PORT_ORDERED_PORTREF&amp;quot;     in database/DBCompileFlags.h&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Organizes the PortRef structures in an ordered array rather than a hash table. This saves a significant amount of memory since PortRefs are no longer individually allocated,&lt;br /&gt;
and the overhead of a hash table is also saved.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERILOG_QUICK_PARSE_V_FILES&amp;quot;     in verilog/VeriCompileFlags.h&lt;br /&gt;
Normally a -v file may contain multiple module definitions. The Verilog parser is supposed to pick only the required modules from that file.&lt;br /&gt;
&lt;br /&gt;
However, the file may not contain any of the required modules; instead it is a large file containing many other modules of no interest. In such a case, analyzing and creating a parse tree for the full file will consume much time and memory.&lt;br /&gt;
&lt;br /&gt;
To prevent this, we provide this compile flag to quickly parse the file and see if it is actually required or not, without creating the parse tree. If it is not required we will ignore the file, otherwise we will fully parse it and pick the required modules.&lt;br /&gt;
&lt;br /&gt;
 - Compile flag &amp;quot;VERIFIC_LINEFILE_INCLUDES_COLUMNS&amp;quot;     in util/VerificSystem.h&lt;br /&gt;
If you don't need the starting and ending locations including column info, turn this flag off.&lt;br /&gt;
&lt;br /&gt;
For more details, see [[LineFile data from input files|LineFile data from input files]]&lt;br /&gt;
 - Runtime flag &amp;quot;veri_improve_include_dir_processing_runtime_for_network_file_system&amp;quot;&lt;br /&gt;
Adds directory caching for include directories with simple files (files without a directory specification).&lt;br /&gt;
&lt;br /&gt;
We read the contents of the directory on first encountering it while checking for an include file. Subsequent searches will find the file in the cache instead of the actual disk.&lt;br /&gt;
&lt;br /&gt;
The cache is automatically cleared at the end of the veri_file::Analyze() or veri_file::AnalyzeMultipleFiles() calls. Note that we cannot keep it alive after the two analyze calls since there could possibly be a chdir() call which would make the cache invalid.&lt;br /&gt;
 - Runtime flag &amp;quot;veri_share_nodes_in_static_elab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Reduces memory and runtime for large designs. This flag will ensure that only one node will be created in static elaboration for each unique signature of a module, regardless of whether it is a top module or instantiated. The number of nodes that can be reduced depends on the nature of the design. For more details on this flag check [https://www.verific.com/faq/index.php?title=Source_code_customization_%26_Stable_release_services here]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The output netlist is not complete, but is useful if you are interested only in module interfaces and instantiations.&lt;br /&gt;
&lt;br /&gt;
Note that this flag is active only during RTL elaboration, not analysis. The input files still need to be Verilog-legal.&lt;br /&gt;
 - Runtime flag &amp;quot;veri_ignore_always_constructs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This enables a &amp;quot;light-weighed&amp;quot; RTL elaboration. &amp;quot;always&amp;quot; constructs in the input RTL Verilog file will be skipped over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_delete_view_contents_after_processing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
Highly recommended.&lt;br /&gt;
&lt;br /&gt;
Deletes the &amp;quot;contents&amp;quot; of a &amp;quot;view&amp;quot; after processing it, i.e., after creating the netlist. We still keep the &amp;quot;interface&amp;quot;, i.e., ports alive so that the view can be instantiated.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_link_case_insensitive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
EDIF LRM does not define how existing external cells (maybe parsed from another language) should be linked to EDIF cells. We implemented case-insensitive (linear) search for these, which causes an N^2 complexity problem that slows down the reader for very large designs. Switching to case-sensitive search significantly speeds up the process, but there may be incidental cases where the EDIF reader does not link to an existing cell parsed from a different file.&lt;br /&gt;
&lt;br /&gt;
 - Runtime flag &amp;quot;edif_keep_existing_view&amp;quot;&lt;br /&gt;
&lt;br /&gt;
For EDIF input.&lt;br /&gt;
&lt;br /&gt;
When stitching designs from multiple files, a view may be defined in more than one file. By default (&amp;quot;edif_keep_existing_view&amp;quot; disabled), the view being currently read survives, replacing the existing view. This may slow down the process because the existing view and all of its references in the Netlist Database has to be updated.&lt;br /&gt;
&lt;br /&gt;
Enabling &amp;quot;edif_keep_existing_view&amp;quot; allows the reader to ignore the (duplicated) view being currently read. All references to the view being ignored will be updated to point to the existing view in the Netlist Database. Only the references to the current view (in the current read operation) need to be updated to point to the existing view.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Support_IEEE_1735_encryption_standard&amp;diff=919</id>
		<title>Support IEEE 1735 encryption standard</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Support_IEEE_1735_encryption_standard&amp;diff=919"/>
				<updated>2024-10-29T20:28:39Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Does Verific provide support for IEEE 1735 encryption standard?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: This article mentions only &amp;quot;encryption/decryption '''algorithms''',&amp;quot; but the same arguments also apply to &amp;quot;encryption/decryption '''keys'''.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Verific provides APIs with which our licensees can plug in their proprietary encryption/decryption algorithms.&lt;br /&gt;
 &lt;br /&gt;
For technical details, please see:&lt;br /&gt;
 &lt;br /&gt;
[http://www.verific.com/docs/index.php?title=Parsing_Protected_and_IEEE_1735_Encrypted_RTL_Files Parsing Protected and IEEE 1735 Encrypted RTL Files]&lt;br /&gt;
(contact Verific Tech Support if you don't have credentials for Verific Documentation).&lt;br /&gt;
 &lt;br /&gt;
There are application examples in Verific's software distribution:&lt;br /&gt;
 &lt;br /&gt;
    examples/verilog/parse_encrypted_RTL&lt;br /&gt;
    examples/verilog/parse_encrypted_RTL_1735style&lt;br /&gt;
&lt;br /&gt;
Verific does not implement nor provide our own encryption/decryption algorithms for several reasons:&lt;br /&gt;
&lt;br /&gt;
* If Verific were to provide encryption algorithms, we would have to provide the decryption algorithms. Verific has always been shipping source code and is not set up to ship binaries. If Verific shipped the implementations of the encryption/decryption algorithms in the form of C++ source code, that would defeat the purpose of encryption in the first place.&lt;br /&gt;
&lt;br /&gt;
* If Verific provided encryption/decryption algorithms, we would ship the same implementations to all of our licensees. Many licensees of our licensees are direct competitors of each other. A company would not want its competitors to have access to its encryption/decryption algorithms.&lt;br /&gt;
&lt;br /&gt;
* As a provider of encryption/decryption algorithms, Verific would be responsible for providing measures to prevent security breaches. Since the encryption/decryption implementations would be shipped to multiple licensees, there would be no guarantee that the algorithms would enjoy the same protection as the licensees' IPs would. It is not fair nor practical to expect Verific to bear this responsibility.&lt;br /&gt;
&lt;br /&gt;
So the task of encryption/decryption implementations is appropriately reserved to the licensee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Mixing preprocessor directives and encryption blocks'''&lt;br /&gt;
&lt;br /&gt;
The IEEE-1735 LRM is not clear about the precedence of protected blocks and `ifdef macros.  In fact there is a suggestion in Annex C.3 to ''not'' mix encrypted blocks and macros since the behavior could be ambiguous: &lt;br /&gt;
&lt;br /&gt;
''The SystemVerilog language has non-pragma preprocessor block syntaxes such as text-replacement macro definitions and conditional compilation `ifdefs. There are also known, non-LRM, tool pragma, and smart comment extensions that control behaviors such as coverage and synthesis for blocks of code. The relative precedence of these syntaxes is often unclear and the resulting HDL interpretation may be tool-dependent. HDL authors are advised to avoid these source ambiguities where possible.''&lt;br /&gt;
&lt;br /&gt;
Lets take this example:&lt;br /&gt;
&lt;br /&gt;
   module test ;&lt;br /&gt;
   `ifdef UNDEFINED_MACRO&lt;br /&gt;
     `pragma protect begin_protected&lt;br /&gt;
   `endif&lt;br /&gt;
   endmodule&lt;br /&gt;
&lt;br /&gt;
For the above code, popular simulators produce ERRORs even if UNDEFINED_MACRO is not defined in the RTL.  Apparently, the macro block does not cause the protected area to be ignored even though it is in the inactive region.&lt;br /&gt;
&lt;br /&gt;
Also, both `ifdef and `protected behave like text processing directives. They do not really follow language rules/semantics the way other constructs such as functions/modules, etc., do.  For example, a tool that encrypts a design containing a protection envelop does not care about other Verilog constructs including any macros present.  This is required so that the encrypted design can still include macros in the encrypted block and can refer to them later when the block is expanded.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Support_IEEE_1735_encryption_standard&amp;diff=918</id>
		<title>Support IEEE 1735 encryption standard</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Support_IEEE_1735_encryption_standard&amp;diff=918"/>
				<updated>2024-10-29T16:35:18Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Does Verific provide support for IEEE 1735 encryption standard?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: This article mentions only &amp;quot;encryption/decryption '''algorithms''',&amp;quot; but the same arguments also apply to &amp;quot;encryption/decryption '''keys'''.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Verific provides APIs with which our licensees can plug in their proprietary encryption/decryption algorithms.&lt;br /&gt;
 &lt;br /&gt;
For technical details, please see:&lt;br /&gt;
 &lt;br /&gt;
[http://www.verific.com/docs/index.php?title=Parsing_Protected_and_IEEE_1735_Encrypted_RTL_Files Parsing Protected and IEEE 1735 Encrypted RTL Files]&lt;br /&gt;
(contact Verific Tech Support if you don't have credentials for Verific Documentation).&lt;br /&gt;
 &lt;br /&gt;
There are application examples in Verific's software distribution:&lt;br /&gt;
 &lt;br /&gt;
    examples/verilog/parse_encrypted_RTL&lt;br /&gt;
    examples/verilog/parse_encrypted_RTL_1735style&lt;br /&gt;
&lt;br /&gt;
Verific does not implement nor provide our own encryption/decryption algorithms for several reasons:&lt;br /&gt;
&lt;br /&gt;
* If Verific were to provide encryption algorithms, we would have to provide the decryption algorithms. Verific has always been shipping source code and is not set up to ship binaries. If Verific shipped the implementations of the encryption/decryption algorithms in the form of C++ source code, that would defeat the purpose of encryption in the first place.&lt;br /&gt;
&lt;br /&gt;
* If Verific provided encryption/decryption algorithms, we would ship the same implementations to all of our licensees. Many licensees of our licensees are direct competitors of each other. A company would not want its competitors to have access to its encryption/decryption algorithms.&lt;br /&gt;
&lt;br /&gt;
* As a provider of encryption/decryption algorithms, Verific would be responsible for providing measures to prevent security breaches. Since the encryption/decryption implementations would be shipped to multiple licensees, there would be no guarantee that the algorithms would enjoy the same protection as the licensees' IPs would. It is not fair nor practical to expect Verific to bear this responsibility.&lt;br /&gt;
&lt;br /&gt;
So the task of encryption/decryption implementations is appropriately reserved to the licensee.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=902</id>
		<title>Create DOT diagram of parse tree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=902"/>
				<updated>2024-08-28T21:14:46Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example parses the r4000 design in the  &amp;lt;verific&amp;gt;/example_designs/verilog  directory and writes out a Graphviz DOT-format file that represents a simple diagram view of the design.&lt;br /&gt;
&lt;br /&gt;
There are several tools that can visualize DOT files.  On Linux distributions you can install 'dot'.  You would run this command to create a PDF output of the C++ application below &lt;br /&gt;
&lt;br /&gt;
    dot -Tpdf pp_out.dot -o r4000.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriExpression.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std ;&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main() &lt;br /&gt;
{&lt;br /&gt;
    char ppfile_nm[32] = &amp;quot;pp_out.dot&amp;quot;;&lt;br /&gt;
    char transition[64] ;&lt;br /&gt;
    unsigned module_cnt = 0 ;&lt;br /&gt;
    unsigned field_cnt = 0 ;&lt;br /&gt;
    Array transition_table ;&lt;br /&gt;
    Array instantiation_table ;&lt;br /&gt;
    Array module_table ;&lt;br /&gt;
&lt;br /&gt;
    ofstream ofs(ppfile_nm, std::ios::out) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;r4000.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;digraph Verific {&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   rankdir = LR&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   node [shape=plaintext]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   edge [dir=forward]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    Array *tops = veri_file::GetTopModules() ;&lt;br /&gt;
&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    VeriModule *mod, *top ;&lt;br /&gt;
    unsigned i ;&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod) {&lt;br /&gt;
        if (!mod || mod-&amp;gt;IsPackage() || mod-&amp;gt;IsRootModule()) continue ;&lt;br /&gt;
        module_table.Insert(mod) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    unsigned mc ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;module_table, mc, mod) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   cell&amp;quot; &amp;lt;&amp;lt; module_cnt ; &lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot; [label=&amp;lt; &amp;lt;TABLE BORDER=\&amp;quot;0\&amp;quot; CELLBORDER=\&amp;quot;1\&amp;quot; CELLSPACING=\&amp;quot;0\&amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;   &lt;br /&gt;
&lt;br /&gt;
        unsigned found = 0 ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(tops, i, top) {&lt;br /&gt;
            if (Strings::compare(top-&amp;gt;Name(), mod-&amp;gt;Name())) {&lt;br /&gt;
                found = 1 ;&lt;br /&gt;
                break ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (found)&lt;br /&gt;
            ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; COLOR=\&amp;quot;red\&amp;quot; BGCOLOR=\&amp;quot;yellow\&amp;quot;&amp;gt; &amp;lt;FONT COLOR=\&amp;quot;red\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/FONT&amp;gt; &amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        else &lt;br /&gt;
            ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; BGCOLOR=\&amp;quot;gray\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
        Array *ports = mod-&amp;gt;GetPorts();&lt;br /&gt;
        if (ports) {&lt;br /&gt;
            VeriIdDef *port ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(ports, i, port) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   port : &amp;quot; &amp;lt;&amp;lt; port-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *params = mod-&amp;gt;GetParameters();&lt;br /&gt;
        if (params) { &lt;br /&gt;
            VeriIdDef *param ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(params, i, param) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   parameter : &amp;quot; &amp;lt;&amp;lt; param-&amp;gt;Name() ;&lt;br /&gt;
                VeriExpression *initvalue = param-&amp;gt;GetInitialValue();&lt;br /&gt;
                if (initvalue) &lt;br /&gt;
                    ofs &amp;lt;&amp;lt; &amp;quot; = &amp;quot; &amp;lt;&amp;lt; initvalue-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *module_items = mod-&amp;gt;GetModuleItems() ;&lt;br /&gt;
        VeriModuleItem *module_item ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(module_items, i, module_item) {&lt;br /&gt;
            switch (module_item-&amp;gt;GetClassId()) {&lt;br /&gt;
                case ID_VERIMODULEINSTANTIATION:&lt;br /&gt;
                {&lt;br /&gt;
                    VeriModuleInstantiation *mod_inst = static_cast&amp;lt;VeriModuleInstantiation*&amp;gt;(module_item) ;&lt;br /&gt;
                    unsigned j ;&lt;br /&gt;
                    VeriInstId *inst_id ;&lt;br /&gt;
                    FOREACH_ARRAY_ITEM(mod_inst-&amp;gt;GetIds(), j, inst_id) {&lt;br /&gt;
                        if (!inst_id) continue ; &lt;br /&gt;
&lt;br /&gt;
                        instantiation_table.Insert(inst_id) ;&lt;br /&gt;
                        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   instantiation : &amp;quot; &amp;lt;&amp;lt; mod_inst-&amp;gt;GetModuleName() &amp;lt;&amp;lt; &amp;quot; : &amp;quot; &amp;lt;&amp;lt; inst_id-&amp;gt;InstName() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
                        unsigned k ;&lt;br /&gt;
						VeriModule *inst ;&lt;br /&gt;
                        FOREACH_ARRAY_ITEM(&amp;amp;module_table, k, inst) {&lt;br /&gt;
                            if (Strings::compare(inst_id-&amp;gt;GetModuleReference(), inst-&amp;gt;Name())) {&lt;br /&gt;
                                sprintf (transition, &amp;quot;   cell%d:f%d -&amp;gt; cell%d:f0 ;&amp;quot;, module_cnt, field_cnt, k) ;&lt;br /&gt;
                                char *trans = Strings::save(transition) ;&lt;br /&gt;
                                transition_table.Insert(trans) ;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        field_cnt++ ;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                default :  ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   &amp;lt;/TABLE&amp;gt; &amp;gt;] ;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        field_cnt = 0 ;&lt;br /&gt;
        module_cnt++ ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    char *trans ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;transition_table, i, trans) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; trans &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;}&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs.close();&lt;br /&gt;
&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=901</id>
		<title>Create DOT diagram of parse tree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=901"/>
				<updated>2024-08-28T21:12:56Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example parses the r4000 design in the  &amp;lt;verific&amp;gt;/example_designs/verilog  directory and writes out a Graphviz DOT-format file that represents a simple diagram view of the design.&lt;br /&gt;
&lt;br /&gt;
There are several tools that can visualize DOT files.  On Linux distributions you can install 'dot'.  You would run this command to create a PDF output of the C++ application below &lt;br /&gt;
&lt;br /&gt;
    dot -Tpdf pp_out.dot -o r4000.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriExpression.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std ;&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main() &lt;br /&gt;
{&lt;br /&gt;
    char ppfile_nm[32] = &amp;quot;pp_out.dot&amp;quot;;&lt;br /&gt;
    char transition[64] ;&lt;br /&gt;
    unsigned module_cnt = 0 ;&lt;br /&gt;
    unsigned field_cnt = 0 ;&lt;br /&gt;
    Array transition_table ;&lt;br /&gt;
    Array instantiation_table ;&lt;br /&gt;
    Array module_table ;&lt;br /&gt;
&lt;br /&gt;
    ofstream ofs(ppfile_nm, std::ios::out) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;r4000.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;digraph Verific {&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   rankdir = LR&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   node [shape=plaintext]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   edge [dir=forward]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    Array *tops = veri_file::GetTopModules() ;&lt;br /&gt;
&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    VeriModule *mod, *top ;&lt;br /&gt;
    unsigned i ;&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod) {&lt;br /&gt;
        if (!mod || mod-&amp;gt;IsPackage() || mod-&amp;gt;IsRootModule()) continue ;&lt;br /&gt;
        module_table.Insert(mod) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    unsigned mc ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;module_table, mc, mod) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   cell&amp;quot; &amp;lt;&amp;lt; module_cnt ; &lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot; [label=&amp;lt; &amp;lt;TABLE BORDER=\&amp;quot;0\&amp;quot; CELLBORDER=\&amp;quot;1\&amp;quot; CELLSPACING=\&amp;quot;0\&amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;   &lt;br /&gt;
&lt;br /&gt;
        unsigned found = 0 ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(tops, i, top) {&lt;br /&gt;
            if (Strings::compare(top-&amp;gt;Name(), mod-&amp;gt;Name())) {&lt;br /&gt;
                found = 1 ;&lt;br /&gt;
                break ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (found)&lt;br /&gt;
            ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; COLOR=\&amp;quot;red\&amp;quot; BGCOLOR=\&amp;quot;yellow\&amp;quot;&amp;gt; &amp;lt;FONT COLOR=\&amp;quot;red\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/FONT&amp;gt; &amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        else &lt;br /&gt;
            ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; BGCOLOR=\&amp;quot;gray\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
        Array *ports = mod-&amp;gt;GetPorts();&lt;br /&gt;
        if (ports) {&lt;br /&gt;
            VeriIdDef *port ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(ports, i, port) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   port : &amp;quot; &amp;lt;&amp;lt; port-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *params = mod-&amp;gt;GetParameters();&lt;br /&gt;
        if (params) { &lt;br /&gt;
            VeriIdDef *param ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(params, i, param) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   parameter : &amp;quot; &amp;lt;&amp;lt; param-&amp;gt;Name() ;&lt;br /&gt;
                VeriExpression *initvalue = param-&amp;gt;GetInitialValue();&lt;br /&gt;
                if (initvalue) &lt;br /&gt;
                    ofs &amp;lt;&amp;lt; &amp;quot; = &amp;quot; &amp;lt;&amp;lt; initvalue-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *module_items = mod-&amp;gt;GetModuleItems() ;&lt;br /&gt;
        VeriModuleItem *module_item ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(module_items, i, module_item) {&lt;br /&gt;
            switch (module_item-&amp;gt;GetClassId()) {&lt;br /&gt;
                case ID_VERIMODULEINSTANTIATION:&lt;br /&gt;
                {&lt;br /&gt;
                    VeriModuleInstantiation *mod_inst = static_cast&amp;lt;VeriModuleInstantiation*&amp;gt;(module_item) ;&lt;br /&gt;
                    unsigned j ;&lt;br /&gt;
                    VeriInstId *inst_id ;&lt;br /&gt;
                    FOREACH_ARRAY_ITEM(mod_inst-&amp;gt;GetIds(), j, inst_id) {&lt;br /&gt;
                        if (!inst_id) continue ; &lt;br /&gt;
&lt;br /&gt;
                        instantiation_table.Insert(inst_id) ;&lt;br /&gt;
                        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   instantiation : &amp;quot; &amp;lt;&amp;lt; mod_inst-&amp;gt;GetModuleName() &amp;lt;&amp;lt; &amp;quot; : &amp;quot; &amp;lt;&amp;lt; inst_id-&amp;gt;InstName() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
                        unsigned k ;&lt;br /&gt;
						VeriModule *inst ;&lt;br /&gt;
                        FOREACH_ARRAY_ITEM(&amp;amp;module_table, k, inst) {&lt;br /&gt;
                            if (Strings::compare(inst_id-&amp;gt;GetModuleReference(), inst-&amp;gt;Name())) {&lt;br /&gt;
                                sprintf (transition, &amp;quot;   cell%d:f%d -&amp;gt; cell%d:f0 ;&amp;quot;, module_cnt, field_cnt, k) ;&lt;br /&gt;
                                char *trans = Strings::save(transition) ;&lt;br /&gt;
                                transition_table.Insert(trans) ;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                        field_cnt++ ;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                default :  ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   &amp;lt;/TABLE&amp;gt; &amp;gt;] ;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        field_cnt = 0 ;&lt;br /&gt;
        module_cnt++ ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    char *trans ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;transition_table, i, trans) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; trans &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;}&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs.close();&lt;br /&gt;
&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Yosys-Verific_Integration&amp;diff=900</id>
		<title>Yosys-Verific Integration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Yosys-Verific_Integration&amp;diff=900"/>
				<updated>2024-08-23T16:05:25Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Yosys is an open source platform that works with a suite of EDA tools.  It is possible for a Verific user to integrate Verific with Yosys, which would replace the open source language parsers with Verific's industry-standard ones.  Below are several points of interest :&lt;br /&gt;
&lt;br /&gt;
*  The minimum requirement to use open source Yosys (as downloaded from YosysHQ  https://github.com/yosyshq/yosys) together with Verific software is to have either the VHDL or Verilog/SystemVerilog parser and the RTL elaborator licensed from Verific.&lt;br /&gt;
&lt;br /&gt;
*  For users of Verific who have the above minimum configuration and additionally license Verific's Static elaborator, you have the option to purchase a patch of language extensions from YosysHQ to enable basic formal verification functionality in the Yosys open source suite.&lt;br /&gt;
&lt;br /&gt;
*  If comprehensive formal verification functionality is desired, the recommended option is to go with the TabbyCAD commercial suite from YosysHQ.  A TabbyCAD customer would gain full access to YosysHQ's support, training, and other services.&lt;br /&gt;
&lt;br /&gt;
For more details on integrating with Yosys, please refer to this link :&lt;br /&gt;
&lt;br /&gt;
https://yosyshq.readthedocs.io/projects/yosys/en/latest/yosys_internals/extending_yosys/build_verific.html&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Yosys-Verific_Integration&amp;diff=899</id>
		<title>Yosys-Verific Integration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Yosys-Verific_Integration&amp;diff=899"/>
				<updated>2024-08-17T04:24:49Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Created page with &amp;quot;Yosys is an open source platform that works with a suite of EDA tools.  It is possible for a Verific user to integrate Verific with Yosys, which would replace the open source...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Yosys is an open source platform that works with a suite of EDA tools.  It is possible for a Verific user to integrate Verific with Yosys, which would replace the open source language parsers with Verific's industry-standard ones.  Below are several points of interest :&lt;br /&gt;
&lt;br /&gt;
*  The minimum requirement to use open source Yosys (as downloaded from YosysHQ  https://github.com/yosyshq/yosys) together with Verific software is to have either the VHDL or Verilog/SystemVerilog parser and the RTL elaborator licensed from Verific.&lt;br /&gt;
&lt;br /&gt;
*  For users of Verific who have the above minimum configuration and additionally license Verific's Static elaborator, you have the option to purchase a patch of language extensions from YosysHQ to enable basic formal verification functionality in the Yosys open source suite.&lt;br /&gt;
&lt;br /&gt;
*  If comprehensive formal verification functionality is desired, the recommended option is to go with the TabbyCAD commercial suite from YosysHQ.  A TabbyCAD customer would gain full access to YosysHQ's support, training, and other services.&lt;br /&gt;
&lt;br /&gt;
For more details on integrating with Yosys, please refer to this link :&lt;br /&gt;
&lt;br /&gt;
https://tyrtd.readthedocs.io/en/krys-docs_verific/yosys_internals/extending_yosys/build_verific.html&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=898</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=898"/>
				<updated>2024-08-17T04:18:45Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
* [[Python pretty-printer for gdb | Python pretty-printer for gdb]]&lt;br /&gt;
* [[Yosys-Verific Integration | Yosys-Verific integration]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Port Expressions]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Modules with '_1' '_2' suffix in their names | Verilog: After static elaboration, there are modules with &amp;quot;_1&amp;quot;, &amp;quot;_2&amp;quot;, ..., suffix in their names. Why?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units/interfaces with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[How to use MessageCallBackHandler Class | Util/C++: How to use MessageCallBackHandler Class]]&lt;br /&gt;
* [[How to use RegisterPragmaRefCallBack() | Util/C++: How to use RegisterPragmaRefCallBack()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Post processing port resolution of black boxes | Database/C++: Post processing port resolution of black boxes]]&lt;br /&gt;
* [[Finding hierarchical paths of a Netlist | Database/C++: Finding hierarchical paths of a Netlist]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Type Range example | Database/Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Database/Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[Using TypeRange table to retrieve the originating type-range for an id | Database/Verilog/C++: Using TypeRange table to retrieve the originating type-range for an id]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[In Verilog parsetree adding names to unnamed instances | Verilog/C++: In Verilog parsetree adding names to unnamed instances]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Create DOT diagram of parse tree | Verilog/C++: Create DOT diagram of a parse tree]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Evaluate 'for-generate' loop | Verilog/C++: Evaluate 'for-generate' loop]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Simple examples of VHDL visitor pattern | VHDL/C++: Simple examples of VHDL visitor pattern]]&lt;br /&gt;
* [[Traverse instances in parsetree | VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Traverse_instances_in_parsetree&amp;diff=896</id>
		<title>Traverse instances in parsetree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Traverse_instances_in_parsetree&amp;diff=896"/>
				<updated>2024-07-23T04:44:18Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Verific utilities&lt;br /&gt;
#include &amp;quot;Array.h&amp;quot;          // Make class Array available&lt;br /&gt;
#include &amp;quot;Set.h&amp;quot;            // Make class Set available&lt;br /&gt;
#include &amp;quot;Message.h&amp;quot;        // Make message handlers available&lt;br /&gt;
#include &amp;quot;Strings.h&amp;quot;        // Definition of class to manipulate, copy, concatenate, create etc...&lt;br /&gt;
// Verific Verilog parser&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Verific VHDL parser&lt;br /&gt;
#include &amp;quot;vhdl_file.h&amp;quot;      &lt;br /&gt;
#include &amp;quot;VhdlIdDef.h&amp;quot;      &lt;br /&gt;
#include &amp;quot;VhdlScope.h&amp;quot;      &lt;br /&gt;
#include &amp;quot;VhdlStatement.h&amp;quot;  &lt;br /&gt;
#include &amp;quot;VhdlName.h&amp;quot;       // Definition of VhdlName&lt;br /&gt;
#include &amp;quot;VhdlUnits.h&amp;quot;      // Definition of VhdlLibrary&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
// Routines for traversing the entity instances in DFS order and print them.&lt;br /&gt;
static void PrintDesignUnit(const VhdlStatement *stmt) ;&lt;br /&gt;
static void TraverseVhdl(const VhdlPrimaryUnit *top, const char *arch_name) ;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, const char **argv)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    vhdl_file::SetDefaultLibraryPath(&amp;quot;../vdbs&amp;quot;) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;test.v&amp;quot;)) return 1 ;&lt;br /&gt;
    if (!vhdl_file::Analyze(&amp;quot;test.vhd&amp;quot;)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    VhdlLibrary *lib = vhdl_file::GetLibrary(&amp;quot;work&amp;quot;) ;&lt;br /&gt;
    VhdlPrimaryUnit *top_entity = lib ? lib-&amp;gt;GetPrimUnit(&amp;quot;comp&amp;quot;) : 0 ; // Get the top-level entity&lt;br /&gt;
    if (!top_entity) {&lt;br /&gt;
        return 1 ; &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (!vhdl_file::Elaborate(&amp;quot;comp&amp;quot;, &amp;quot;work&amp;quot;, 0, 0, 1)) {&lt;br /&gt;
        return 2 ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    top_entity-&amp;gt;Info(&amp;quot;Start hierarchy traversal here at VHDL top level unit '%s'&amp;quot;, top_entity-&amp;gt;Name()) ;&lt;br /&gt;
    Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    TraverseVhdl(top_entity, 0 /*architecture name*/) ; // Traverse top level unit and the hierarchy under it&lt;br /&gt;
    return 0 ; // all good&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Traverse an entity and the hierarchy under it:&lt;br /&gt;
static void&lt;br /&gt;
TraverseVhdl(const VhdlPrimaryUnit *unit, const char *arch_name)&lt;br /&gt;
{&lt;br /&gt;
    // Find the architecture of the unit:&lt;br /&gt;
    VhdlSecondaryUnit *arch = unit? unit-&amp;gt;GetSecondaryUnit(arch_name) : 0 ;&lt;br /&gt;
    // Find the scope:&lt;br /&gt;
    VhdlScope *scope = arch ? arch-&amp;gt;LocalScope() : 0 ;&lt;br /&gt;
&lt;br /&gt;
    // Get the declared ids from that scope:&lt;br /&gt;
    Map *ids = scope ? scope-&amp;gt;DeclArea() : 0 ;&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    VhdlIdDef *id ;&lt;br /&gt;
    FOREACH_MAP_ITEM(ids, mi, 0, &amp;amp;id) {&lt;br /&gt;
        if (!id) continue ;&lt;br /&gt;
        VhdlStatement *stmt = id-&amp;gt;GetStatement() ;&lt;br /&gt;
        if (!stmt) continue ;&lt;br /&gt;
        // Routine to print the hierarchy:&lt;br /&gt;
        PrintDesignUnit(stmt) ;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Print the hierarchy&lt;br /&gt;
static void PrintDesignUnit(const VhdlStatement *stmt)&lt;br /&gt;
{&lt;br /&gt;
    if (!stmt) return ;&lt;br /&gt;
&lt;br /&gt;
    // Get the array of statements, for loop/block statements&lt;br /&gt;
    // we get an array of statements and recursively go to the&lt;br /&gt;
    // inner most statement and print the hierarchy.&lt;br /&gt;
    Array *stmts = stmt-&amp;gt;GetStatements() ;&lt;br /&gt;
    unsigned ai ;&lt;br /&gt;
    VhdlStatement *inner_stmt ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(stmts, ai, inner_stmt) {&lt;br /&gt;
        PrintDesignUnit(inner_stmt) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    VhdlIdDef *inst_unit = stmt-&amp;gt;GetInstantiatedUnit() ; // Get the instantiated unit id for instances only&lt;br /&gt;
    if (!inst_unit) return ; // Not an instance level&lt;br /&gt;
&lt;br /&gt;
    // Processing instance&lt;br /&gt;
    VhdlIdDef *id = stmt-&amp;gt;GetLabel() ;&lt;br /&gt;
    Message::PrintLine(&amp;quot;Processing instance : &amp;quot;, id ? id-&amp;gt;Name() : 0) ;&lt;br /&gt;
&lt;br /&gt;
    if (inst_unit-&amp;gt;IsComponent()) { // instance of component&lt;br /&gt;
        Message::PrintLine(&amp;quot;Component instance, name of component is &amp;quot;, inst_unit-&amp;gt;Name()) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    VhdlPrimaryUnit *prim_unit = inst_unit ? inst_unit-&amp;gt;GetPrimaryUnit() : 0 ; // Get the primary unit&lt;br /&gt;
    if (!prim_unit) return ;&lt;br /&gt;
&lt;br /&gt;
    if (prim_unit-&amp;gt;IsVerilogModule()) { // instance of Verilog module&lt;br /&gt;
        // Get instantiated verilog module&lt;br /&gt;
        VeriModule *veri_module = vhdl_file::GetVerilogModuleFromlib(inst_unit-&amp;gt;GetContainingLibraryName(), inst_unit-&amp;gt;Name()) ;&lt;br /&gt;
        if (!veri_module) return ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;instantiated Verilog module : &amp;quot;, veri_module-&amp;gt;Name()) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    } else { // Instance of vhdl unit&lt;br /&gt;
        VhdlName *instantiated_unit_name = stmt-&amp;gt;GetInstantiatedUnitNameNode() ;&lt;br /&gt;
        // Find the architecture name and traverse the vhdl design&lt;br /&gt;
        const char *arch_name = instantiated_unit_name ? instantiated_unit_name-&amp;gt;ArchitectureNameAspect(): 0 ; &lt;br /&gt;
        Message::PrintLine(&amp;quot;instantiated VHDL unit : &amp;quot;, prim_unit-&amp;gt;Name()) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;architecture name : &amp;quot;, arch_name ? arch_name : 0) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
        TraverseVhdl(prim_unit, arch_name) ; // Traverse the VHDL unit&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Python script:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.append('../../pythonmain/install')&lt;br /&gt;
import Verific&lt;br /&gt;
&lt;br /&gt;
def TraverseVhdl(unit, arch_name):&lt;br /&gt;
    # Find the architecture of the unit:&lt;br /&gt;
    if not unit: return&lt;br /&gt;
    arch = unit.GetSecondaryUnit(arch_name) &lt;br /&gt;
    if not arch: return&lt;br /&gt;
    # Find the scope:&lt;br /&gt;
    scope = arch.LocalScope()&lt;br /&gt;
    if not scope: return&lt;br /&gt;
&lt;br /&gt;
    # Get the declared ids from that scope:&lt;br /&gt;
    ids = Verific.VhdlIdDefMapIter(scope.DeclArea())&lt;br /&gt;
    id = ids.First()&lt;br /&gt;
    while (id):&lt;br /&gt;
        stmt = id.GetStatement() &lt;br /&gt;
        if not stmt: &lt;br /&gt;
            id = ids.Next()&lt;br /&gt;
            continue &lt;br /&gt;
        # Routine to print the hierarchy:&lt;br /&gt;
        PrintDesignUnit(stmt) &lt;br /&gt;
        id = ids.Next()&lt;br /&gt;
&lt;br /&gt;
def PrintDesignUnit(stmt):&lt;br /&gt;
    if not stmt: return&lt;br /&gt;
&lt;br /&gt;
    # Get the array of statements, for loop/block statements&lt;br /&gt;
    # we get an array of statements and recursively go to the&lt;br /&gt;
    # inner most statement and print the hierarchy.&lt;br /&gt;
    stmts = Verific.VhdlStatementArrayIter(stmt.GetStatements())&lt;br /&gt;
    inner_stmt = stmts.First()&lt;br /&gt;
    while (inner_stmt):&lt;br /&gt;
        PrintDesignUnit(inner_stmt) &lt;br /&gt;
        inner_stmt = stmts.Next()&lt;br /&gt;
&lt;br /&gt;
    inst_unit = stmt.GetInstantiatedUnit()  # Get the instantiated unit id for instances only&lt;br /&gt;
    if not inst_unit: return  # Not an instance level&lt;br /&gt;
&lt;br /&gt;
    # Processing instance&lt;br /&gt;
    id = stmt.GetLabel() &lt;br /&gt;
    if not id: return&lt;br /&gt;
    Verific.Message.PrintLine(&amp;quot;Processing instance : &amp;quot;, id.Name())&lt;br /&gt;
&lt;br /&gt;
    if inst_unit.IsComponent():&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;Component instance, name of component is &amp;quot;, inst_unit.Name())&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;\n&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
    prim_unit = inst_unit.GetPrimaryUnit() &lt;br /&gt;
    if not prim_unit: return &lt;br /&gt;
&lt;br /&gt;
    if prim_unit.IsVerilogModule():&lt;br /&gt;
        # Get instantiated verilog module&lt;br /&gt;
        veri_module = Verific.vhdl_file.GetVerilogModuleFromlib(inst_unit.GetContainingLibraryName(), inst_unit.Name())&lt;br /&gt;
        if not veri_module: return &lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;instantiated Verilog module : &amp;quot;, veri_module.Name())&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;\n&amp;quot;) &lt;br /&gt;
    else: &lt;br /&gt;
        instantiated_unit_name = stmt.GetInstantiatedUnitNameNode() &lt;br /&gt;
        if not instantiated_unit_name: return&lt;br /&gt;
        # Find the architecture name and traverse the vhdl design&lt;br /&gt;
        arch_name = instantiated_unit_name.ArchitectureNameAspect()&lt;br /&gt;
        if not arch_name: return&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;instantiated VHDL unit : &amp;quot;, prim_unit.Name())&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;architecture name : &amp;quot;, arch_name)&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;\n&amp;quot;) &lt;br /&gt;
        TraverseVhdl(prim_unit, arch_name) # Traverse the VHDL unit&lt;br /&gt;
&lt;br /&gt;
# Set default library path to auto-load standard packages&lt;br /&gt;
if not Verific.vhdl_file.SetDefaultLibraryPath(&amp;quot;../../vhdl_packages/vdbs_1993&amp;quot;):&lt;br /&gt;
    print (&amp;quot;Error during analysis, exiting&amp;quot;)&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
&lt;br /&gt;
# Analyze the design&lt;br /&gt;
if not Verific.veri_file.Analyze(&amp;quot;test.v&amp;quot;, Verific.veri_file.SYSTEM_VERILOG, &amp;quot;work&amp;quot;):&lt;br /&gt;
    print (&amp;quot;Analyze failure. Exiting&amp;quot;)&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&lt;br /&gt;
if not Verific.vhdl_file.Analyze(&amp;quot;test.vhd&amp;quot;, &amp;quot;work&amp;quot;, Verific.vhdl_file.VHDL_93):&lt;br /&gt;
    print (&amp;quot;Analyze failure. Exiting&amp;quot;)&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&lt;br /&gt;
# Get the library&lt;br /&gt;
lib = Verific.vhdl_file.GetLibrary(&amp;quot;work&amp;quot;)&lt;br /&gt;
if not lib:&lt;br /&gt;
    print (&amp;quot;Can't get library 'work'&amp;quot;)&lt;br /&gt;
    sys.exit(3)&lt;br /&gt;
&lt;br /&gt;
# Check all the primary units of the library&lt;br /&gt;
top_entity = lib.GetPrimUnit(&amp;quot;comp&amp;quot;)&lt;br /&gt;
if not top_entity:&lt;br /&gt;
    sys.exit(4)&lt;br /&gt;
&lt;br /&gt;
if not Verific.vhdl_file.Elaborate(&amp;quot;comp&amp;quot;, &amp;quot;work&amp;quot;, None, None, 1):&lt;br /&gt;
    sys.exit(5)&lt;br /&gt;
&lt;br /&gt;
Verific.Message.PrintLine(&amp;quot;\n&amp;quot;)&lt;br /&gt;
top_entity.Info(&amp;quot;Start hierarchy traversal here at VHDL top level unit '%s'&amp;quot;, top_entity.Name())&lt;br /&gt;
Verific.Message.PrintLine(&amp;quot;\n&amp;quot;)&lt;br /&gt;
TraverseVhdl(top_entity, None)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
test.vhd:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
entity child is -- instantiated in test module in Verilog design&lt;br /&gt;
   generic (p : integer := 3);&lt;br /&gt;
   port (S1, S2: out bit_vector (p downto 0);&lt;br /&gt;
         I1 : in bit_vector (p downto 0));&lt;br /&gt;
end ;&lt;br /&gt;
&lt;br /&gt;
architecture arch of child is&lt;br /&gt;
begin&lt;br /&gt;
    S1 &amp;lt;= I1 ;&lt;br /&gt;
    S2 &amp;lt;= not I1 ;&lt;br /&gt;
end ;&lt;br /&gt;
&lt;br /&gt;
entity comp is -- top-level unit&lt;br /&gt;
&lt;br /&gt;
   port(X, Y: in BIT_VECTOR(3 DOWNTO 0);&lt;br /&gt;
        S1, S2: out bit_vector (3 DOWNTO 0);&lt;br /&gt;
        S3, S4: out bit_vector (3 DOWNTO 0);&lt;br /&gt;
        Sum, Carry: out BIT);&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
architecture Structure of comp is&lt;br /&gt;
&lt;br /&gt;
    component child is&lt;br /&gt;
        generic (p : integer) ;&lt;br /&gt;
        port (S1, S2: out BIT_VECTOR(p DOWNTO 0);&lt;br /&gt;
              I1 : in BIT_VECTOR(p downto 0));&lt;br /&gt;
    end component;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
   L1: entity work.xor_gate generic map (4)&lt;br /&gt;
       port map (X, Y, Sum);&lt;br /&gt;
&lt;br /&gt;
   L2 : component child generic map (3) port map(S1, S2, X) ;&lt;br /&gt;
   blk : block&lt;br /&gt;
       begin&lt;br /&gt;
           L3 : entity work.child(arch) generic map (3) port map(S3, S4, X) ;&lt;br /&gt;
       end block ;&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
test.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module xor_gate (CompIn1, CompIn2, CompOut); // Instantiated in 'comp' entity in  VHDL file test.vhd&lt;br /&gt;
     parameter p = 10 ;&lt;br /&gt;
     input [3:0]CompIn1;&lt;br /&gt;
     input [3:0]CompIn2;&lt;br /&gt;
     output CompOut;&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[hoa@awing0 HD]$ test-linux &lt;br /&gt;
-- Analyzing Verilog file 'test.v' (VERI-1482)&lt;br /&gt;
-- Analyzing VHDL file 'test.vhd' (VHDL-1481)&lt;br /&gt;
-- Restoring VHDL unit 'std.standard' from file '../vdbs/std/standard.vdb' (VHDL-1493)&lt;br /&gt;
test.vhd(1): INFO: analyzing entity 'child' (VHDL-1012)&lt;br /&gt;
test.vhd(7): INFO: analyzing architecture 'arch' (VHDL-1010)&lt;br /&gt;
test.vhd(13): INFO: analyzing entity 'comp' (VHDL-1012)&lt;br /&gt;
test.vhd(22): INFO: analyzing architecture 'structure' (VHDL-1010)&lt;br /&gt;
-- Restoring VHDL unit 'vl.vl_types' from file '../vdbs/vl/vl_types.vdb' (VHDL-1493)&lt;br /&gt;
test.vhd(13): INFO: processing 'comp(Structure)' (VHDL-1067)&lt;br /&gt;
test.vhd(33): INFO: switching to Verilog mode to elaborate module 'xor_gate' (VHDL-1399)&lt;br /&gt;
test.v(1): INFO: compiling module 'xor_gate(p=4)' (VERI-1018)&lt;br /&gt;
test.vhd(33): INFO: returning to VHDL mode to continue with elaboration (VHDL-1400)&lt;br /&gt;
test.vhd(1): INFO: processing 'child_default(arch)' (VHDL-1067)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
test.vhd(20): INFO: Start hierarchy traversal here at VHDL top level unit 'comp'&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
-- Processing instance : l1&lt;br /&gt;
-- instantiated Verilog module : xor_gate(p=4)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
-- Processing instance : l2&lt;br /&gt;
-- instantiated VHDL unit : child_default&lt;br /&gt;
-- architecture name : arch&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
-- Processing instance : l3&lt;br /&gt;
-- instantiated VHDL unit : child_default&lt;br /&gt;
-- architecture name : arch&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
[hoa@awing0 HD]$ &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Traverse_instances_in_parsetree&amp;diff=895</id>
		<title>Traverse instances in parsetree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Traverse_instances_in_parsetree&amp;diff=895"/>
				<updated>2024-07-23T04:40:54Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Verific utilities&lt;br /&gt;
#include &amp;quot;Array.h&amp;quot;          // Make class Array available&lt;br /&gt;
#include &amp;quot;Set.h&amp;quot;            // Make class Set available&lt;br /&gt;
#include &amp;quot;Message.h&amp;quot;        // Make message handlers available&lt;br /&gt;
#include &amp;quot;Strings.h&amp;quot;        // Definition of class to manipulate, copy, concatenate, create etc...&lt;br /&gt;
// Verific Verilog parser&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Verific VHDL parser&lt;br /&gt;
#include &amp;quot;vhdl_file.h&amp;quot;      &lt;br /&gt;
#include &amp;quot;VhdlIdDef.h&amp;quot;      &lt;br /&gt;
#include &amp;quot;VhdlScope.h&amp;quot;      &lt;br /&gt;
#include &amp;quot;VhdlStatement.h&amp;quot;  &lt;br /&gt;
#include &amp;quot;VhdlName.h&amp;quot;       // Definition of VhdlName&lt;br /&gt;
#include &amp;quot;VhdlUnits.h&amp;quot;      // Definition of VhdlLibrary&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
// Routines for traversing the entity instances in DFS order and print them.&lt;br /&gt;
static void PrintDesignUnit(const VhdlStatement *stmt) ;&lt;br /&gt;
static void TraverseVhdl(const VhdlPrimaryUnit *top, const char *arch_name) ;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, const char **argv)&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
    vhdl_file::SetDefaultLibraryPath(&amp;quot;../vdbs&amp;quot;) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;test.v&amp;quot;)) return 1 ;&lt;br /&gt;
    if (!vhdl_file::Analyze(&amp;quot;test.vhd&amp;quot;)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    VhdlLibrary *lib = vhdl_file::GetLibrary(&amp;quot;work&amp;quot;) ;&lt;br /&gt;
    VhdlPrimaryUnit *top_entity = lib ? lib-&amp;gt;GetPrimUnit(&amp;quot;comp&amp;quot;) : 0 ; // Get the top-level entity&lt;br /&gt;
    if (!top_entity) {&lt;br /&gt;
        return 1 ; &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (!vhdl_file::Elaborate(&amp;quot;comp&amp;quot;, &amp;quot;work&amp;quot;, 0, 0, 1)) {&lt;br /&gt;
        return 2 ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    top_entity-&amp;gt;Info(&amp;quot;Start hierarchy traversal here at VHDL top level unit '%s'&amp;quot;, top_entity-&amp;gt;Name()) ;&lt;br /&gt;
    Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    TraverseVhdl(top_entity, 0 /*architecture name*/) ; // Traverse top level unit and the hierarchy under it&lt;br /&gt;
    return 0 ; // all good&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Traverse an entity and the hierarchy under it:&lt;br /&gt;
static void&lt;br /&gt;
TraverseVhdl(const VhdlPrimaryUnit *unit, const char *arch_name)&lt;br /&gt;
{&lt;br /&gt;
    // Find the architecture of the unit:&lt;br /&gt;
    VhdlSecondaryUnit *arch = unit? unit-&amp;gt;GetSecondaryUnit(arch_name) : 0 ;&lt;br /&gt;
    // Find the scope:&lt;br /&gt;
    VhdlScope *scope = arch ? arch-&amp;gt;LocalScope() : 0 ;&lt;br /&gt;
&lt;br /&gt;
    // Get the declared ids from that scope:&lt;br /&gt;
    Map *ids = scope ? scope-&amp;gt;DeclArea() : 0 ;&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    VhdlIdDef *id ;&lt;br /&gt;
    FOREACH_MAP_ITEM(ids, mi, 0, &amp;amp;id) {&lt;br /&gt;
        if (!id) continue ;&lt;br /&gt;
        VhdlStatement *stmt = id-&amp;gt;GetStatement() ;&lt;br /&gt;
        if (!stmt) continue ;&lt;br /&gt;
        // Routine to print the hierarchy:&lt;br /&gt;
        PrintDesignUnit(stmt) ;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Print the hierarchy&lt;br /&gt;
static void PrintDesignUnit(const VhdlStatement *stmt)&lt;br /&gt;
{&lt;br /&gt;
    if (!stmt) return ;&lt;br /&gt;
&lt;br /&gt;
    // Get the array of statements, for loop/block statements&lt;br /&gt;
    // we get an array of statements and recursively go to the&lt;br /&gt;
    // inner most statement and print the hierarchy.&lt;br /&gt;
    Array *stmts = stmt-&amp;gt;GetStatements() ;&lt;br /&gt;
    unsigned ai ;&lt;br /&gt;
    VhdlStatement *inner_stmt ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(stmts, ai, inner_stmt) {&lt;br /&gt;
        PrintDesignUnit(inner_stmt) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    VhdlIdDef *inst_unit = stmt-&amp;gt;GetInstantiatedUnit() ; // Get the instantiated unit id for instances only&lt;br /&gt;
    if (!inst_unit) return ; // Not an instance level&lt;br /&gt;
&lt;br /&gt;
    // Processing instance&lt;br /&gt;
    VhdlIdDef *id = stmt-&amp;gt;GetLabel() ;&lt;br /&gt;
    Message::PrintLine(&amp;quot;Processing instance : &amp;quot;, id ? id-&amp;gt;Name() : 0) ;&lt;br /&gt;
&lt;br /&gt;
    if (inst_unit-&amp;gt;IsComponent()) { // instance of component&lt;br /&gt;
        Message::PrintLine(&amp;quot;Component instance, name of component is &amp;quot;, inst_unit-&amp;gt;Name()) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    VhdlPrimaryUnit *prim_unit = inst_unit ? inst_unit-&amp;gt;GetPrimaryUnit() : 0 ; // Get the primary unit&lt;br /&gt;
    if (!prim_unit) return ;&lt;br /&gt;
&lt;br /&gt;
    if (prim_unit-&amp;gt;IsVerilogModule()) { // instance of Verilog module&lt;br /&gt;
        // Get instantiated verilog module&lt;br /&gt;
        VeriModule *veri_module = vhdl_file::GetVerilogModuleFromlib(inst_unit-&amp;gt;GetContainingLibraryName(), inst_unit-&amp;gt;Name()) ;&lt;br /&gt;
        if (!veri_module) return ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;instantiated Verilog module : &amp;quot;, veri_module-&amp;gt;Name()) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
    } else { // Instance of vhdl unit&lt;br /&gt;
        VhdlName *instantiated_unit_name = stmt-&amp;gt;GetInstantiatedUnitNameNode() ;&lt;br /&gt;
        // Find the architecture name and traverse the vhdl design&lt;br /&gt;
        const char *arch_name = instantiated_unit_name ? instantiated_unit_name-&amp;gt;ArchitectureNameAspect(): 0 ; &lt;br /&gt;
        Message::PrintLine(&amp;quot;instantiated VHDL unit : &amp;quot;, prim_unit-&amp;gt;Name()) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;architecture name : &amp;quot;, arch_name ? arch_name : 0) ;&lt;br /&gt;
        Message::PrintLine(&amp;quot;\n&amp;quot;) ;&lt;br /&gt;
        TraverseVhdl(prim_unit, arch_name) ; // Traverse the VHDL unit&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
test.vhd:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
entity child is -- instantiated in test module in Verilog design&lt;br /&gt;
   generic (p : integer := 3);&lt;br /&gt;
   port (S1, S2: out bit_vector (p downto 0);&lt;br /&gt;
         I1 : in bit_vector (p downto 0));&lt;br /&gt;
end ;&lt;br /&gt;
&lt;br /&gt;
architecture arch of child is&lt;br /&gt;
begin&lt;br /&gt;
    S1 &amp;lt;= I1 ;&lt;br /&gt;
    S2 &amp;lt;= not I1 ;&lt;br /&gt;
end ;&lt;br /&gt;
&lt;br /&gt;
entity comp is -- top-level unit&lt;br /&gt;
&lt;br /&gt;
   port(X, Y: in BIT_VECTOR(3 DOWNTO 0);&lt;br /&gt;
        S1, S2: out bit_vector (3 DOWNTO 0);&lt;br /&gt;
        S3, S4: out bit_vector (3 DOWNTO 0);&lt;br /&gt;
        Sum, Carry: out BIT);&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
architecture Structure of comp is&lt;br /&gt;
&lt;br /&gt;
    component child is&lt;br /&gt;
        generic (p : integer) ;&lt;br /&gt;
        port (S1, S2: out BIT_VECTOR(p DOWNTO 0);&lt;br /&gt;
              I1 : in BIT_VECTOR(p downto 0));&lt;br /&gt;
    end component;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
   L1: entity work.xor_gate generic map (4)&lt;br /&gt;
       port map (X, Y, Sum);&lt;br /&gt;
&lt;br /&gt;
   L2 : component child generic map (3) port map(S1, S2, X) ;&lt;br /&gt;
   blk : block&lt;br /&gt;
       begin&lt;br /&gt;
           L3 : entity work.child(arch) generic map (3) port map(S3, S4, X) ;&lt;br /&gt;
       end block ;&lt;br /&gt;
&lt;br /&gt;
end;&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
test.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module xor_gate (CompIn1, CompIn2, CompOut); // Instantiated in 'comp' entity in  VHDL file test.vhd&lt;br /&gt;
     parameter p = 10 ;&lt;br /&gt;
     input [3:0]CompIn1;&lt;br /&gt;
     input [3:0]CompIn2;&lt;br /&gt;
     output CompOut;&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[hoa@awing0 HD]$ test-linux &lt;br /&gt;
-- Analyzing Verilog file 'test.v' (VERI-1482)&lt;br /&gt;
-- Analyzing VHDL file 'test.vhd' (VHDL-1481)&lt;br /&gt;
-- Restoring VHDL unit 'std.standard' from file '../vdbs/std/standard.vdb' (VHDL-1493)&lt;br /&gt;
test.vhd(1): INFO: analyzing entity 'child' (VHDL-1012)&lt;br /&gt;
test.vhd(7): INFO: analyzing architecture 'arch' (VHDL-1010)&lt;br /&gt;
test.vhd(13): INFO: analyzing entity 'comp' (VHDL-1012)&lt;br /&gt;
test.vhd(22): INFO: analyzing architecture 'structure' (VHDL-1010)&lt;br /&gt;
-- Restoring VHDL unit 'vl.vl_types' from file '../vdbs/vl/vl_types.vdb' (VHDL-1493)&lt;br /&gt;
test.vhd(13): INFO: processing 'comp(Structure)' (VHDL-1067)&lt;br /&gt;
test.vhd(33): INFO: switching to Verilog mode to elaborate module 'xor_gate' (VHDL-1399)&lt;br /&gt;
test.v(1): INFO: compiling module 'xor_gate(p=4)' (VERI-1018)&lt;br /&gt;
test.vhd(33): INFO: returning to VHDL mode to continue with elaboration (VHDL-1400)&lt;br /&gt;
test.vhd(1): INFO: processing 'child_default(arch)' (VHDL-1067)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
test.vhd(20): INFO: Start hierarchy traversal here at VHDL top level unit 'comp'&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
-- Processing instance : l1&lt;br /&gt;
-- instantiated Verilog module : xor_gate(p=4)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
-- Processing instance : l2&lt;br /&gt;
-- instantiated VHDL unit : child_default&lt;br /&gt;
-- architecture name : arch&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
-- Processing instance : l3&lt;br /&gt;
-- instantiated VHDL unit : child_default&lt;br /&gt;
-- architecture name : arch&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
[hoa@awing0 HD]$ &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Python:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.append('../../pythonmain/install')&lt;br /&gt;
import Verific&lt;br /&gt;
&lt;br /&gt;
def TraverseVhdl(unit, arch_name):&lt;br /&gt;
    # Find the architecture of the unit:&lt;br /&gt;
    if not unit: return&lt;br /&gt;
    arch = unit.GetSecondaryUnit(arch_name) &lt;br /&gt;
    if not arch: return&lt;br /&gt;
    # Find the scope:&lt;br /&gt;
    scope = arch.LocalScope()&lt;br /&gt;
    if not scope: return&lt;br /&gt;
&lt;br /&gt;
    # Get the declared ids from that scope:&lt;br /&gt;
    ids = Verific.VhdlIdDefMapIter(scope.DeclArea())&lt;br /&gt;
    id = ids.First()&lt;br /&gt;
    while (id):&lt;br /&gt;
        stmt = id.GetStatement() &lt;br /&gt;
        if not stmt: &lt;br /&gt;
            id = ids.Next()&lt;br /&gt;
            continue &lt;br /&gt;
        # Routine to print the hierarchy:&lt;br /&gt;
        PrintDesignUnit(stmt) &lt;br /&gt;
        id = ids.Next()&lt;br /&gt;
&lt;br /&gt;
def PrintDesignUnit(stmt):&lt;br /&gt;
    if not stmt: return&lt;br /&gt;
&lt;br /&gt;
    # Get the array of statements, for loop/block statements&lt;br /&gt;
    # we get an array of statements and recursively go to the&lt;br /&gt;
    # inner most statement and print the hierarchy.&lt;br /&gt;
    stmts = Verific.VhdlStatementArrayIter(stmt.GetStatements())&lt;br /&gt;
    inner_stmt = stmts.First()&lt;br /&gt;
    while (inner_stmt):&lt;br /&gt;
        PrintDesignUnit(inner_stmt) &lt;br /&gt;
        inner_stmt = stmts.Next()&lt;br /&gt;
&lt;br /&gt;
    inst_unit = stmt.GetInstantiatedUnit()  # Get the instantiated unit id for instances only&lt;br /&gt;
    if not inst_unit: return  # Not an instance level&lt;br /&gt;
&lt;br /&gt;
    # Processing instance&lt;br /&gt;
    id = stmt.GetLabel() &lt;br /&gt;
    if not id: return&lt;br /&gt;
    Verific.Message.PrintLine(&amp;quot;Processing instance : &amp;quot;, id.Name())&lt;br /&gt;
&lt;br /&gt;
    if inst_unit.IsComponent():&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;Component instance, name of component is &amp;quot;, inst_unit.Name())&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;\n&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
    prim_unit = inst_unit.GetPrimaryUnit() &lt;br /&gt;
    if not prim_unit: return &lt;br /&gt;
&lt;br /&gt;
    if prim_unit.IsVerilogModule():&lt;br /&gt;
        # Get instantiated verilog module&lt;br /&gt;
        veri_module = Verific.vhdl_file.GetVerilogModuleFromlib(inst_unit.GetContainingLibraryName(), inst_unit.Name())&lt;br /&gt;
        if not veri_module: return &lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;instantiated Verilog module : &amp;quot;, veri_module.Name())&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;\n&amp;quot;) &lt;br /&gt;
    else: &lt;br /&gt;
        instantiated_unit_name = stmt.GetInstantiatedUnitNameNode() &lt;br /&gt;
        if not instantiated_unit_name: return&lt;br /&gt;
        # Find the architecture name and traverse the vhdl design&lt;br /&gt;
        arch_name = instantiated_unit_name.ArchitectureNameAspect()&lt;br /&gt;
        if not arch_name: return&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;instantiated VHDL unit : &amp;quot;, prim_unit.Name())&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;architecture name : &amp;quot;, arch_name)&lt;br /&gt;
        Verific.Message.PrintLine(&amp;quot;\n&amp;quot;) &lt;br /&gt;
        TraverseVhdl(prim_unit, arch_name) # Traverse the VHDL unit&lt;br /&gt;
&lt;br /&gt;
# Set default library path to auto-load standard packages&lt;br /&gt;
if not Verific.vhdl_file.SetDefaultLibraryPath(&amp;quot;../../vhdl_packages/vdbs_1993&amp;quot;):&lt;br /&gt;
    print (&amp;quot;Error during analysis, exiting&amp;quot;)&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
&lt;br /&gt;
# Analyze the design&lt;br /&gt;
if not Verific.veri_file.Analyze(&amp;quot;test.v&amp;quot;, Verific.veri_file.SYSTEM_VERILOG, &amp;quot;work&amp;quot;):&lt;br /&gt;
    print (&amp;quot;Analyze failure. Exiting&amp;quot;)&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&lt;br /&gt;
if not Verific.vhdl_file.Analyze(&amp;quot;test.vhd&amp;quot;, &amp;quot;work&amp;quot;, Verific.vhdl_file.VHDL_93):&lt;br /&gt;
    print (&amp;quot;Analyze failure. Exiting&amp;quot;)&lt;br /&gt;
    sys.exit(2)&lt;br /&gt;
&lt;br /&gt;
# Get the library&lt;br /&gt;
lib = Verific.vhdl_file.GetLibrary(&amp;quot;work&amp;quot;)&lt;br /&gt;
if not lib:&lt;br /&gt;
    print (&amp;quot;Can't get library 'work'&amp;quot;)&lt;br /&gt;
    sys.exit(3)&lt;br /&gt;
&lt;br /&gt;
# Check all the primary units of the library&lt;br /&gt;
top_entity = lib.GetPrimUnit(&amp;quot;comp&amp;quot;)&lt;br /&gt;
if not top_entity:&lt;br /&gt;
    sys.exit(4)&lt;br /&gt;
&lt;br /&gt;
if not Verific.vhdl_file.Elaborate(&amp;quot;comp&amp;quot;, &amp;quot;work&amp;quot;, None, None, 1):&lt;br /&gt;
    sys.exit(5)&lt;br /&gt;
&lt;br /&gt;
Verific.Message.PrintLine(&amp;quot;\n&amp;quot;)&lt;br /&gt;
top_entity.Info(&amp;quot;Start hierarchy traversal here at VHDL top level unit '%s'&amp;quot;, top_entity.Name())&lt;br /&gt;
Verific.Message.PrintLine(&amp;quot;\n&amp;quot;)&lt;br /&gt;
TraverseVhdl(top_entity, None)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=882</id>
		<title>Create DOT diagram of parse tree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=882"/>
				<updated>2024-01-13T02:08:40Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example parses the r4000 design in the  &amp;lt;verific&amp;gt;/example_designs/verilog  directory and writes out a Graphviz DOT-format file that represents a simple diagram view of the design.&lt;br /&gt;
&lt;br /&gt;
There are several tools that can visualize DOT files.  On Linux distributions you can install 'dot'.  You would run this command to create a PDF output of the C++ application below &lt;br /&gt;
&lt;br /&gt;
    dot -Tpdf pp_out.dot -o r4000.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriExpression.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriVisitor.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std ;&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
&lt;br /&gt;
    char ppfile_nm[32] = &amp;quot;pp_out.dot&amp;quot;;&lt;br /&gt;
    char transition[64] ;&lt;br /&gt;
    unsigned module_cnt = 0 ;&lt;br /&gt;
    unsigned field_cnt = 0 ;&lt;br /&gt;
    Array transition_table ;&lt;br /&gt;
    Array instantiation_table ;&lt;br /&gt;
    Array module_table ;&lt;br /&gt;
&lt;br /&gt;
    ofstream ofs(ppfile_nm, std::ios::out) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;r4000.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;digraph Verific {&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   rankdir = LR&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   node [shape=plaintext]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   edge [dir=forward]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    unsigned i ;&lt;br /&gt;
    VeriModule *mod ;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod)&lt;br /&gt;
        module_table.Insert(mod) ;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   cell&amp;quot; &amp;lt;&amp;lt; module_cnt ;&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot; [label=&amp;lt; &amp;lt;TABLE BORDER=\&amp;quot;0\&amp;quot; CELLBORDER=\&amp;quot;1\&amp;quot; CELLSPACING=\&amp;quot;0\&amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;  &lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; BGCOLOR=\&amp;quot;gray\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
        Array *ports = mod-&amp;gt;GetPorts();&lt;br /&gt;
        if (ports) {&lt;br /&gt;
            VeriIdDef *port ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(ports, i, port) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   port : &amp;quot; &amp;lt;&amp;lt; port-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *params = mod-&amp;gt;GetParameters();&lt;br /&gt;
        if (params) {&lt;br /&gt;
            VeriIdDef *param ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(params, i, param) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   parameter : &amp;quot; &amp;lt;&amp;lt; param-&amp;gt;Name() ;&lt;br /&gt;
                VeriExpression *initvalue = param-&amp;gt;GetInitialValue();&lt;br /&gt;
                if (initvalue)&lt;br /&gt;
                    ofs &amp;lt;&amp;lt; &amp;quot; = &amp;quot; &amp;lt;&amp;lt; initvalue-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *module_items = mod-&amp;gt;GetModuleItems() ;&lt;br /&gt;
        VeriModuleItem *module_item ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(module_items, i, module_item) {&lt;br /&gt;
            switch (module_item-&amp;gt;GetClassId()) {&lt;br /&gt;
                case ID_VERIMODULEINSTANTIATION:&lt;br /&gt;
                {&lt;br /&gt;
                    VeriModuleInstantiation *mod_inst = static_cast&amp;lt;VeriModuleInstantiation*&amp;gt;(module_item) ;&lt;br /&gt;
                    unsigned j ;&lt;br /&gt;
                    VeriInstId *inst_id ;&lt;br /&gt;
                    FOREACH_ARRAY_ITEM(mod_inst-&amp;gt;GetIds(), j, inst_id) {&lt;br /&gt;
                        if (!inst_id) continue ;&lt;br /&gt;
&lt;br /&gt;
                        instantiation_table.Insert(inst_id) ;&lt;br /&gt;
                        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   instantiations : &amp;quot; &amp;lt;&amp;lt; mod_inst-&amp;gt;GetModuleName() &amp;lt;&amp;lt; &amp;quot; : &amp;quot; &amp;lt;&amp;lt; inst_id-&amp;gt;InstName() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
                        unsigned k ;&lt;br /&gt;
                        FOREACH_ARRAY_ITEM(&amp;amp;module_table, k, mod) {&lt;br /&gt;
                            if (Strings::compare(inst_id-&amp;gt;GetModuleReference(), mod-&amp;gt;Name())) {&lt;br /&gt;
                                sprintf (transition, &amp;quot;   cell%d:f%d -&amp;gt; cell%d:f0 ;&amp;quot;, module_cnt, field_cnt, k) ;&lt;br /&gt;
                                char *trans = Strings::save(transition) ;&lt;br /&gt;
                                transition_table.Insert(trans) ;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        field_cnt++ ;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                default :  ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   &amp;lt;/TABLE&amp;gt; &amp;gt;] ;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        field_cnt = 0 ;&lt;br /&gt;
        module_cnt++ ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    char *trans ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;transition_table, i, trans) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; trans &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;}&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs.close();&lt;br /&gt;
&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=881</id>
		<title>Create DOT diagram of parse tree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=881"/>
				<updated>2024-01-13T02:05:44Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example parses the r4000 design in the  &amp;lt;verific&amp;gt;/example_designs/verilog  directory and writes out a Graphviz DOT-format file that represents a simple diagram view of the design.&lt;br /&gt;
&lt;br /&gt;
There are several tools that can visualize DOT files.  On Linux distributions you can install 'dot'.  You would run this command to view the output of the C++ application below &lt;br /&gt;
&lt;br /&gt;
    dot -Tpdf pp_out.dot -o r4000.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriExpression.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriVisitor.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std ;&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
&lt;br /&gt;
    char ppfile_nm[32] = &amp;quot;pp_out.dot&amp;quot;;&lt;br /&gt;
    char transition[64] ;&lt;br /&gt;
    unsigned module_cnt = 0 ;&lt;br /&gt;
    unsigned field_cnt = 0 ;&lt;br /&gt;
    Array transition_table ;&lt;br /&gt;
    Array instantiation_table ;&lt;br /&gt;
    Array module_table ;&lt;br /&gt;
&lt;br /&gt;
    ofstream ofs(ppfile_nm, std::ios::out) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;r4000.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;digraph Verific {&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   rankdir = LR&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   node [shape=plaintext]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   edge [dir=forward]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    unsigned i ;&lt;br /&gt;
    VeriModule *mod ;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod)&lt;br /&gt;
        module_table.Insert(mod) ;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   cell&amp;quot; &amp;lt;&amp;lt; module_cnt ;&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot; [label=&amp;lt; &amp;lt;TABLE BORDER=\&amp;quot;0\&amp;quot; CELLBORDER=\&amp;quot;1\&amp;quot; CELLSPACING=\&amp;quot;0\&amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;  &lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; BGCOLOR=\&amp;quot;gray\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
        Array *ports = mod-&amp;gt;GetPorts();&lt;br /&gt;
        if (ports) {&lt;br /&gt;
            VeriIdDef *port ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(ports, i, port) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   port : &amp;quot; &amp;lt;&amp;lt; port-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *params = mod-&amp;gt;GetParameters();&lt;br /&gt;
        if (params) {&lt;br /&gt;
            VeriIdDef *param ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(params, i, param) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   parameter : &amp;quot; &amp;lt;&amp;lt; param-&amp;gt;Name() ;&lt;br /&gt;
                VeriExpression *initvalue = param-&amp;gt;GetInitialValue();&lt;br /&gt;
                if (initvalue)&lt;br /&gt;
                    ofs &amp;lt;&amp;lt; &amp;quot; = &amp;quot; &amp;lt;&amp;lt; initvalue-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *module_items = mod-&amp;gt;GetModuleItems() ;&lt;br /&gt;
        VeriModuleItem *module_item ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(module_items, i, module_item) {&lt;br /&gt;
            switch (module_item-&amp;gt;GetClassId()) {&lt;br /&gt;
                case ID_VERIMODULEINSTANTIATION:&lt;br /&gt;
                {&lt;br /&gt;
                    VeriModuleInstantiation *mod_inst = static_cast&amp;lt;VeriModuleInstantiation*&amp;gt;(module_item) ;&lt;br /&gt;
                    unsigned j ;&lt;br /&gt;
                    VeriInstId *inst_id ;&lt;br /&gt;
                    FOREACH_ARRAY_ITEM(mod_inst-&amp;gt;GetIds(), j, inst_id) {&lt;br /&gt;
                        if (!inst_id) continue ;&lt;br /&gt;
&lt;br /&gt;
                        instantiation_table.Insert(inst_id) ;&lt;br /&gt;
                        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   instantiations : &amp;quot; &amp;lt;&amp;lt; mod_inst-&amp;gt;GetModuleName() &amp;lt;&amp;lt; &amp;quot; : &amp;quot; &amp;lt;&amp;lt; inst_id-&amp;gt;InstName() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
                        unsigned k ;&lt;br /&gt;
                        FOREACH_ARRAY_ITEM(&amp;amp;module_table, k, mod) {&lt;br /&gt;
                            if (Strings::compare(inst_id-&amp;gt;GetModuleReference(), mod-&amp;gt;Name())) {&lt;br /&gt;
                                sprintf (transition, &amp;quot;   cell%d:f%d -&amp;gt; cell%d:f0 ;&amp;quot;, module_cnt, field_cnt, k) ;&lt;br /&gt;
                                char *trans = Strings::save(transition) ;&lt;br /&gt;
                                transition_table.Insert(trans) ;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        field_cnt++ ;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                default :  ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   &amp;lt;/TABLE&amp;gt; &amp;gt;] ;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        field_cnt = 0 ;&lt;br /&gt;
        module_cnt++ ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    char *trans ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;transition_table, i, trans) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; trans &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;}&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs.close();&lt;br /&gt;
&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=880</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=880"/>
				<updated>2024-01-13T01:59:54Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
* [[Python pretty-printer for gdb | Python pretty-printer for gdb]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Port Expressions]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Modules with '_1' '_2' suffix in their names | Verilog: After static elaboration, there are modules with &amp;quot;_1&amp;quot;, &amp;quot;_2&amp;quot;, ..., suffix in their names. Why?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units/interfaces with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[How to use MessageCallBackHandler Class | Util/C++: How to use MessageCallBackHandler Class]]&lt;br /&gt;
* [[How to use RegisterPragmaRefCallBack() | Util/C++: How to use RegisterPragmaRefCallBack()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Finding hierarchical paths of a Netlist | Database/C++: Finding hierarchical paths of a Netlist]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[In Verilog parsetree adding names to unnamed instances | Verilog/C++: In Verilog parsetree adding names to unnamed instances]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Create DOT diagram of parse tree | Verilog/C++: Create DOT diagram of a parse tree]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Evaluate 'for-generate' loop | Verilog/C++: Evaluate 'for-generate' loop]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Simple examples of VHDL visitor pattern | VHDL/C++: Simple examples of VHDL visitor pattern]]&lt;br /&gt;
* [[Traverse instances in parsetree | VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=879</id>
		<title>Create DOT diagram of parse tree</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Create_DOT_diagram_of_parse_tree&amp;diff=879"/>
				<updated>2024-01-13T01:57:22Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Created page with &amp;quot;This example parses the r4000 design in the  &amp;lt;verific&amp;gt;/example_designs/verilog  directory and writes out a Graphviz DOT-format file that represents a simple diagram view of th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example parses the r4000 design in the  &amp;lt;verific&amp;gt;/example_designs/verilog  directory and writes out a Graphviz DOT-format file that represents a simple diagram view of the design.&lt;br /&gt;
&lt;br /&gt;
There are several tools that can visualize DOT files. On Linux distributions you can install 'dot'. For the output of the application below you would run&lt;br /&gt;
&lt;br /&gt;
    dot -Tpdf pp_out.dot -o r4000.pdf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriExpression.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriVisitor.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std ;&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
&lt;br /&gt;
    char ppfile_nm[32] = &amp;quot;pp_out.dot&amp;quot;;&lt;br /&gt;
    char transition[64] ;&lt;br /&gt;
    unsigned module_cnt = 0 ;&lt;br /&gt;
    unsigned field_cnt = 0 ;&lt;br /&gt;
    Array transition_table ;&lt;br /&gt;
    Array instantiation_table ;&lt;br /&gt;
    Array module_table ;&lt;br /&gt;
&lt;br /&gt;
    ofstream ofs(ppfile_nm, std::ios::out) ;&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;r4000.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;digraph Verific {&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   rankdir = LR&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   node [shape=plaintext]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;   edge [dir=forward]&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    unsigned i ;&lt;br /&gt;
    VeriModule *mod ;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod)&lt;br /&gt;
        module_table.Insert(mod) ;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, mod) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   cell&amp;quot; &amp;lt;&amp;lt; module_cnt ;&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot; [label=&amp;lt; &amp;lt;TABLE BORDER=\&amp;quot;0\&amp;quot; CELLBORDER=\&amp;quot;1\&amp;quot; CELLSPACING=\&amp;quot;0\&amp;quot;&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;  &lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot; BGCOLOR=\&amp;quot;gray\&amp;quot;&amp;gt;MODULE : &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
        Array *ports = mod-&amp;gt;GetPorts();&lt;br /&gt;
        if (ports) {&lt;br /&gt;
            VeriIdDef *port ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(ports, i, port) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   port : &amp;quot; &amp;lt;&amp;lt; port-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *params = mod-&amp;gt;GetParameters();&lt;br /&gt;
        if (params) {&lt;br /&gt;
            VeriIdDef *param ;&lt;br /&gt;
            FOREACH_ARRAY_ITEM(params, i, param) {&lt;br /&gt;
                ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt++ &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   parameter : &amp;quot; &amp;lt;&amp;lt; param-&amp;gt;Name() ;&lt;br /&gt;
                VeriExpression *initvalue = param-&amp;gt;GetInitialValue();&lt;br /&gt;
                if (initvalue)&lt;br /&gt;
                    ofs &amp;lt;&amp;lt; &amp;quot; = &amp;quot; &amp;lt;&amp;lt; initvalue-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        Array *module_items = mod-&amp;gt;GetModuleItems() ;&lt;br /&gt;
        VeriModuleItem *module_item ;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(module_items, i, module_item) {&lt;br /&gt;
            switch (module_item-&amp;gt;GetClassId()) {&lt;br /&gt;
                case ID_VERIMODULEINSTANTIATION:&lt;br /&gt;
                {&lt;br /&gt;
                    VeriModuleInstantiation *mod_inst = static_cast&amp;lt;VeriModuleInstantiation*&amp;gt;(module_item) ;&lt;br /&gt;
                    unsigned j ;&lt;br /&gt;
                    VeriInstId *inst_id ;&lt;br /&gt;
                    FOREACH_ARRAY_ITEM(mod_inst-&amp;gt;GetIds(), j, inst_id) {&lt;br /&gt;
                        if (!inst_id) continue ;&lt;br /&gt;
&lt;br /&gt;
                        instantiation_table.Insert(inst_id) ;&lt;br /&gt;
                        ofs &amp;lt;&amp;lt; &amp;quot;      &amp;lt;TR&amp;gt; &amp;lt;TD ALIGN=\&amp;quot;left\&amp;quot; PORT=\&amp;quot;f&amp;quot; &amp;lt;&amp;lt; field_cnt &amp;lt;&amp;lt; &amp;quot;\&amp;quot;&amp;gt;   instantiations : &amp;quot; &amp;lt;&amp;lt; mod_inst-&amp;gt;GetModuleName() &amp;lt;&amp;lt; &amp;quot; : &amp;quot; &amp;lt;&amp;lt; inst_id-&amp;gt;InstName() &amp;lt;&amp;lt; &amp;quot;&amp;lt;/TD&amp;gt; &amp;lt;/TR&amp;gt;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
                        unsigned k ;&lt;br /&gt;
                        FOREACH_ARRAY_ITEM(&amp;amp;module_table, k, mod) {&lt;br /&gt;
                            if (Strings::compare(inst_id-&amp;gt;GetModuleReference(), mod-&amp;gt;Name())) {&lt;br /&gt;
                                sprintf (transition, &amp;quot;   cell%d:f%d -&amp;gt; cell%d:f0 ;&amp;quot;, module_cnt, field_cnt, k) ;&lt;br /&gt;
                                char *trans = Strings::save(transition) ;&lt;br /&gt;
                                transition_table.Insert(trans) ;&lt;br /&gt;
                            }&lt;br /&gt;
                        }&lt;br /&gt;
                        field_cnt++ ;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                default :  ;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ofs &amp;lt;&amp;lt; &amp;quot;   &amp;lt;/TABLE&amp;gt; &amp;gt;] ;&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        field_cnt = 0 ;&lt;br /&gt;
        module_cnt++ ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; endl ;&lt;br /&gt;
&lt;br /&gt;
    char *trans ;&lt;br /&gt;
    FOREACH_ARRAY_ITEM(&amp;amp;transition_table, i, trans) {&lt;br /&gt;
        ofs &amp;lt;&amp;lt; trans &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ofs &amp;lt;&amp;lt; &amp;quot;}&amp;quot; &amp;lt;&amp;lt; endl ;&lt;br /&gt;
    ofs.close();&lt;br /&gt;
&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=878</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=878"/>
				<updated>2024-01-13T01:38:06Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
* [[Python pretty-printer for gdb | Python pretty-printer for gdb]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Port Expressions]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Modules with '_1' '_2' suffix in their names | Verilog: After static elaboration, there are modules with &amp;quot;_1&amp;quot;, &amp;quot;_2&amp;quot;, ..., suffix in their names. Why?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units/interfaces with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[How to use MessageCallBackHandler Class | Util/C++: How to use MessageCallBackHandler Class]]&lt;br /&gt;
* [[How to use RegisterPragmaRefCallBack() | Util/C++: How to use RegisterPragmaRefCallBack()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Finding hierarchical paths of a Netlist | Database/C++: Finding hierarchical paths of a Netlist]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[In Verilog parsetree adding names to unnamed instances | Verilog/C++: In Verilog parsetree adding names to unnamed instances]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Create DOT diagram of parse tree | Verilog/C++: Create DOT diagram of parse tree]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Evaluate 'for-generate' loop | Verilog/C++: Evaluate 'for-generate' loop]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Simple examples of VHDL visitor pattern | VHDL/C++: Simple examples of VHDL visitor pattern]]&lt;br /&gt;
* [[Traverse instances in parsetree | VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Modules/design_units_with_%22_default%22_suffix_in_their_names&amp;diff=863</id>
		<title>Modules/design units with &quot; default&quot; suffix in their names</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Modules/design_units_with_%22_default%22_suffix_in_their_names&amp;diff=863"/>
				<updated>2023-10-23T15:37:41Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they? '''&lt;br /&gt;
&lt;br /&gt;
Static elaboration process is a multiple-iteration process and modules/design units may be modified differently in each iteration.&lt;br /&gt;
&lt;br /&gt;
We need to keep original version of modules/design units as they are immediately after analysis so that they can be copied for different parameter/generic settings in each iteration and body of copied modules/design units can be elaborated (generate unroll, array instance processing, etc.) differently for each parameter/generic setting.&lt;br /&gt;
&lt;br /&gt;
Another reason to copy instantiated modules/design units with &amp;quot;_default&amp;quot; name is in mixed language elaboration. Here a Verilog module may instantiate a VHDL entity which has been elaborated earlier with different generic values. In that case during Verilog elaboration we will not get original contents of instantiated entity.&lt;br /&gt;
&lt;br /&gt;
Moreover, to support incremental elaboration we need to keep original modules/design units, as lower level units can be elaborated earlier.&lt;br /&gt;
&lt;br /&gt;
In Verilog, we have a runtime-flag &amp;quot;veri_remove_suffix_default_from_copied_module_names&amp;quot; to rename modules from &amp;quot;&amp;lt;orig_name&amp;gt;_default&amp;quot; to &amp;quot;&amp;lt;orig_name&amp;gt;&amp;quot;. This will work only when runtime-flag &amp;quot;veri_cleanup_base_modules&amp;quot; is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Q: What about interfaces with &amp;quot;_default&amp;quot; suffix in their names? Why? And what are they? '''&lt;br /&gt;
&lt;br /&gt;
SystemVerilog interfaces can be used in any of the following ways :&lt;br /&gt;
&lt;br /&gt;
*  As interface instantiations.&lt;br /&gt;
*  As interface ports.&lt;br /&gt;
*  As virtual interfaces.&lt;br /&gt;
*  As hierarchical names.&lt;br /&gt;
&lt;br /&gt;
If an interface is used in a virtual interface declaration, interface instance, or port of a top-level module, the interface will be copied to  '&amp;lt;interface_name&amp;gt;_default', even if none of its parameters are overwritten.  This copied interface will be the one that is elaborated and specified in the virtual interface declaration, interface instance, or top-level module port.  Every instantiated module containing interface type ports will also be copied during static elaboration since its interface port names may have been modified as well.&lt;br /&gt;
&lt;br /&gt;
Virtual interfaces can appear in many different parts of a design, and may or may not be associated with interface instances. Virtual interfaces are not stored in Verific's pseudo-tree, so after static elaboration we do not know whether an interface is used as a virtual interface or not, or where it is being used.  Without this knowledge, we cannot arbitrarily change all the references of an interface from  '&amp;lt;interface_name&amp;gt;_default'  to  '&amp;lt;interface_name&amp;gt; because the references may become invalid. Because of this, we do not have flags to remove the '_default' from the interface names as we do for modules.&lt;br /&gt;
&lt;br /&gt;
The '_default_&amp;lt;n&amp;gt;' suffix may also be added due to the presence of hierarchical references in an interface or bind statements containing interface instantiations.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=862</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=862"/>
				<updated>2023-10-23T15:36:38Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
* [[Python pretty-printer for gdb | Python pretty-printer for gdb]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Port Expressions]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Modules with '_1' '_2' suffix in their names | Verilog: After static elaboration, there are modules with &amp;quot;_1&amp;quot;, &amp;quot;_2&amp;quot;, ..., suffix in their names. Why?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units/interfaces with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[How to use RegisterPragmaRefCallBack() | Util/C++: How to use RegisterPragmaRefCallBack()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Finding hierarchical paths of a Netlist | Database/C++: Finding hierarchical paths of a Netlist]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[In Verilog parsetree adding names to unnamed instances | Verilog/C++: In Verilog parsetree adding names to unnamed instances]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Evaluate 'for-generate' loop | Verilog/C++: Evaluate 'for-generate' loop]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Simple examples of VHDL visitor pattern | VHDL/C++: Simple examples of VHDL visitor pattern]]&lt;br /&gt;
* [[Traverse instances in parsetree | VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Modules/design_units_with_%22_default%22_suffix_in_their_names&amp;diff=861</id>
		<title>Modules/design units with &quot; default&quot; suffix in their names</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Modules/design_units_with_%22_default%22_suffix_in_their_names&amp;diff=861"/>
				<updated>2023-10-23T15:29:19Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they? '''&lt;br /&gt;
&lt;br /&gt;
Static elaboration process is a multiple-iteration process and modules/design units may be modified differently in each iteration.&lt;br /&gt;
&lt;br /&gt;
We need to keep original version of modules/design units as they are immediately after analysis so that they can be copied for different parameter/generic settings in each iteration and body of copied modules/design units can be elaborated (generate unroll, array instance processing, etc.) differently for each parameter/generic setting.&lt;br /&gt;
&lt;br /&gt;
Another reason to copy instantiated modules/design units with &amp;quot;_default&amp;quot; name is in mixed language elaboration. Here a Verilog module may instantiate a VHDL entity which has been elaborated earlier with different generic values. In that case during Verilog elaboration we will not get original contents of instantiated entity.&lt;br /&gt;
&lt;br /&gt;
Moreover, to support incremental elaboration we need to keep original modules/design units, as lower level units can be elaborated earlier.&lt;br /&gt;
&lt;br /&gt;
In Verilog, we have a runtime-flag &amp;quot;veri_remove_suffix_default_from_copied_module_names&amp;quot; to rename modules from &amp;quot;&amp;lt;orig_name&amp;gt;_default&amp;quot; to &amp;quot;&amp;lt;orig_name&amp;gt;&amp;quot;. This will work only when runtime-flag &amp;quot;veri_cleanup_base_modules&amp;quot; is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Q: What about interfaces with &amp;quot;_default&amp;quot; suffix in their names? Why? And what are they? '''&lt;br /&gt;
&lt;br /&gt;
Interfaces can be used in any of the following ways :&lt;br /&gt;
&lt;br /&gt;
*  As interface instantiations.&lt;br /&gt;
*  As interface ports.&lt;br /&gt;
*  As virtual interfaces.&lt;br /&gt;
*  As hierarchical names.&lt;br /&gt;
&lt;br /&gt;
If an interface is used in a virtual interface declaration, interface instance, or port of a top-level module, the interface will be copied to  '&amp;lt;interface_name&amp;gt;_default', even if none of its parameters are overwritten.  This copied interface will be the one that is elaborated and specified in the virtual interface declaration, interface instance, or top-level module port.  Every instantiated module containing interface type ports will also be copied during static elaboration since its interface port names may have been modified as well.&lt;br /&gt;
&lt;br /&gt;
Virtual interfaces can appear in many different parts of a design, and may or may not be associated with interface instances. Virtual interfaces are not stored in Verific's pseudo-tree, so after static elaboration we do not know whether an interface is used as a virtual interface or not, or where it is being used.  Without this knowledge, we cannot arbitrarily change all the references of an interface from  '&amp;lt;interface_name&amp;gt;_default'  to  '&amp;lt;interface_name&amp;gt; because the references may become invalid. Because of this, we do not have flags to remove the '_default' from the interface names as we do for modules.&lt;br /&gt;
&lt;br /&gt;
The '_default_&amp;lt;n&amp;gt;' suffix may also be added due to the presence of hierarchical references in an interface or bind statements containing interface instantiations.&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Instance_-_Module_binding_order&amp;diff=839</id>
		<title>Instance - Module binding order</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Instance_-_Module_binding_order&amp;diff=839"/>
				<updated>2023-04-19T18:04:10Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Verilog has many ways to find modules not in the file being directly read: -L, -v, -y, .... There may be more than one module of the same name. What is the order of binding?'''&lt;br /&gt;
&lt;br /&gt;
The order of searching for modules is:&lt;br /&gt;
&lt;br /&gt;
# While parsing:&lt;br /&gt;
## `uselib&lt;br /&gt;
## -work (present working library)&lt;br /&gt;
## -L&lt;br /&gt;
## -y/-v (their order in an f-file is considered)&lt;br /&gt;
# While elaborating:&lt;br /&gt;
## configurations&lt;br /&gt;
## already resolved module from analysis, ie, order of parsing (above)&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=836</id>
		<title>Compile-time/run-time flags</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=836"/>
				<updated>2023-03-03T03:31:58Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Are there options to control Verific software's behavior?'''&lt;br /&gt;
&lt;br /&gt;
There are compile-time flags and run-time flags ([https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags Verific Runtime Flags]) to control Verific software's behavior. &lt;br /&gt;
&lt;br /&gt;
When compile-time flags are changed, it will be necessary to rebuild the software for the flags to take effect. These flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBCompileFlags.h&lt;br /&gt;
   hdl_file_sort/HdlFileSortCompileFlags.h&lt;br /&gt;
   synlib/SynlibCompileFlags.h&lt;br /&gt;
   util/VerificSystem.h&lt;br /&gt;
   verilog_nl/VeriNetlistCompileFlags.h&lt;br /&gt;
   verilog/VeriCompileFlags.h&lt;br /&gt;
   vhdl/VhdlCompileFlags.h&lt;br /&gt;
&lt;br /&gt;
If the behavior of the software needs to be changed dynamically, this can be accomplished using run-time flags. With run-time flags, toggling of behavior can occur at any time without requiring re-compilation of the software. In most cases setting a flag to '1' will enable it and setting to '0' will disable it, although there are some flags that may take on other values, such as 'veri_loop_limit' = 10000, and 'db_record_naming_style' = &amp;quot;%s.%s&amp;quot;. Run-time flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBRuntimeFlags.h&lt;br /&gt;
   edif/EdifRuntimeFlags.h&lt;br /&gt;
   hier_tree/HierRuntimeFlags.h&lt;br /&gt;
   pct/PCTRuntimeFlags.h&lt;br /&gt;
   synlib/SynlibRuntimeFlags.h&lt;br /&gt;
   upf/UpfRuntimeFlags.h&lt;br /&gt;
   util/RuntimeFlags.cpp&lt;br /&gt;
   verilog_nl/VeriNetlistRuntimeFlags.h&lt;br /&gt;
   verilog/VeriRuntimeFlags.h&lt;br /&gt;
   vhdl/VhdlRuntimeFlags.h&lt;br /&gt;
&lt;br /&gt;
Note that depending on your Verific product configuration, you may or may not have all the files listed above. Also, most of the compile-time flags have an equivalent run-time flag to facilitate toggling of the desired behavior. For a full list of Verific's run-time flags with descriptions of their functionality, please refer to this page: [https://www.verific.com/docs/index.php?title=RuntimeFlags Verific Runtime Flags]&lt;br /&gt;
&lt;br /&gt;
For C++, use the following APIs to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar()       - Set a run-time flag to a particular value (value is a non-negative integer or 0) &lt;br /&gt;
    RuntimeFlags::GetVar()       - Get the value of a run-time flag (for flags that return a non-negative integer or 0)&lt;br /&gt;
    RuntimeFlags::SetStringVar() - Set a run-time flag to a particular string value &lt;br /&gt;
    RuntimeFlags::GetStringVar() - Get the value of a run-time flag (for flags that return a string value) &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are examples on how to call these APIs:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_preserve_comments&amp;quot;, 1) ;                         // enable flag 'veri_preserve_comments'  &lt;br /&gt;
    RuntimeFlags::GetVar(&amp;quot;veri_preserve_comments&amp;quot;) ;                            // retrieve the value of 'veri_preserve_comments'&lt;br /&gt;
    RuntimeFlags::SetStringVar(&amp;quot;db_interface_modport_field_separator&amp;quot;, &amp;quot;_&amp;quot;) ;   // set &amp;quot;db_interface_modport_field_separator&amp;quot; to be &amp;quot;_&amp;quot; &lt;br /&gt;
    RuntimeFlags::GetStringVar(&amp;quot;db_array_naming_style&amp;quot;) ;                       // retrieve the value of 'db_array_naming_style' &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Tcl scripting, use the following commands to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag       - Set a run-time flag to a particular value &lt;br /&gt;
    get_runtime_flag       - Get the value of a run-time flag &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are examples on how to call these commands:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag &amp;quot;db_array_naming_style&amp;quot; &amp;quot;%s\[%d\]&amp;quot;   &lt;br /&gt;
    get_runtime_flag &amp;quot;veri_preserve_comments&amp;quot;                &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=835</id>
		<title>Compile-time/run-time flags</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=835"/>
				<updated>2023-03-03T03:19:09Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Are there options to control Verific software's behavior?'''&lt;br /&gt;
&lt;br /&gt;
There are compile-time flags and run-time flags to control Verific software's behavior.&lt;br /&gt;
&lt;br /&gt;
When compile-time flags are changed, it will be necessary to rebuild the software for the flags to take effect. These flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBCompileFlags.h&lt;br /&gt;
   hdl_file_sort/HdlFileSortCompileFlags.h&lt;br /&gt;
   synlib/SynlibCompileFlags.h&lt;br /&gt;
   util/VerificSystem.h&lt;br /&gt;
   verilog_nl/VeriNetlistCompileFlags.h&lt;br /&gt;
   verilog/VeriCompileFlags.h&lt;br /&gt;
   vhdl/VhdlCompileFlags.h&lt;br /&gt;
&lt;br /&gt;
If the behavior of the software needs to be changed dynamically, this can be accomplished using run-time flags. With run-time flags, toggling of behavior can occur at any time without requiring re-compilation of the software. In most cases setting a flag to '1' will enable it and setting to '0' will disable it, although there are some flags that may take on other values, such as 'veri_loop_limit' = 10000, and 'db_record_naming_style' = &amp;quot;%s.%s&amp;quot;. Run-time flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBRuntimeFlags.h&lt;br /&gt;
   edif/EdifRuntimeFlags.h&lt;br /&gt;
   hier_tree/HierRuntimeFlags.h&lt;br /&gt;
   pct/PCTRuntimeFlags.h&lt;br /&gt;
   synlib/SynlibRuntimeFlags.h&lt;br /&gt;
   upf/UpfRuntimeFlags.h&lt;br /&gt;
   util/RuntimeFlags.cpp&lt;br /&gt;
   verilog_nl/VeriNetlistRuntimeFlags.h&lt;br /&gt;
   verilog/VeriRuntimeFlags.h&lt;br /&gt;
   vhdl/VhdlRuntimeFlags.h&lt;br /&gt;
&lt;br /&gt;
Note that depending on your Verific product configuration, you may or may not have all the files listed above. Also, most of the compile-time flags have an equivalent run-time flag to facilitate toggling of the desired behavior. For a full list of Verific's run-time flags with descriptions of their functionality, please refer to this page: [https://www.verific.com/docs/index.php?title=RuntimeFlags Verific Runtime Flags]&lt;br /&gt;
&lt;br /&gt;
For C++, use the following APIs to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar()       - Set a run-time flag to a particular value (value is a non-negative integer or 0) &lt;br /&gt;
    RuntimeFlags::GetVar()       - Get the value of a run-time flag (for flags that return a non-negative integer or 0)&lt;br /&gt;
    RuntimeFlags::SetStringVar() - Set a run-time flag to a particular string value &lt;br /&gt;
    RuntimeFlags::GetStringVar() - Get the value of a run-time flag (for flags that return a string value) &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are examples on how to call these APIs:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_preserve_comments&amp;quot;, 1) ;                         // enable flag 'veri_preserve_comments'  &lt;br /&gt;
    RuntimeFlags::GetVar(&amp;quot;veri_preserve_comments&amp;quot;) ;                            // retrieve the value of 'veri_preserve_comments'&lt;br /&gt;
    RuntimeFlags::SetStringVar(&amp;quot;db_interface_modport_field_separator&amp;quot;, &amp;quot;_&amp;quot;) ;   // set &amp;quot;db_interface_modport_field_separator&amp;quot; to be &amp;quot;_&amp;quot; &lt;br /&gt;
    RuntimeFlags::GetStringVar(&amp;quot;db_array_naming_style&amp;quot;) ;                       // retrieve the value of 'db_array_naming_style' &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Tcl scripting, use the following commands to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag       - Set a run-time flag to a particular value &lt;br /&gt;
    get_runtime_flag       - Get the value of a run-time flag &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are examples on how to call these commands:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag &amp;quot;db_array_naming_style&amp;quot; &amp;quot;%s\[%d\]&amp;quot;   &lt;br /&gt;
    get_runtime_flag &amp;quot;veri_preserve_comments&amp;quot;                &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=834</id>
		<title>Compile-time/run-time flags</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=834"/>
				<updated>2023-03-03T03:11:49Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Are there options to control Verific software's behavior?'''&lt;br /&gt;
&lt;br /&gt;
There are compile-time flags and run-time flags to control Verific software's behavior.&lt;br /&gt;
&lt;br /&gt;
When compile-time flags are changed, it will be necessary to rebuild the software for the flags to take effect. These flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBCompileFlags.h&lt;br /&gt;
   hdl_file_sort/HdlFileSortCompileFlags.h&lt;br /&gt;
   synlib/SynlibCompileFlags.h&lt;br /&gt;
   util/VerificSystem.h&lt;br /&gt;
   verilog_nl/VeriNetlistCompileFlags.h&lt;br /&gt;
   verilog/VeriCompileFlags.h&lt;br /&gt;
   vhdl/VhdlCompileFlags.h&lt;br /&gt;
&lt;br /&gt;
If the behavior of the software needs to be changed dynamically, this can be accomplished using run-time flags. With run-time flags, toggling of behavior can occur at any time without requiring re-compilation of the software. In most cases setting a flag to '1' will enable it and setting to '0' will disable it, although there are some flags that may take on other values, such as 'veri_loop_limit' = 10000, and 'db_record_naming_style' = &amp;quot;%s.%s&amp;quot;. Run-time flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBRuntimeFlags.h&lt;br /&gt;
   edif/EdifRuntimeFlags.h&lt;br /&gt;
   hier_tree/HierRuntimeFlags.h&lt;br /&gt;
   pct/PCTRuntimeFlags.h&lt;br /&gt;
   synlib/SynlibRuntimeFlags.h&lt;br /&gt;
   upf/UpfRuntimeFlags.h&lt;br /&gt;
   util/RuntimeFlags.cpp&lt;br /&gt;
   verilog_nl/VeriNetlistRuntimeFlags.h&lt;br /&gt;
   verilog/VeriRuntimeFlags.h&lt;br /&gt;
   vhdl/VhdlRuntimeFlags.h&lt;br /&gt;
&lt;br /&gt;
Note that depending on your Verific product configuration, you may or may not have all the files listed above. Also, most of the compile-time flags have an equivalent run-time flag to facilitate toggling of the desired behavior. For a full list of Verific's run-time flags with descriptions of their functionality, please refer to this page: [https://www.verific.com/docs/index.php?title=RuntimeFlags Verific Runtime Flags]&lt;br /&gt;
&lt;br /&gt;
For C++, use the following APIs to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar()       - Set a run-time flag to a particular value (value is a non-negative integer or 0) &lt;br /&gt;
    RuntimeFlags::GetVar()       - Get the value of a run-time flag (for flags that return a non-negative integer or 0)&lt;br /&gt;
    RuntimeFlags::SetStringVar() - Set a run-time flag to a particular string value &lt;br /&gt;
    RuntimeFlags::GetStringVar() - Get the value of a run-time flag (for flags that return a string value) &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some examples on how to call these APIs:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_preserve_comments&amp;quot;, 1) ;                         // enable flag 'veri_preserve_comments'  &lt;br /&gt;
    RuntimeFlags::GetVar(&amp;quot;veri_preserve_comments&amp;quot;) ;                            // retrieve the value of 'veri_preserve_comments'&lt;br /&gt;
    RuntimeFlags::SetStringVar(&amp;quot;db_interface_modport_field_separator&amp;quot;, &amp;quot;_&amp;quot;) ;   // set &amp;quot;db_interface_modport_field_separator&amp;quot; to be &amp;quot;_&amp;quot; &lt;br /&gt;
    RuntimeFlags::GetStringVar(&amp;quot;db_array_naming_style&amp;quot;) ;                       // retrieve the value of 'db_array_naming_style' &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For Tcl scripting, use the following commands to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag       - Set a run-time flag to a particular value &lt;br /&gt;
    get_runtime_flag       - Get the value of a run-time flag &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some examples on how to call these commands:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag &amp;quot;db_array_naming_style&amp;quot; &amp;quot;%s\[%d\]&amp;quot;   &lt;br /&gt;
    get_runtime_flag &amp;quot;veri_preserve_comments&amp;quot;                &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=833</id>
		<title>Compile-time/run-time flags</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Compile-time/run-time_flags&amp;diff=833"/>
				<updated>2023-03-03T03:05:28Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: Are there options to control Verific software's behavior?'''&lt;br /&gt;
&lt;br /&gt;
There are compile-time flags and run-time flags to control Verific software's behavior.&lt;br /&gt;
&lt;br /&gt;
When compile-time flags are changed, it will be necessary to rebuild the software for the flags to take effect. These flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBCompileFlags.h&lt;br /&gt;
   hdl_file_sort/HdlFileSortCompileFlags.h&lt;br /&gt;
   synlib/SynlibCompileFlags.h&lt;br /&gt;
   util/VerificSystem.h&lt;br /&gt;
   verilog_nl/VeriNetlistCompileFlags.h&lt;br /&gt;
   verilog/VeriCompileFlags.h&lt;br /&gt;
   vhdl/VhdlCompileFlags.h&lt;br /&gt;
&lt;br /&gt;
If the behavior of the software needs to be changed dynamically, this can be accomplished using run-time flags. With run-time flags, toggling of behavior can occur at any time without requiring re-compilation of the software. In most cases setting a flag to '1' will enable it and setting to '0' will disable it, although there are some flags that may take on other values, such as 'veri_loop_limit' = 10000, and 'db_record_naming_style' = &amp;quot;%s.%s&amp;quot;. Run-time flags reside in the following files:&lt;br /&gt;
&lt;br /&gt;
   database/DBRuntimeFlags.h&lt;br /&gt;
   edif/EdifRuntimeFlags.h&lt;br /&gt;
   hier_tree/HierRuntimeFlags.h&lt;br /&gt;
   pct/PCTRuntimeFlags.h&lt;br /&gt;
   synlib/SynlibRuntimeFlags.h&lt;br /&gt;
   upf/UpfRuntimeFlags.h&lt;br /&gt;
   util/RuntimeFlags.cpp&lt;br /&gt;
   verilog_nl/VeriNetlistRuntimeFlags.h&lt;br /&gt;
   verilog/VeriRuntimeFlags.h&lt;br /&gt;
   vhdl/VhdlRuntimeFlags.h&lt;br /&gt;
&lt;br /&gt;
Note that depending on your Verific product configuration, you may or may not have all the files listed above. Also, most of the compile-time flags have an equivalent run-time flag to facilitate toggling of the desired behavior. For a full list of Verific's run-time flags with descriptions of their functionality, please refer to this page: [https://www.verific.com/docs/index.php?title=RuntimeFlags Verific Runtime Flags]&lt;br /&gt;
&lt;br /&gt;
For C++, use the following APIs to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar()       - Set a run-time flag to a particular value (value is a non-negative integer or 0) &lt;br /&gt;
    RuntimeFlags::GetVar()       - Get the value of a run-time flag (for flags that return a non-negative integer or 0)&lt;br /&gt;
    RuntimeFlags::SetStringVar() - Set a run-time flag to a particular string value &lt;br /&gt;
    RuntimeFlags::GetStringVar() - Get the value of a run-time flag (for flags that return a string value) &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some examples on how to call these APIs:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_preserve_comments&amp;quot;, 1) ;                         // enable flag 'veri_preserve_comments'  &lt;br /&gt;
    RuntimeFlags::GetVar(&amp;quot;veri_preserve_comments&amp;quot;) ;                            // retrieve the value of 'veri_preserve_comments'&lt;br /&gt;
    RuntimeFlags::SetStringVar(&amp;quot;db_interface_modport_field_separator&amp;quot;, &amp;quot;_&amp;quot;) ;   // set &amp;quot;db_interface_modport_field_separator&amp;quot; to be &amp;quot;_&amp;quot; &lt;br /&gt;
    RuntimeFlags::GetStringVar(&amp;quot;db_array_naming_style&amp;quot;) ;                       // retrieve the value of 'db_array_naming_style' &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Tcl scripting, use the following commands to control the run-time flags:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag       - Set a run-time flag to a particular value &lt;br /&gt;
    get_runtime_flag       - Get the value of a run-time flag &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some examples on how to call these commands:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    set_runtime_flag &amp;quot;db_array_naming_style&amp;quot; &amp;quot;%s\[%d\]&amp;quot;   &lt;br /&gt;
    get_runtime_flag &amp;quot;veri_preserve_comments&amp;quot;                &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=How_to_ignore_parameters/generics_in_elaboration&amp;diff=830</id>
		<title>How to ignore parameters/generics in elaboration</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_ignore_parameters/generics_in_elaboration&amp;diff=830"/>
				<updated>2023-02-17T18:14:08Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?'''&lt;br /&gt;
&lt;br /&gt;
Specific parameters/generics of specific modules/units can be ignored during elaboration. Related APIs are:&lt;br /&gt;
&lt;br /&gt;
    vhdl_file::GetIgnoreGeneric()&lt;br /&gt;
    vhdl_file::SetIgnoreGeneric()&lt;br /&gt;
    vhdl_file::RemoveAllIgnoreGeneric()&lt;br /&gt;
&lt;br /&gt;
    veri_file::GetIgnoreParameter()&lt;br /&gt;
    veri_file::SetIgnoreParameter()&lt;br /&gt;
    veri_file::RemoveAllIgnoreParameter()&lt;br /&gt;
&lt;br /&gt;
Below is an example as how to ignore all parameters in a library:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    veri_file::AnalyzeMultipleFiles(veri_files, veri_file::SYSTEM_VERILOG, &amp;quot;work&amp;quot;, veri_file::MFCU);&lt;br /&gt;
&lt;br /&gt;
    /*** Go through library &amp;quot;work&amp;quot; in the parsetree,&lt;br /&gt;
         find all parameters,&lt;br /&gt;
         and set &amp;quot;ignored&amp;quot; on all of them.&lt;br /&gt;
         Or you can select the parameters to ignore ***/&lt;br /&gt;
    MapIter mi;&lt;br /&gt;
    VeriModule *module ;&lt;br /&gt;
    VeriLibrary *work_lib = veri_file::GetLibrary(&amp;quot;work&amp;quot;, 1);&lt;br /&gt;
&lt;br /&gt;
    FOREACH_VERILOG_MODULE_IN_LIBRARY (work_lib, mi, module) { // do this for each module&lt;br /&gt;
        if (!module) continue;&lt;br /&gt;
        Array *parameters = module-&amp;gt;GetParameters(); // collect all parameters&lt;br /&gt;
        if (!parameters) continue;&lt;br /&gt;
        unsigned i;&lt;br /&gt;
        VeriIdDef *param_id;&lt;br /&gt;
        FOREACH_ARRAY_ITEM(parameters, i, param_id) { // do this for each parameter of the module&lt;br /&gt;
            if (!param_id) continue;&lt;br /&gt;
            veri_file::SetIgnoreParameter(work_lib-&amp;gt;GetName(), module-&amp;gt;Name(), param_id-&amp;gt;Name());&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    if (!veri_file::Elaborate(&amp;quot;top&amp;quot;, &amp;quot;work&amp;quot;, 0)) {&lt;br /&gt;
        return 1 ;&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Pretty-print_a_module_and_the_packages_imported_by_the_module&amp;diff=805</id>
		<title>Pretty-print a module and the packages imported by the module</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Pretty-print_a_module_and_the_packages_imported_by_the_module&amp;diff=805"/>
				<updated>2022-09-23T00:08:11Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriScope.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
using namespace std ;&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main(int argc, const char **argv)&lt;br /&gt;
{&lt;br /&gt;
    const char *file = (argc &amp;gt; 1) ? argv[1] : &amp;quot;test.sv&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
    // Analyze the files (AnalyzeMultipleFiles API is the recommended one):&lt;br /&gt;
    Array files(1) ;&lt;br /&gt;
    files.InsertLast(file) ;&lt;br /&gt;
    if (!veri_file::AnalyzeMultipleFiles(&amp;amp;files, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    VeriModule *module ;&lt;br /&gt;
    FOREACH_VERILOG_MODULE(mi, module){&lt;br /&gt;
        if (!module) continue ;&lt;br /&gt;
        if (module-&amp;gt;IsPackage()) continue ; // no need to dive into package&lt;br /&gt;
&lt;br /&gt;
        // Get the scope of the module:&lt;br /&gt;
        VeriScope *scope = module-&amp;gt;GetScope() ;&lt;br /&gt;
&lt;br /&gt;
        char *outputfilename = Strings::save(module-&amp;gt;Name(), &amp;quot;_pp_out.v&amp;quot;);&lt;br /&gt;
        std::ofstream f(outputfilename, std::ios::out) ;&lt;br /&gt;
&lt;br /&gt;
        // Get the scope that this module/scope is using:&lt;br /&gt;
        // This also includes the compilation unit in the list, if any/required:&lt;br /&gt;
        Set *using_scopes = (scope) ? scope-&amp;gt;GetUsing() : 0 ;&lt;br /&gt;
&lt;br /&gt;
        // Print all those scopes/modules before printing the module itself:&lt;br /&gt;
        SetIter si ;&lt;br /&gt;
        VeriScope *using_scope ;&lt;br /&gt;
        FOREACH_SET_ITEM(using_scopes, si, &amp;amp;using_scope) {&lt;br /&gt;
            VeriIdDef *mod_id = using_scope-&amp;gt;GetContainingModule() ;&lt;br /&gt;
            VeriModule *mod = (mod_id) ? mod_id-&amp;gt;GetModule() : 0 ;&lt;br /&gt;
            if (!mod) continue ;&lt;br /&gt;
            if (mod-&amp;gt;IsPackage()) {&lt;br /&gt;
                std::cout &amp;lt;&amp;lt; &amp;quot;&amp;gt;&amp;gt;&amp;gt; Module '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;' uses package '&amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;' &amp;lt;&amp;lt;&amp;lt;\n&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
            f &amp;lt;&amp;lt; &amp;quot;// Printing package &amp;quot; &amp;lt;&amp;lt; mod-&amp;gt;Name() &amp;lt;&amp;lt; endl ;&lt;br /&gt;
            mod-&amp;gt;PrettyPrint(f, 0) ;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // Now  print the module:&lt;br /&gt;
        f &amp;lt;&amp;lt; &amp;quot;// Printing module &amp;quot; &amp;lt;&amp;lt; module-&amp;gt;Name() &amp;lt;&amp;lt; endl ;&lt;br /&gt;
        module-&amp;gt;PrettyPrint(f, 0) ;&lt;br /&gt;
        f.close() ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Input Verilog:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
package PKG1 ;&lt;br /&gt;
    typedef int my_int ;&lt;br /&gt;
endpackage&lt;br /&gt;
&lt;br /&gt;
typedef byte my_byte ;&lt;br /&gt;
&lt;br /&gt;
module test ;&lt;br /&gt;
    import PKG1::* ;&lt;br /&gt;
    my_int int1 ;&lt;br /&gt;
    my_byte byte1 ;&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pretty-printed output:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
// Printing package PKG1&lt;br /&gt;
&lt;br /&gt;
package PKG1 ;&lt;br /&gt;
    typedef int my_int ;&lt;br /&gt;
endpackage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Printing package $unit_test_sv&lt;br /&gt;
&lt;br /&gt;
typedef byte my_byte ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Printing module test&lt;br /&gt;
&lt;br /&gt;
module test ;&lt;br /&gt;
    import PKG1:: * ;&lt;br /&gt;
    my_int int1 ;&lt;br /&gt;
    my_byte byte1 ;&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Python_pretty-printer_for_gdb&amp;diff=804</id>
		<title>Python pretty-printer for gdb</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Python_pretty-printer_for_gdb&amp;diff=804"/>
				<updated>2022-09-13T18:28:27Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If gdb (GNU debugger) was compiled with Python support, it is possible to run Python scripts from within gdb.  Below is an example of how to create a custom pretty-printer for Verific's VeriTreeNode using gdb's Python interface.&lt;br /&gt;
&lt;br /&gt;
The Python script itself looks like this&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    import gdb&lt;br /&gt;
    import re&lt;br /&gt;
 &lt;br /&gt;
    class VeriVhdlTreeNodePrinter:&lt;br /&gt;
        def __init__(self, val):&lt;br /&gt;
            self.val = val&lt;br /&gt;
 &lt;br /&gt;
        def to_string(self):&lt;br /&gt;
            eval_string = f&amp;quot;(({self.val.type.name}*){self.val.address})-&amp;gt;GetPrettyPrintedString()&amp;quot;&lt;br /&gt;
            return gdb.parse_and_eval(eval_string).string()&lt;br /&gt;
&lt;br /&gt;
    def verific_pp_func(val):&lt;br /&gt;
        lookup_tag = val.type.tag&lt;br /&gt;
        if lookup_tag is None:&lt;br /&gt;
            return None&lt;br /&gt;
   &lt;br /&gt;
        regex = re.compile(&amp;quot;^(Verific::)?(Veri|Vhdl)(\w)+$&amp;quot;)&lt;br /&gt;
        if regex.match(lookup_tag):&lt;br /&gt;
            return VeriVhdlTreeNodePrinter(val)&lt;br /&gt;
        return None&lt;br /&gt;
 &lt;br /&gt;
    gdb.pretty_printers.append(verific_pp_func)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
To automate sourcing of the Python script on gdb startup, add the following line to your ~/.gdbinit :&lt;br /&gt;
&lt;br /&gt;
    source ~/verific_pp.py&lt;br /&gt;
&lt;br /&gt;
The script calls Verific's GetPrettyPrintedString() API which essentially pretty prints the VeriTreeNode. It takes an object and not a pointer. Printing the pointer will still print the value of the pointer as per usual gdb behavior.&lt;br /&gt;
&lt;br /&gt;
Note that if a class has a name starting with Veri but is not derived from VeriTreeNode, gdb produces the following message :&lt;br /&gt;
&lt;br /&gt;
    (gdb) print *pointer_to_VeriLibrary_which_is_not_derived_from_VeriTreeNode&lt;br /&gt;
    $2 = Python Exception &amp;lt;class 'gdb.error'&amp;gt; Couldn't find method VeriLibrary::GetPrettyPrintedString:&lt;br /&gt;
    (gdb)&lt;br /&gt;
&lt;br /&gt;
The same will happen for VeriValue/VhdlValue/VeriBaseValue, etc, because these classes do not have the GetPrettyPrintedString() API. The pretty printer can be customized to exclude such classes, or modified to handle these other cases. This is just a regular regex rule.&lt;br /&gt;
&lt;br /&gt;
Here is the output from an example run :&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    gdb ./test-linux-g&lt;br /&gt;
    Reading symbols from test-linux-g...&lt;br /&gt;
    (gdb) break 62&lt;br /&gt;
    Breakpoint 1 at 0x306b50: file test.cpp, line 62.&lt;br /&gt;
    (gdb) run&lt;br /&gt;
    Starting program: test-linux-g&lt;br /&gt;
    [Thread debugging using libthread_db enabled]&lt;br /&gt;
    Using host libthread_db library &amp;quot;/lib/x86_64-linux-gnu/libthread_db.so.1&amp;quot;.&lt;br /&gt;
    -- Analyzing Verilog file 'test.v' (VERI-1482)&lt;br /&gt;
    test.v(1): INFO: compiling module 'top' (VERI-1018)&lt;br /&gt;
    -- module: top&lt;br /&gt;
    --     param: P1&lt;br /&gt;
    --         initial expression: 8&lt;br /&gt;
&lt;br /&gt;
    Breakpoint 1, main (argc=1, argv=0x7fffffffe0b8) at test.cpp:62&lt;br /&gt;
    62                    Message::PrintLine(&amp;quot;        initial value: &amp;quot;, Strings::itoa(int_val)) ;&lt;br /&gt;
    (gdb) p *module_item&lt;br /&gt;
    $1 = {&amp;lt;Verific::VeriTreeNode&amp;gt; = {&amp;lt;Verific::VeriNode&amp;gt; = {&lt;br /&gt;
          _vptr.VeriNode = 0x5555565bcd18 &amp;lt;vtable for Verific::VeriDataDecl+16&amp;gt;, static _present_scope = 0x0,&lt;br /&gt;
          static _container_scope_arr = 0x0, static _sva_clock_expr = 0x0, static _default_clock = 0x0,&lt;br /&gt;
          static _default_disable_iff_cond = 0x0, static _has_disable_iff = 0, static _id_ref = 0x0,&lt;br /&gt;
          static _name_list = 0x0, static _inside_clocked_sequence = 0, static _contains_event_control = 0,&lt;br /&gt;
          static _contains_delay_control = 0, static _contains_even_id_in_body = 0, static _multiple_inferred_clock = 0,&lt;br /&gt;
          static _in_property_expr = 0, static _in_checker = 0, static _in_fork_join_none_or_any = 0,&lt;br /&gt;
          static _in_bind_directive = 0, static _hier_name_to_allow_mod_name = 0, static _do_not_recurse_packed_dims = 0,&lt;br /&gt;
          static _processing_param = 0x0, static _processing_expr = 0x0, static _msgs = 0x55555666b870,&lt;br /&gt;
          static _relaxed_msgs = 0x0, static _udp_edge_chars = 0x0, static _verilog_keywords = 0x0,&lt;br /&gt;
          static _verilog_tokens = 0x0, static _system_tasks = 0x0, static _ref_count_map = 0x0,&lt;br /&gt;
          static _attribute_map = 0x0, static _map_of_comment_arr = 0x0, static _global_clocking = 0x0,&lt;br /&gt;
          static _var_usage_running = 0, static _is_static_elab = 0, static _is_rtl_elab = 0,&lt;br /&gt;
          static _func_pointer_stack = 0x0, static _func_stack = 0x0, static _mutual_recursion_count = 0,&lt;br /&gt;
          static _max_mutual_recursion_count = 0, static _within_seq_area = 0, static _within_generate_endgenerate = 0,&lt;br /&gt;
          static _under_default_clock = 0, static _default_disable_defined = 0, static _has_delay_or_event_control = 0,&lt;br /&gt;
          static _processing_operand = 0, static _potential_always_loop = 0, static _reresolve_idrefs = 0,&lt;br /&gt;
          static _ignore_ams_in_rtl_elab = 0, static _follow_lrm_for_constant_func = 0, static _evaluated_vals = 0x0,&lt;br /&gt;
          static _evaluated_constraints = 0x0, static _p_evaluated_vals = 0x0, static _p_evaluated_constraints = 0x0,&lt;br /&gt;
          static _unnamedscope_vs_decl_ids = 0x0, static _check_linefile_of_import = 1}, _linefile = 8589934594},&lt;br /&gt;
      _qualifiers = 0}&lt;br /&gt;
    (gdb) p *val&lt;br /&gt;
    $2 = {_vptr.VeriBaseValue = 0x55555654b280 &amp;lt;vtable for Verific::VeriInteger+16&amp;gt;}&lt;br /&gt;
    (gdb) source verific_pp.py&lt;br /&gt;
    (gdb) p *module_item&lt;br /&gt;
    $3 = parameter P1 = 8 ;&lt;br /&gt;
&lt;br /&gt;
    (gdb) p *val&lt;br /&gt;
    $4 = 8&lt;br /&gt;
    (gdb)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Notice how before activating the Python pretty-printer, gdb prints out a lot of information when calling  'p *module_item'  or  'p *val' .  With the pretty-printer, it now prints only the value from GetPrettyPrintedString().&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Python_pretty-printer_for_gdb&amp;diff=803</id>
		<title>Python pretty-printer for gdb</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Python_pretty-printer_for_gdb&amp;diff=803"/>
				<updated>2022-09-13T18:10:28Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If gdb (GNU debugger) was compiled with Python support, it is possible to run Python scripts from within gdb.  Below is an example of how to create a custom pretty-printer for Verific's VeriTreeNode using gdb's Python interface.&lt;br /&gt;
&lt;br /&gt;
The Python script itself looks like this&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    import gdb&lt;br /&gt;
    import re&lt;br /&gt;
 &lt;br /&gt;
    class VeriVhdlTreeNodePrinter:&lt;br /&gt;
        def __init__(self, val):&lt;br /&gt;
            self.val = val&lt;br /&gt;
 &lt;br /&gt;
        def to_string(self):&lt;br /&gt;
            eval_string = f&amp;quot;(({self.val.type.name}*){self.val.address})-&amp;gt;GetPrettyPrintedString()&amp;quot;&lt;br /&gt;
            return gdb.parse_and_eval(eval_string).string()&lt;br /&gt;
&lt;br /&gt;
    def verific_pp_func(val):&lt;br /&gt;
        lookup_tag = val.type.tag&lt;br /&gt;
        if lookup_tag is None:&lt;br /&gt;
            return None&lt;br /&gt;
   &lt;br /&gt;
        regex = re.compile(&amp;quot;^(Verific::)?(Veri|Vhdl)(\w)+$&amp;quot;)&lt;br /&gt;
        if regex.match(lookup_tag):&lt;br /&gt;
            return VeriVhdlTreeNodePrinter(val)&lt;br /&gt;
        return None&lt;br /&gt;
 &lt;br /&gt;
    gdb.pretty_printers.append(verific_pp_func)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
To automate sourcing of the Python script on gdb startup, add the following line to your ~/.gdbinit :&lt;br /&gt;
&lt;br /&gt;
    source ~/verific_pp.py&lt;br /&gt;
&lt;br /&gt;
The script calls Verific's GetPrettyPrintedString() API which essentially pretty prints the VeriTreeNode. It takes an object and not a pointer. Printing the pointer will still print the value of the pointer as per usual gdb behavior.&lt;br /&gt;
&lt;br /&gt;
Note that if a class has a name starting with Veri but is not derived from VeriTreeNode, gdb produces the following message :&lt;br /&gt;
&lt;br /&gt;
    (gdb) print *pointer_to_VeriLibrary_which_is_not_derived_from_VeriTreeNode&lt;br /&gt;
    $2 = Python Exception &amp;lt;class 'gdb.error'&amp;gt; Couldn't find method VeriLibrary::GetPrettyPrintedString:&lt;br /&gt;
    (gdb)&lt;br /&gt;
&lt;br /&gt;
The same will happen for VeriValue/VhdlValue/VeriBaseValue, etc, because these classes do not have the GetPrettyPrintedString() API. The pretty printer can be customized to exclude such classes, or modified to handle these other cases. This is just a regular regex rule.&lt;br /&gt;
&lt;br /&gt;
Here is the output from an example run :&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    gdb ./test-linux-g&lt;br /&gt;
    Reading symbols from test-linux-g...&lt;br /&gt;
    (gdb) break 62&lt;br /&gt;
    Breakpoint 1 at 0x306b50: file test.cpp, line 62.&lt;br /&gt;
    (gdb) run&lt;br /&gt;
    Starting program: test-linux-g&lt;br /&gt;
    [Thread debugging using libthread_db enabled]&lt;br /&gt;
    Using host libthread_db library &amp;quot;/lib/x86_64-linux-gnu/libthread_db.so.1&amp;quot;.&lt;br /&gt;
    -- Analyzing Verilog file 'test.v' (VERI-1482)&lt;br /&gt;
    test.v(1): INFO: compiling module 'top' (VERI-1018)&lt;br /&gt;
    -- module: top&lt;br /&gt;
    --     param: P1&lt;br /&gt;
    --         initial expression: 8&lt;br /&gt;
&lt;br /&gt;
    Breakpoint 1, main (argc=1, argv=0x7fffffffe0b8) at test.cpp:62&lt;br /&gt;
    62                    Message::PrintLine(&amp;quot;        initial value: &amp;quot;, Strings::itoa(int_val)) ;&lt;br /&gt;
    (gdb) '''p *module_item'''&lt;br /&gt;
    $1 = {&amp;lt;Verific::VeriTreeNode&amp;gt; = {&amp;lt;Verific::VeriNode&amp;gt; = {&lt;br /&gt;
          _vptr.VeriNode = 0x5555565bcd18 &amp;lt;vtable for Verific::VeriDataDecl+16&amp;gt;, static _present_scope = 0x0,&lt;br /&gt;
          static _container_scope_arr = 0x0, static _sva_clock_expr = 0x0, static _default_clock = 0x0,&lt;br /&gt;
          static _default_disable_iff_cond = 0x0, static _has_disable_iff = 0, static _id_ref = 0x0,&lt;br /&gt;
          static _name_list = 0x0, static _inside_clocked_sequence = 0, static _contains_event_control = 0,&lt;br /&gt;
          static _contains_delay_control = 0, static _contains_even_id_in_body = 0, static _multiple_inferred_clock = 0,&lt;br /&gt;
          static _in_property_expr = 0, static _in_checker = 0, static _in_fork_join_none_or_any = 0,&lt;br /&gt;
          static _in_bind_directive = 0, static _hier_name_to_allow_mod_name = 0, static _do_not_recurse_packed_dims = 0,&lt;br /&gt;
          static _processing_param = 0x0, static _processing_expr = 0x0, static _msgs = 0x55555666b870,&lt;br /&gt;
          static _relaxed_msgs = 0x0, static _udp_edge_chars = 0x0, static _verilog_keywords = 0x0,&lt;br /&gt;
          static _verilog_tokens = 0x0, static _system_tasks = 0x0, static _ref_count_map = 0x0,&lt;br /&gt;
          static _attribute_map = 0x0, static _map_of_comment_arr = 0x0, static _global_clocking = 0x0,&lt;br /&gt;
          static _var_usage_running = 0, static _is_static_elab = 0, static _is_rtl_elab = 0,&lt;br /&gt;
          static _func_pointer_stack = 0x0, static _func_stack = 0x0, static _mutual_recursion_count = 0,&lt;br /&gt;
          static _max_mutual_recursion_count = 0, static _within_seq_area = 0, static _within_generate_endgenerate = 0,&lt;br /&gt;
          static _under_default_clock = 0, static _default_disable_defined = 0, static _has_delay_or_event_control = 0,&lt;br /&gt;
          static _processing_operand = 0, static _potential_always_loop = 0, static _reresolve_idrefs = 0,&lt;br /&gt;
          static _ignore_ams_in_rtl_elab = 0, static _follow_lrm_for_constant_func = 0, static _evaluated_vals = 0x0,&lt;br /&gt;
          static _evaluated_constraints = 0x0, static _p_evaluated_vals = 0x0, static _p_evaluated_constraints = 0x0,&lt;br /&gt;
          static _unnamedscope_vs_decl_ids = 0x0, static _check_linefile_of_import = 1}, _linefile = 8589934594},&lt;br /&gt;
      _qualifiers = 0}&lt;br /&gt;
    (gdb) '''p *val'''&lt;br /&gt;
    $2 = {_vptr.VeriBaseValue = 0x55555654b280 &amp;lt;vtable for Verific::VeriInteger+16&amp;gt;}&lt;br /&gt;
    (gdb) '''source verific_pp.py'''&lt;br /&gt;
    (gdb) '''p *module_item'''&lt;br /&gt;
    $3 = parameter P1 = 8 ;&lt;br /&gt;
&lt;br /&gt;
    (gdb) '''p *val'''&lt;br /&gt;
    $4 = 8&lt;br /&gt;
    (gdb)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Notice how before activating the Python pretty-printer, gdb prints out a lot of information when calling  'p *module_item'  or  'p *val' .  With the pretty-printer, it now prints only the value from GetPrettyPrintedString().&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Python_pretty-printer_for_gdb&amp;diff=802</id>
		<title>Python pretty-printer for gdb</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Python_pretty-printer_for_gdb&amp;diff=802"/>
				<updated>2022-09-13T18:06:21Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Created page with &amp;quot;If gdb (GNU debugger) was compiled with Python support, it is possible to run Python scripts within gdb.  Below is an example of how to create a custom pretty-printer for Veri...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If gdb (GNU debugger) was compiled with Python support, it is possible to run Python scripts within gdb.  Below is an example of how to create a custom pretty-printer for Verific's parse tree nodes.&lt;br /&gt;
&lt;br /&gt;
The Python script itself looks like this&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    import gdb&lt;br /&gt;
    import re&lt;br /&gt;
 &lt;br /&gt;
    class VeriVhdlTreeNodePrinter:&lt;br /&gt;
        def __init__(self, val):&lt;br /&gt;
            self.val = val&lt;br /&gt;
 &lt;br /&gt;
        def to_string(self):&lt;br /&gt;
            eval_string = f&amp;quot;(({self.val.type.name}*){self.val.address})-&amp;gt;GetPrettyPrintedString()&amp;quot;&lt;br /&gt;
            return gdb.parse_and_eval(eval_string).string()&lt;br /&gt;
&lt;br /&gt;
    def verific_pp_func(val):&lt;br /&gt;
        lookup_tag = val.type.tag&lt;br /&gt;
        if lookup_tag is None:&lt;br /&gt;
            return None&lt;br /&gt;
   &lt;br /&gt;
        regex = re.compile(&amp;quot;^(Verific::)?(Veri|Vhdl)(\w)+$&amp;quot;)&lt;br /&gt;
        if regex.match(lookup_tag):&lt;br /&gt;
            return VeriVhdlTreeNodePrinter(val)&lt;br /&gt;
        return None&lt;br /&gt;
 &lt;br /&gt;
    gdb.pretty_printers.append(verific_pp_func)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
To automate sourcing of the Python script on gdb startup, add the following line to your ~/.gdbinit :&lt;br /&gt;
&lt;br /&gt;
    source ~/verific_pp.py&lt;br /&gt;
&lt;br /&gt;
The script calls Verific's GetPrettyPrintedString() API which essentially pretty prints the VeriTreeNode. It takes an object and not a pointer. Printing the pointer will still print the value of the pointer as per usual gdb behavior.&lt;br /&gt;
&lt;br /&gt;
Note that if a class has a name starting with Veri but is not derived from VeriTreeNode, gdb produces the following message :&lt;br /&gt;
&lt;br /&gt;
    (gdb) print *pointer_to_VeriLibrary_which_is_not_derived_from_VeriTreeNode&lt;br /&gt;
    $2 = Python Exception &amp;lt;class 'gdb.error'&amp;gt; Couldn't find method VeriLibrary::GetPrettyPrintedString:&lt;br /&gt;
    (gdb)&lt;br /&gt;
&lt;br /&gt;
The same will happen for VeriValue/VhdlValue/VeriBaseValue, etc, because these classes do not have the GetPrettyPrintedString() API. The pretty printer can be customized to exclude such classes, or modified to handle these other cases. This is just a regular regex rule.&lt;br /&gt;
&lt;br /&gt;
Here is the output from an example run :&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
    gdb ./test-linux-g&lt;br /&gt;
    Reading symbols from test-linux-g...&lt;br /&gt;
    (gdb) break 62&lt;br /&gt;
    Breakpoint 1 at 0x306b50: file test.cpp, line 62.&lt;br /&gt;
    (gdb) run&lt;br /&gt;
    Starting program: test-linux-g&lt;br /&gt;
    [Thread debugging using libthread_db enabled]&lt;br /&gt;
    Using host libthread_db library &amp;quot;/lib/x86_64-linux-gnu/libthread_db.so.1&amp;quot;.&lt;br /&gt;
    -- Analyzing Verilog file 'test.v' (VERI-1482)&lt;br /&gt;
    test.v(1): INFO: compiling module 'top' (VERI-1018)&lt;br /&gt;
    -- module: top&lt;br /&gt;
    --     param: P1&lt;br /&gt;
    --         initial expression: 8&lt;br /&gt;
&lt;br /&gt;
    Breakpoint 1, main (argc=1, argv=0x7fffffffe0b8) at test.cpp:62&lt;br /&gt;
    62                    Message::PrintLine(&amp;quot;        initial value: &amp;quot;, Strings::itoa(int_val)) ;&lt;br /&gt;
    (gdb) '''p *module_item'''&lt;br /&gt;
    $1 = {&amp;lt;Verific::VeriTreeNode&amp;gt; = {&amp;lt;Verific::VeriNode&amp;gt; = {&lt;br /&gt;
          _vptr.VeriNode = 0x5555565bcd18 &amp;lt;vtable for Verific::VeriDataDecl+16&amp;gt;, static _present_scope = 0x0,&lt;br /&gt;
          static _container_scope_arr = 0x0, static _sva_clock_expr = 0x0, static _default_clock = 0x0,&lt;br /&gt;
          static _default_disable_iff_cond = 0x0, static _has_disable_iff = 0, static _id_ref = 0x0,&lt;br /&gt;
          static _name_list = 0x0, static _inside_clocked_sequence = 0, static _contains_event_control = 0,&lt;br /&gt;
          static _contains_delay_control = 0, static _contains_even_id_in_body = 0, static _multiple_inferred_clock = 0,&lt;br /&gt;
          static _in_property_expr = 0, static _in_checker = 0, static _in_fork_join_none_or_any = 0,&lt;br /&gt;
          static _in_bind_directive = 0, static _hier_name_to_allow_mod_name = 0, static _do_not_recurse_packed_dims = 0,&lt;br /&gt;
          static _processing_param = 0x0, static _processing_expr = 0x0, static _msgs = 0x55555666b870,&lt;br /&gt;
          static _relaxed_msgs = 0x0, static _udp_edge_chars = 0x0, static _verilog_keywords = 0x0,&lt;br /&gt;
          static _verilog_tokens = 0x0, static _system_tasks = 0x0, static _ref_count_map = 0x0,&lt;br /&gt;
          static _attribute_map = 0x0, static _map_of_comment_arr = 0x0, static _global_clocking = 0x0,&lt;br /&gt;
          static _var_usage_running = 0, static _is_static_elab = 0, static _is_rtl_elab = 0,&lt;br /&gt;
          static _func_pointer_stack = 0x0, static _func_stack = 0x0, static _mutual_recursion_count = 0,&lt;br /&gt;
          static _max_mutual_recursion_count = 0, static _within_seq_area = 0, static _within_generate_endgenerate = 0,&lt;br /&gt;
          static _under_default_clock = 0, static _default_disable_defined = 0, static _has_delay_or_event_control = 0,&lt;br /&gt;
          static _processing_operand = 0, static _potential_always_loop = 0, static _reresolve_idrefs = 0,&lt;br /&gt;
          static _ignore_ams_in_rtl_elab = 0, static _follow_lrm_for_constant_func = 0, static _evaluated_vals = 0x0,&lt;br /&gt;
          static _evaluated_constraints = 0x0, static _p_evaluated_vals = 0x0, static _p_evaluated_constraints = 0x0,&lt;br /&gt;
          static _unnamedscope_vs_decl_ids = 0x0, static _check_linefile_of_import = 1}, _linefile = 8589934594},&lt;br /&gt;
      _qualifiers = 0}&lt;br /&gt;
    (gdb) '''p *val'''&lt;br /&gt;
    $2 = {_vptr.VeriBaseValue = 0x55555654b280 &amp;lt;vtable for Verific::VeriInteger+16&amp;gt;}&lt;br /&gt;
    (gdb) '''source verific_pp.py'''&lt;br /&gt;
    (gdb) '''p *module_item'''&lt;br /&gt;
    $3 = parameter P1 = 8 ;&lt;br /&gt;
&lt;br /&gt;
    (gdb) '''p *val'''&lt;br /&gt;
    $4 = 8&lt;br /&gt;
    (gdb)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Notice how before activating the Python pretty-printer, gdb prints out a lot of information when calling  'p *module_item'  or  'p *val' .  With the pretty-printer, it now prints only the value from GetPrettyPrintedString().&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=801</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=801"/>
				<updated>2022-09-13T17:46:17Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
* [[Python pretty-printer for gdb | Python pretty-printer for gdb]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Why are the ports in original Verilog file renamed to p1, p2, ....?]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Simple examples of VHDL visitor pattern | VHDL/C++: Simple examples of VHDL visitor pattern]]&lt;br /&gt;
* [[Traverse instances in parsetree | VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=How_to_get_packed_dimensions_of_enum&amp;diff=785</id>
		<title>How to get packed dimensions of enum</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_get_packed_dimensions_of_enum&amp;diff=785"/>
				<updated>2022-05-12T00:46:26Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;quot;Array.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Set.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Message.h&amp;quot;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriScope.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriId.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriExpression.h&amp;quot;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
void GetBaseTypeFromDataType(VeriDataType *);&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
    veri_file::SetInterfaceModportFieldSeparator(&amp;quot;::&amp;quot;) ;&lt;br /&gt;
&lt;br /&gt;
    Array file_names;&lt;br /&gt;
&lt;br /&gt;
    if (argc &amp;lt; 2) {&lt;br /&gt;
        file_names.InsertLast(&amp;quot;test.v&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
        for (int i = 1; i &amp;lt; argc; i++) {&lt;br /&gt;
            file_names.InsertLast(argv[i]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    Array * file_names_ = new Array( file_names);&lt;br /&gt;
&lt;br /&gt;
    if (!veri_file::AnalyzeMultipleFiles(file_names_, veri_file::SYSTEM_VERILOG, &amp;quot;work&amp;quot;, veri_file::MFCU)) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot; Unable to analyze multiple files. Aborting\n&amp;quot;;&lt;br /&gt;
        return 1 ;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Fetching the top module&lt;br /&gt;
    Array *top_module_array = veri_file::GetTopModules() ;&lt;br /&gt;
&lt;br /&gt;
    if (!top_module_array) {&lt;br /&gt;
        Message::Error(0, &amp;quot;Cannot find any top module in the design&amp;quot;) ;&lt;br /&gt;
        return 4;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    VeriModule *module = (VeriModule *) top_module_array-&amp;gt;GetFirst();&lt;br /&gt;
&lt;br /&gt;
    // Creating VPT&lt;br /&gt;
    module-&amp;gt;StaticElaborate( 0);&lt;br /&gt;
    module-&amp;gt;Elaborate( 0, 0, false);&lt;br /&gt;
&lt;br /&gt;
    VeriScope* p_scope = module-&amp;gt;GetScope();&lt;br /&gt;
    Map* scope_map = p_scope-&amp;gt;GetThisScope();&lt;br /&gt;
    MapIter mi ;&lt;br /&gt;
    VeriIdDef *id;&lt;br /&gt;
&lt;br /&gt;
    FOREACH_MAP_ITEM(scope_map, mi, 0, &amp;amp;id) {&lt;br /&gt;
        if (!id ) continue;&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Handling Declaration: &amp;quot;&amp;lt;&amp;lt; id-&amp;gt;Name() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        GetBaseTypeFromDataType(id-&amp;gt;GetDataType());&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void GetBaseTypeFromDataType(VeriDataType *p_data_type)&lt;br /&gt;
{&lt;br /&gt;
    if(!p_data_type) {&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    unsigned packed_dim = p_data_type-&amp;gt;PackedDimension();&lt;br /&gt;
    switch( p_data_type-&amp;gt;GetClassId() ) {&lt;br /&gt;
        case ID_VERIDATATYPE: {&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERIDATATYPE:: p_data_type-&amp;gt;Image() = &amp;quot; &amp;lt;&amp;lt; p_data_type-&amp;gt;Image() &amp;lt;&amp;lt; &amp;quot; =====&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERIDATATYPE:: packed_dim = &amp;quot; &amp;lt;&amp;lt; packed_dim &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            if ( packed_dim != 0 ) {&lt;br /&gt;
                VeriRange const* range = dynamic_cast&amp;lt;VeriRange const*&amp;gt;&lt;br /&gt;
                    (p_data_type-&amp;gt;GetDimensions());&lt;br /&gt;
                VeriRange const* last_dim_range = NULL;&lt;br /&gt;
                do {&lt;br /&gt;
                    last_dim_range = range;&lt;br /&gt;
                } while ( range &amp;amp;&amp;amp; (range = range-&amp;gt;GetNext()) );&lt;br /&gt;
                    if ( last_dim_range &amp;amp;&amp;amp;  last_dim_range-&amp;gt;GetLeft() &amp;amp;&amp;amp; last_dim_range-&amp;gt;GetRight() ) {&lt;br /&gt;
                        std::cout &amp;lt;&amp;lt; &amp;quot;packed_dim-&amp;gt;Left = &amp;quot; &amp;lt;&amp;lt; last_dim_range-&amp;gt;GetLeft()-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
                        std::cout &amp;lt;&amp;lt; &amp;quot;packed_dim-&amp;gt;Right = &amp;quot; &amp;lt;&amp;lt; last_dim_range-&amp;gt;GetRight()-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                break;&lt;br /&gt;
            }&lt;br /&gt;
        case ID_VERINETDATATYPE:&lt;br /&gt;
            break;&lt;br /&gt;
        case ID_VERISTRUCTUNION: {&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERISTRUCTUNION:: p_data_type-&amp;gt;Image() = &amp;quot; &amp;lt;&amp;lt; p_data_type-&amp;gt;Image() &amp;lt;&amp;lt; &amp;quot; =====&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            unsigned i;&lt;br /&gt;
            Array *decls = p_data_type-&amp;gt;GetDecls() ;&lt;br /&gt;
            VeriDataDecl *decl;&lt;br /&gt;
            FOREACH_ARRAY_ITEM (decls, i, decl) {&lt;br /&gt;
                //std::cout &amp;lt;&amp;lt; &amp;quot;===== ===== decl &amp;quot; &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &amp;quot;: &amp;quot; &amp;lt;&amp;lt; decl-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
                VeriDataType *datatype = decl-&amp;gt;GetDataType();&lt;br /&gt;
                (void) GetBaseTypeFromDataType(datatype);&lt;br /&gt;
            }&lt;br /&gt;
            break;&lt;br /&gt;
            }&lt;br /&gt;
        case ID_VERIENUM : {&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERIENUM:: p_data_type-&amp;gt;Image() = &amp;quot; &amp;lt;&amp;lt; p_data_type-&amp;gt;Image() &amp;lt;&amp;lt; &amp;quot; =====&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERIENUM:: packed_dim = &amp;quot; &amp;lt;&amp;lt; packed_dim &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            if ( packed_dim != 0 ) {&lt;br /&gt;
                VeriRange const* range = dynamic_cast&amp;lt;VeriRange const*&amp;gt;&lt;br /&gt;
                    (p_data_type-&amp;gt;GetDimensions());&lt;br /&gt;
                VeriRange const* last_dim_range = NULL;&lt;br /&gt;
                do {&lt;br /&gt;
                    last_dim_range = range;&lt;br /&gt;
                } while ( range &amp;amp;&amp;amp; (range = range-&amp;gt;GetNext()) );&lt;br /&gt;
&lt;br /&gt;
                if ( last_dim_range &amp;amp;&amp;amp;  last_dim_range-&amp;gt;GetLeft() &amp;amp;&amp;amp; last_dim_range-&amp;gt;GetRight() ) {&lt;br /&gt;
                    std::cout &amp;lt;&amp;lt; &amp;quot;packed_dim-&amp;gt;Left = &amp;quot; &amp;lt;&amp;lt; last_dim_range-&amp;gt;GetLeft()-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
                    std::cout &amp;lt;&amp;lt; &amp;quot;packed_dim-&amp;gt;Right = &amp;quot; &amp;lt;&amp;lt; last_dim_range-&amp;gt;GetRight()-&amp;gt;GetPrettyPrintedString() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            VeriEnum* p_enum = dynamic_cast&amp;lt;VeriEnum*&amp;gt;(p_data_type);&lt;br /&gt;
            VeriDataType* p_base_type = p_enum-&amp;gt;GetBaseType();&lt;br /&gt;
            GetBaseTypeFromDataType (p_base_type);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case ID_VERITYPEREF: {&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERITYPEREF:: p_data_type-&amp;gt;Image() = &amp;quot; &amp;lt;&amp;lt; p_data_type-&amp;gt;Image() &amp;lt;&amp;lt; &amp;quot; =====&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            std::cout &amp;lt;&amp;lt; &amp;quot;===== ID_VERITYPEREF:: packed_dim = &amp;quot; &amp;lt;&amp;lt; packed_dim &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
            GetBaseTypeFromDataType(p_data_type-&amp;gt;GetBaseDataType());&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
            break;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Input Verilog:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
typedef enum bit {a, b} [1:0] data_ctrl_t;&lt;br /&gt;
&lt;br /&gt;
module test (output data_ctrl_t out1 );&lt;br /&gt;
  struct packed {&lt;br /&gt;
    logic [7:0] high;&lt;br /&gt;
    logic [3:0] low;&lt;br /&gt;
  } word1;&lt;br /&gt;
  assign out1 = b ;&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- Analyzing Verilog file 'test.v' (VERI-1482)&lt;br /&gt;
test.v(3): INFO: compiling module 'test' (VERI-1018)&lt;br /&gt;
test.v(3): INFO: compiling module 'test' (VERI-1018)&lt;br /&gt;
Handling Declaration: out1&lt;br /&gt;
===== ID_VERITYPEREF:: p_data_type-&amp;gt;Image() = data_ctrl_t =====&lt;br /&gt;
===== ID_VERITYPEREF:: packed_dim = 1&lt;br /&gt;
===== ID_VERIENUM:: p_data_type-&amp;gt;Image() = enum(a,b) =====&lt;br /&gt;
===== ID_VERIENUM:: packed_dim = 1&lt;br /&gt;
packed_dim-&amp;gt;Left = 1&lt;br /&gt;
packed_dim-&amp;gt;Right = 0&lt;br /&gt;
===== ID_VERIDATATYPE:: p_data_type-&amp;gt;Image() = bit =====&lt;br /&gt;
===== ID_VERIDATATYPE:: packed_dim = 0&lt;br /&gt;
Handling Declaration: word1&lt;br /&gt;
===== ID_VERISTRUCTUNION:: p_data_type-&amp;gt;Image() = struct(high,low) =====&lt;br /&gt;
===== ID_VERIDATATYPE:: p_data_type-&amp;gt;Image() = logic [7:0] =====&lt;br /&gt;
===== ID_VERIDATATYPE:: packed_dim = 1&lt;br /&gt;
packed_dim-&amp;gt;Left = 7&lt;br /&gt;
packed_dim-&amp;gt;Right = 0&lt;br /&gt;
===== ID_VERIDATATYPE:: p_data_type-&amp;gt;Image() = logic [3:0] =====&lt;br /&gt;
===== ID_VERIDATATYPE:: packed_dim = 1&lt;br /&gt;
packed_dim-&amp;gt;Left = 3&lt;br /&gt;
packed_dim-&amp;gt;Right = 0&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=783</id>
		<title>Parse select modules only and ignore the rest</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=783"/>
				<updated>2022-05-02T18:44:53Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is no API to parse only a subset of modules of a design that contains many modules. &lt;br /&gt;
However, this can be accomplished through Verific's processing of v-files. &lt;br /&gt;
&lt;br /&gt;
Below is an outline of the steps involved:&lt;br /&gt;
&lt;br /&gt;
- Register all the input source files as v-files for processing.&amp;lt;br&amp;gt;&lt;br /&gt;
- Move all of the modules to the 'work' library.&amp;lt;br&amp;gt;&lt;br /&gt;
- Analyze a 'dummy' file that contains only the modules of interest.&amp;lt;br&amp;gt;&lt;br /&gt;
- Process the v-files.&amp;lt;br&amp;gt;&lt;br /&gt;
- Delete the 'dummy' module itself&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriLibrary.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    // Add the 'real' input file(s) to be analyzed as -v file:&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testa.v&amp;quot;) ;&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testb.v&amp;quot;) ;&lt;br /&gt;
    // Move -v modules into 'work'&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_move_yv_modules_into_work_library&amp;quot;, 1) ;&lt;br /&gt;
&lt;br /&gt;
    // Analyze dummy file&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;dummy.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
    // Need this to process -v file&lt;br /&gt;
    veri_file::ProcessUserLibraries() ;&lt;br /&gt;
&lt;br /&gt;
    VeriModule *dummy = veri_file::GetModule (&amp;quot;dummy&amp;quot;) ;&lt;br /&gt;
    delete dummy ; // no longer needed&lt;br /&gt;
&lt;br /&gt;
    MapIter mi;&lt;br /&gt;
    VeriModule *module;&lt;br /&gt;
    FOREACH_VERILOG_MODULE (mi, module) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;*** Module '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;' in library '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;GetLibrary()-&amp;gt;GetName() &amp;lt;&amp;lt; &amp;quot;'&amp;quot; &amp;lt;&amp;lt; s&lt;br /&gt;
td::endl ;&lt;br /&gt;
    }&lt;br /&gt;
    veri_file::PrettyPrint(&amp;quot;pp_out.v&amp;quot;, 0) ;&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testa.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test1 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod1 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod2 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testb.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod3 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test4 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod4 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test5 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod5 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file dummy.v -- this contains the modules we want to parse:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module dummy ();&lt;br /&gt;
  test2 i2 ();&lt;br /&gt;
  test3 i3 ();&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result of running the application:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- Analyzing Verilog file 'dummy.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test2' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test3' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
*** Module 'test2' in library 'work'&lt;br /&gt;
*** Module 'test3' in library 'work'&lt;br /&gt;
-- Printing all libraries to file 'pp_out.v' (VERI-1492)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output file pp_out.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod2 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod3 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=782</id>
		<title>Parse select modules only and ignore the rest</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=782"/>
				<updated>2022-05-02T18:44:19Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is no API to parse only a subset of modules of a design that contains many modules. &lt;br /&gt;
However, this can be accomplished through Verific's processing of v-files. &lt;br /&gt;
&lt;br /&gt;
Below is an outline of the steps involved:&lt;br /&gt;
&lt;br /&gt;
- Register all the input source files as v-files for processing.&amp;lt;br&amp;gt;&lt;br /&gt;
- Move all of the modules to the 'work' library.&amp;lt;br&amp;gt;&lt;br /&gt;
- Analyze a 'dummy' file that contains only the modules of interest.&amp;lt;br&amp;gt;&lt;br /&gt;
- Process the v-files&lt;br /&gt;
- Delete the 'dummy' module itself&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriLibrary.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    // Add the 'real' input file(s) to be analyzed as -v file:&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testa.v&amp;quot;) ;&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testb.v&amp;quot;) ;&lt;br /&gt;
    // Move -v modules into 'work'&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_move_yv_modules_into_work_library&amp;quot;, 1) ;&lt;br /&gt;
&lt;br /&gt;
    // Analyze dummy file&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;dummy.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
    // Need this to process -v file&lt;br /&gt;
    veri_file::ProcessUserLibraries() ;&lt;br /&gt;
&lt;br /&gt;
    VeriModule *dummy = veri_file::GetModule (&amp;quot;dummy&amp;quot;) ;&lt;br /&gt;
    delete dummy ; // no longer needed&lt;br /&gt;
&lt;br /&gt;
    MapIter mi;&lt;br /&gt;
    VeriModule *module;&lt;br /&gt;
    FOREACH_VERILOG_MODULE (mi, module) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;*** Module '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;' in library '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;GetLibrary()-&amp;gt;GetName() &amp;lt;&amp;lt; &amp;quot;'&amp;quot; &amp;lt;&amp;lt; s&lt;br /&gt;
td::endl ;&lt;br /&gt;
    }&lt;br /&gt;
    veri_file::PrettyPrint(&amp;quot;pp_out.v&amp;quot;, 0) ;&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testa.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test1 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod1 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod2 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testb.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod3 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test4 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod4 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test5 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod5 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file dummy.v -- this contains the modules we want to parse:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module dummy ();&lt;br /&gt;
  test2 i2 ();&lt;br /&gt;
  test3 i3 ();&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result of running the application:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- Analyzing Verilog file 'dummy.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test2' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test3' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
*** Module 'test2' in library 'work'&lt;br /&gt;
*** Module 'test3' in library 'work'&lt;br /&gt;
-- Printing all libraries to file 'pp_out.v' (VERI-1492)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output file pp_out.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod2 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod3 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=781</id>
		<title>Parse select modules only and ignore the rest</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=781"/>
				<updated>2022-05-02T18:39:45Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is no API to parse only a subset of modules of a design that contains many modules. &lt;br /&gt;
However, this can be accomplished through Verific's processing of v-files. &lt;br /&gt;
&lt;br /&gt;
Below is an outline of the steps involved:&lt;br /&gt;
&lt;br /&gt;
- Register all the input source files as v-files for processing.&amp;lt;br&amp;gt;&lt;br /&gt;
- Move all of the modules to the 'work' library.&amp;lt;br&amp;gt;&lt;br /&gt;
- Analyze a 'dummy' file that contains only the modules of interest.&amp;lt;br&amp;gt;&lt;br /&gt;
- Process the v-files&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriLibrary.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    // Add the 'real' input file(s) to be analyzed as -v file:&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testa.v&amp;quot;) ;&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testb.v&amp;quot;) ;&lt;br /&gt;
    // Move -v modules into 'work'&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_move_yv_modules_into_work_library&amp;quot;, 1) ;&lt;br /&gt;
&lt;br /&gt;
    // Analyze dummy file&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;dummy.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
    // Need this to process -v file&lt;br /&gt;
    veri_file::ProcessUserLibraries() ;&lt;br /&gt;
&lt;br /&gt;
    VeriModule *dummy = veri_file::GetModule (&amp;quot;dummy&amp;quot;) ;&lt;br /&gt;
    delete dummy ; // no longer needed&lt;br /&gt;
&lt;br /&gt;
    MapIter mi;&lt;br /&gt;
    VeriModule *module;&lt;br /&gt;
    FOREACH_VERILOG_MODULE (mi, module) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;*** Module '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;' in library '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;GetLibrary()-&amp;gt;GetName() &amp;lt;&amp;lt; &amp;quot;'&amp;quot; &amp;lt;&amp;lt; s&lt;br /&gt;
td::endl ;&lt;br /&gt;
    }&lt;br /&gt;
    veri_file::PrettyPrint(&amp;quot;pp_out.v&amp;quot;, 0) ;&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testa.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test1 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod1 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod2 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testb.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod3 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test4 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod4 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test5 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod5 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file dummy.v -- this contains the modules we want to parse:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module dummy ();&lt;br /&gt;
  test2 i2 ();&lt;br /&gt;
  test3 i3 ();&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result of running the application:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- Analyzing Verilog file 'dummy.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test2' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test3' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
*** Module 'test2' in library 'work'&lt;br /&gt;
*** Module 'test3' in library 'work'&lt;br /&gt;
-- Printing all libraries to file 'pp_out.v' (VERI-1492)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output file pp_out.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod2 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod3 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=780</id>
		<title>Parse select modules only and ignore the rest</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Parse_select_modules_only_and_ignore_the_rest&amp;diff=780"/>
				<updated>2022-05-02T18:33:33Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Created page with &amp;quot;There is no API to parse only a subset of modules of a design that contains many modules.  However, this can be accomplished through Verific's processing of v-files.   Below i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is no API to parse only a subset of modules of a design that contains many modules. &lt;br /&gt;
However, this can be accomplished through Verific's processing of v-files. &lt;br /&gt;
&lt;br /&gt;
Below is an outline of the steps involved:&lt;br /&gt;
&lt;br /&gt;
- Register all the input source files as v-files for processing.&amp;lt;br&amp;gt;&lt;br /&gt;
- Move all of the modules to the 'work' library.&amp;lt;br&amp;gt;&lt;br /&gt;
- Analyze a 'dummy' file that contains only the modules of interest.&amp;lt;br&amp;gt;&lt;br /&gt;
- Process the v-files&lt;br /&gt;
&lt;br /&gt;
C++:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;quot;veri_file.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriModule.h&amp;quot;&lt;br /&gt;
#include &amp;quot;VeriLibrary.h&amp;quot;&lt;br /&gt;
#include &amp;quot;Map.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifdef VERIFIC_NAMESPACE&lt;br /&gt;
using namespace Verific ;&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    // Add the 'real' input file(s) to be analyzed as -v file:&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testa.v&amp;quot;) ;&lt;br /&gt;
    veri_file::AddVFile(&amp;quot;testb.v&amp;quot;) ;&lt;br /&gt;
    // Move -v modules into 'work'&lt;br /&gt;
    RuntimeFlags::SetVar(&amp;quot;veri_move_yv_modules_into_work_library&amp;quot;, 1) ;&lt;br /&gt;
&lt;br /&gt;
    // Analyze dummy file&lt;br /&gt;
    if (!veri_file::Analyze(&amp;quot;dummy.v&amp;quot;, veri_file::SYSTEM_VERILOG)) return 1 ;&lt;br /&gt;
    // Need this to process -v file&lt;br /&gt;
    veri_file::ProcessUserLibraries() ;&lt;br /&gt;
&lt;br /&gt;
    VeriModule *dummy = veri_file::GetModule (&amp;quot;dummy&amp;quot;) ;&lt;br /&gt;
    delete dummy ; // no longer needed&lt;br /&gt;
&lt;br /&gt;
    MapIter mi;&lt;br /&gt;
    VeriModule *module;&lt;br /&gt;
    FOREACH_VERILOG_MODULE (mi, module) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;*** Module '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;Name() &amp;lt;&amp;lt; &amp;quot;' in library '&amp;quot; &amp;lt;&amp;lt; module-&amp;gt;GetLibrary()-&amp;gt;GetName() &amp;lt;&amp;lt; &amp;quot;'&amp;quot; &amp;lt;&amp;lt; s&lt;br /&gt;
td::endl ;&lt;br /&gt;
    }&lt;br /&gt;
    veri_file::PrettyPrint(&amp;quot;pp_out.v&amp;quot;, 0) ;&lt;br /&gt;
    return 0 ;&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testa.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test1 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod1 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod2 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source file testb.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod3 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test4 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod4 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
module test5 ;&lt;br /&gt;
    wire ina, inb, inc;&lt;br /&gt;
    wire outd;&lt;br /&gt;
    mod5 I0(ina, inb, inc, outd);&lt;br /&gt;
endmodule&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Result of running the application:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- Analyzing Verilog file 'dummy.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test2' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
--       Resolving module 'test3' (VERI-1489)&lt;br /&gt;
-- Analyzing Verilog file 'testa.v' (VERI-1482)&lt;br /&gt;
-- Analyzing Verilog file 'testb.v' (VERI-1482)&lt;br /&gt;
*** Module 'test2' in library 'work'&lt;br /&gt;
*** Module 'test3' in library 'work'&lt;br /&gt;
-- Printing all libraries to file 'pp_out.v' (VERI-1492)&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output file pp_out.v:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
module test2 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod2 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
module test3 ;&lt;br /&gt;
    wire ina, inb, inc ; &lt;br /&gt;
    wire outd ; &lt;br /&gt;
    mod3 I0 (ina, inb, inc, outd) ; &lt;br /&gt;
endmodule&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=779</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=779"/>
				<updated>2022-05-02T18:00:53Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Why are the ports in original Verilog file renamed to p1, p2, ....?]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to ignore certain modules while analyzing input RTL files | Verilog/C++: How to ignore certain modules while analyzing input RTL files]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Parse select modules only and ignore the rest | Verilog/C++: Parse select modules only and ignore the rest]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Traverse instances in parsetree | Verilog/VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=776</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=776"/>
				<updated>2022-04-01T18:26:20Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets - preventing nets from being optimized away | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Why are the ports in original Verilog file renamed to p1, p2, ....?]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Traverse instances in parsetree | Verilog/VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=775</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=775"/>
				<updated>2022-04-01T18:25:39Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Why are the ports in original Verilog file renamed to p1, p2, ....?]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Traverse instances in parsetree | Verilog/VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Preserving_nets&amp;diff=774</id>
		<title>Preserving nets</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Preserving_nets&amp;diff=774"/>
				<updated>2022-04-01T18:24:24Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Redirected page to Preserving user nets - preventing nets from being optimized away&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Preserving user nets - preventing nets from being optimized away]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=773</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=773"/>
				<updated>2022-04-01T18:20:58Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving nets | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Why are the ports in original Verilog file renamed to p1, p2, ....?]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Traverse instances in parsetree | Verilog/VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=772</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Main_Page&amp;diff=772"/>
				<updated>2022-04-01T18:20:03Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''General'''&lt;br /&gt;
* [[How to get best support from Verific | '''''How to get best support from Verific''''']]&lt;br /&gt;
* [[Source code customization &amp;amp; Stable release services | Source code customization &amp;amp; Stable release services]]&lt;br /&gt;
* [[How to save computer resources | How to save computer resources (memory consumption &amp;amp; runtime)]]&lt;br /&gt;
* [[Original RTL language | How do I know what language a Netlist in the netlist database comes from?]]&lt;br /&gt;
* [[Verific data structures | What are the data structures in Verific?]]&lt;br /&gt;
* [[Remove Verific data structures | How do I remove all Verific data structures in memory?]]&lt;br /&gt;
* [[Does Verific build CDFG? | Does Verific build control and data flow graph (CDFG)?]]&lt;br /&gt;
* [[Does Verific support XMR?| Does Verific support cross module references (XMR)?]]&lt;br /&gt;
* [[Compile-time/run-time flags | Are there options to control Verific software's behavior? Compile-time &amp;amp; run-time flags.]]&lt;br /&gt;
* [[Message handling | How do I downgrade/upgrade messages from Verific? How do I get messages with more details?]]&lt;br /&gt;
* [[Release version | How do I tell the version of a Verific software release? ]]&lt;br /&gt;
* [[Simulation models for Verific primitives | Where do I find simulation models for Verific primitives (VERIFIC_XOR, VERIFIC_DFFRS, ....)? ]]&lt;br /&gt;
* [[Tcl library path| How to correct building (linking) issue &amp;quot;/usr/bin/ld: cannot find -ltcl&amp;quot;]]&lt;br /&gt;
* [[LineFile data from input files | LineFile data from input files]]&lt;br /&gt;
* [[Difference between RTL and gate-level simulations - Flipflop with async set and async reset | Difference between RTL and gate-level simulations - Flipflop with async set and async reset]]&lt;br /&gt;
* [[Preserving user nets | Preserving user nets - preventing nets from being optimized away]]&lt;br /&gt;
&lt;br /&gt;
'''Input: VHDL, Verilog (and SystemVerilog), Liberty, EDIF'''&lt;br /&gt;
* [[How to get all Verilog files being analyzed | Verilog: I'm using -v, -y, .... After Verific is done with the analysis, how do I get a list of all the files being analyzed?]]&lt;br /&gt;
* [[Included files associated with a Verilog source file | Verilog: How do I get the list of included files associated with a Verilog source file?]]&lt;br /&gt;
* [[How to get type/initial value of parameters | Verilog: How to get type/initial value of parameters.]]&lt;br /&gt;
* [[Verilog ports being renamed | Verilog: Why are the ports in original Verilog file renamed to p1, p2, ....?]]&lt;br /&gt;
* [[Design with System Verilog and Verilog 2001 files | Verilog: For a design consisting of a mixture of Verilog 2001 and SystemVerilog input files, should I parse all the files as SystemVerilog?]]&lt;br /&gt;
* [[How to get module ports from Verilog parsetree | Verilog: From the Verilog parsetree, how can I get the ports of a module?]]&lt;br /&gt;
* [[How to change name of id in Verilog parsetree | Verilog: How do I change the name of an id (VeriidDef) in Verilog parsetree?]]&lt;br /&gt;
* [[How to get library containing nested module | Verilog: How do I get nested modules and get the library that contains the nested module?]]&lt;br /&gt;
* [[How to get linefile information of macro definitions | Verilog: How do I get linefile information of macro definitions?]]&lt;br /&gt;
* [[How to find port dimensions | Verilog: How do I get port dimensions?]]&lt;br /&gt;
* [[Instance - Module binding order | Verilog: What is the order of binding modules to instances?]]&lt;br /&gt;
* [[How Verific elaborator handles blackboxes/unknown boxes | Verilog: How Verific elaborator handles blackboxes/unknown boxes]]&lt;br /&gt;
* [[Constant expression replacement | Verilog: Does Verific replace constant expressions with their respective values?]]&lt;br /&gt;
* [[Defined macros become undefined - MFCU vs SFCU | SystemVerilog: Why does Verific complain about undefined macros for macros defined in a different file (Compilation Unit)?]]&lt;br /&gt;
* [[Notes on analysis | SystemVerilog: Notes on analysis]]&lt;br /&gt;
* [[How to get enums from Verilog parsetree | SystemVerilog: From the parsetree, how can I get the enums declared in a module?]]&lt;br /&gt;
* [[How to identify packages being imported into a module | SystemVerilog: How do I identify packages being imported into a module?]]&lt;br /&gt;
* [[SystemVerilog &amp;quot;std&amp;quot; package | SystemVerilog: Support for SystemVerilog semaphore/process/mailbox constructs.]]&lt;br /&gt;
* [[Top level module with interface ports | SystemVerilog: Support for SystemVerilog top level module with interface ports.]]&lt;br /&gt;
* [[Design with VHDL-1993 and VHDL-2008 files | VHDL: VHDL-1993 and VHDL-2008 each has its own IEEE library set. How do I analyze/elaborate a design with a mixture of files of different VHDL dialects (1993 and 2008)?]]&lt;br /&gt;
* [[Escaped identifiers in RTL files and in Verific data structures | Verilog/VHDL: Escaped identifiers in RTL files and in Verific data structures]]&lt;br /&gt;
* [[Prettyprint to a string | Verilog/VHDL: How to prettyprint a parsetree node to a string.]]&lt;br /&gt;
* [[Static elaboration | Verilog/VHDL: What does 'static elaboration' do?]]&lt;br /&gt;
* [[How to ignore a (not used) parameter/generic in elaboration. | Verilog/VHDL: How to ignore a (not used) parameter/generic in elaboration.]]&lt;br /&gt;
* [[What VeriModule* or VhdlPrimaryUnit* the Netlist comes from? | Verilog/VHDL: For a Netlist in the netlist database, is there a clean way to look back at what VeriModule* or VhdlPrimaryUnit* the Netlist was derived from?]]&lt;br /&gt;
* [[Cross-reference between the original RTL files and the elaborated netlist | Verilog/VHDL: Is there a way to cross-reference between the original RTL design files and the elaboration netlist?]]&lt;br /&gt;
* [[How to ignore parameters/generics in elaboration | Verilog/VHDL: Is there a way to tell the elaborator to ignore certain parameters/generics so that the unit/module is not uniquified?]]&lt;br /&gt;
* [[How to check for errors in analysis/elaboration | Verilog/VHDL: Is there a way to tell if the analysis/elaboration process has errors?]]&lt;br /&gt;
* [[Modules/design units with &amp;quot;_default&amp;quot; suffix in their names | Verilog/VHDL: After static elaboration, there are modules/design units with &amp;quot;_default&amp;quot; suffix in their names. Why? And what are they?]]&lt;br /&gt;
* [[How to parse a string | Verilog/VHDL: How to parse a string - Example of adding a module to the parsetree]]&lt;br /&gt;
&lt;br /&gt;
* [[Support IEEE 1735 encryption standard | Verilog/VHDL: Does Verific support IEEE 1735 encryption standard?]]&lt;br /&gt;
'''Netlist Database'''&lt;br /&gt;
* [[Logic optimization across hierarchy boundaries | Netlist Database: Does Verific perform logic optimization across hierarchy boundaries?]]&lt;br /&gt;
* [[Bit-blasting a multi-port RAM instance | Netlist Database: Bit-blasting a multi-port RAM instance]]&lt;br /&gt;
* [[System attributes | Netlist Database: System attributes]]&lt;br /&gt;
&lt;br /&gt;
'''Output'''&lt;br /&gt;
* [[Output file formats | What language formats does Verific support as output?]]&lt;br /&gt;
&lt;br /&gt;
'''Scripting languages: TCL, Perl, Python'''&lt;br /&gt;
* [[What languages can I use with Verific software? | What programming languages can I use with Verific software?]]&lt;br /&gt;
&lt;br /&gt;
'''Code examples'''&lt;br /&gt;
* [[How to use RegisterCallBackMsg() | Util/C++: How to use RegisterCallBackMsg()]]&lt;br /&gt;
* [[Write out an encrypted netlist | Database/C++: Write out an encrypted netlist]]&lt;br /&gt;
* [[Extract clock enable | Database/C++: Extract clock enable]]&lt;br /&gt;
* [[Black box, empty box, and unknown box | Database/C++: Black box, empty box, and unknown box]]&lt;br /&gt;
* [[Replacing Verific built-in primitives/operators with user implementations | Database/C++: Replacing Verific built-in primitives/operators with user implementations]]&lt;br /&gt;
* [[Hierarchy tree RTL elaboration | Database/Perl: Simple example of hierarchy tree elaboration]]&lt;br /&gt;
* [[Create a Netlist Database from scratch (not from RTL elaboration) | Database/Perl/TCL: Create a Netlist Database from scratch (not from RTL elaboration)]]&lt;br /&gt;
* [[Buffering signals and ungrouping | Database/Verilog: Buffering signals and ungrouping (flattening) in the Netlist Database]]&lt;br /&gt;
* [[Memory elements of a RamNet | Database/Verilog/C++: Memory elements of a RamNet]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (C++)| Database/Verilog/C++: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Process -f file and explore the Netlist Database (py)| Database/Verilog/Python: Process -f file and explore the Netlist Database]]&lt;br /&gt;
* [[Fanout cone and grouping | Database/Verilog/Perl: Fanout cone and grouping in the Netlist Database]]&lt;br /&gt;
* [[Simple example of visitor pattern | Verilog/C++: Simple examples of visitor pattern]]&lt;br /&gt;
* [[Statically elaborate with different values of parameters | Verilog/C++: Statically elaborate with different values of parameters]]&lt;br /&gt;
* [[Prettyprint all modules in the design hierarchy | Verilog/C++: Prettyprint all modules in the design hierarchy]]&lt;br /&gt;
* [[Getting instances' parameters | Verilog/C++: Getting instances' parameters]]&lt;br /&gt;
* [[Accessing and evaluating module's parameters | Verilog/C++: Accessing and evaluating module's parameters]]&lt;br /&gt;
* [[Visiting Hierarchical References (VeriSelectedName) | Verilog/C++: Visiting Hierarchical References (VeriSelectedName)]]&lt;br /&gt;
* [[Type Range example | Verilog/C++: Type Range example  (simple)]]&lt;br /&gt;
* [[Using stream input to ignore input file | Verilog/C++: Using stream input to ignore input file]]&lt;br /&gt;
* [[How to tell if a module has encrypted contents | Verilog/C++: How to tell if a module has encrypted contents]]&lt;br /&gt;
* [[Comment out a line using text based design modification and parsetree modification | Verilog/C++: Comment out a line using text-based design modification and parsetree modification]] &lt;br /&gt;
* [[Verilog/C++: How to use IsUserDeclared() : Example for port associations]]&lt;br /&gt;
* [[How to create new module in Verilog parsetree | Verilog/C++: How to create new module in Verilog parsetree]]&lt;br /&gt;
* [[How to get full hierarchy ID path | Verilog/C++: How to get full hierarchy ID path]]&lt;br /&gt;
* [[How to traverse scope hierarchy | Verilog/C++: How to traverse scope hierarchy]]&lt;br /&gt;
* [[Access attributes in parsetree | Verilog/C++: How to access attributes in parsetree]]&lt;br /&gt;
* [[How to detect multiple-clock-edge condition in Verilog parsetree | Verilog/C++: How to detect multiple-clock-edge condition in Verilog parsetree]]&lt;br /&gt;
* [[How to get driving net of an instance | Verilog/C++: How to get driving net of an instance]]&lt;br /&gt;
* [[Type Range example with multi-dimensional arrays| Verilog/C++/Perl: Type Range example with multi-dimensional arrays]]&lt;br /&gt;
* [[How to get linefile data of macros - Macro callback function | Verilog/C++/Perl/Python: How to get linefile data of macros - Macro callback function]]&lt;br /&gt;
* [[Where in RTL does it get assigned? | Verilog/C++/Perl/Python: Where in RTL does it get assigned?]]&lt;br /&gt;
* [[Access attributes of ports in parsetree | Verilog/Perl: Access attributes of ports in parsetree and from netlist]]&lt;br /&gt;
* [[Retrieve package name for user-defined variable types | SystemVerilog/C++/Python: Retrieve package name for user-defined variable types]]&lt;br /&gt;
* [[Pretty-print a module and the packages imported by the module | SystemVerilog/C++: Pretty-print a module and the packages imported by the module]]&lt;br /&gt;
* [[How to get packed dimensions of enum | SystemVerilog/C++: How to get packed dimensions of enum]]&lt;br /&gt;
* [[Traverse instances in parsetree | Verilog/VHDL/C++: Traverse instances in parsetree]]&lt;br /&gt;
* [[Parsing from data in memory | Verilog/VHDL/C++: Parsing from data in memory]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Preserving_user_nets_-_preventing_nets_from_being_optimized_away&amp;diff=771</id>
		<title>Preserving user nets - preventing nets from being optimized away</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Preserving_user_nets_-_preventing_nets_from_being_optimized_away&amp;diff=771"/>
				<updated>2022-04-01T18:17:38Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: How do I preserve user-declared nets so that they don't get optimized away? I would like to see them written out to the netlist file.'''&lt;br /&gt;
&lt;br /&gt;
There are two approaches :&lt;br /&gt;
* globally preserve all user nets&lt;br /&gt;
* preserve only selective nets&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Globally preserve all user nets&lt;br /&gt;
&lt;br /&gt;
The following flags need to be set to have global effect :&lt;br /&gt;
&lt;br /&gt;
 set_runtime_flag db_preserve_user_nets 1&lt;br /&gt;
 set_runtime_flag veri_preserve_user_nets 1      # if using Verilog/SystemVerilog&lt;br /&gt;
 set_runtime_flag vhdl_preserve_user_nets 1      # if using VHDL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Preserve only selective nets&lt;br /&gt;
&lt;br /&gt;
Setting an attribute on a net will prevent it from being optimized away. The attribute can be any attribute, as seen in the examples below.&lt;br /&gt;
&lt;br /&gt;
Verilog :&lt;br /&gt;
&lt;br /&gt;
 module test (input i, output o);&lt;br /&gt;
   (* any *) wire willstay;&lt;br /&gt;
   wire willgo;&lt;br /&gt;
   (* another = &amp;quot;any&amp;quot; *) reg willstaytoo;&lt;br /&gt;
   assign o = ~i;&lt;br /&gt;
 endmodule&lt;br /&gt;
&lt;br /&gt;
This is the output Verilog netlist :&lt;br /&gt;
 //&lt;br /&gt;
 // Verific Verilog Description of module test&lt;br /&gt;
 //&lt;br /&gt;
 module test (i, o);   // test2.v(1)&lt;br /&gt;
    input i;   // test2.v(1)&lt;br /&gt;
    output o;   // test2.v(1)&lt;br /&gt;
    &lt;br /&gt;
    wire willstay /* verific any=1 */ ;   // test2.v(2)&lt;br /&gt;
    wire willstaytoo /* verific another=&amp;quot;any&amp;quot; */ ;   // test2.v(4)&lt;br /&gt;
    &lt;br /&gt;
    not (o, i) ;   // test2.v(5)&lt;br /&gt;
    &lt;br /&gt;
 endmodule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
VHDL :&lt;br /&gt;
&lt;br /&gt;
 library ieee;&lt;br /&gt;
 use ieee.std_logic_1164.all ;&lt;br /&gt;
 entity test is &lt;br /&gt;
    port (i : in bit; o : out bit) ;&lt;br /&gt;
 end entity test;&lt;br /&gt;
 architecture arch of test is&lt;br /&gt;
    signal willstay : bit ;&lt;br /&gt;
    signal willgo : bit ;&lt;br /&gt;
    signal willstaytoo : bit ; &lt;br /&gt;
    attribute any : string ;&lt;br /&gt;
    attribute any of willstay : signal is &amp;quot;&amp;quot; ;&lt;br /&gt;
    attribute another : string ;&lt;br /&gt;
    attribute another of willstaytoo : signal is &amp;quot;any&amp;quot; ;&lt;br /&gt;
 begin&lt;br /&gt;
    o &amp;lt;= not i ;&lt;br /&gt;
 end arch ;&lt;br /&gt;
&lt;br /&gt;
This is the output VHDL netlist :&lt;br /&gt;
 --&lt;br /&gt;
 -- Verific VHDL Description of module test&lt;br /&gt;
 --&lt;br /&gt;
 library ieee ;&lt;br /&gt;
 use ieee.std_logic_1164.all ;&lt;br /&gt;
 entity test is&lt;br /&gt;
     port (i: in std_logic;   -- test2.vhd(4)&lt;br /&gt;
         o: out std_logic   -- test2.vhd(4)&lt;br /&gt;
     );&lt;br /&gt;
 end entity test;   -- test2.vhd(3)&lt;br /&gt;
 architecture arch of test is &lt;br /&gt;
     signal willstay : std_logic; -- any=&amp;quot;&amp;quot;    -- test2.vhd(8)&lt;br /&gt;
     signal willstaytoo : std_logic; -- another=&amp;quot;any&amp;quot;    -- test2.vhd(10) &lt;br /&gt;
 begin&lt;br /&gt;
     o &amp;lt;= not i;   -- test2.vhd(16)  &lt;br /&gt;
 end architecture arch;   -- test2.vhd(3)&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Preserving_user_nets_-_preventing_nets_from_being_optimized_away&amp;diff=769</id>
		<title>Preserving user nets - preventing nets from being optimized away</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Preserving_user_nets_-_preventing_nets_from_being_optimized_away&amp;diff=769"/>
				<updated>2022-04-01T18:16:48Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Vince moved page Preserving user nets --preventing nets from being optimized away to Preserving user nets - preventing nets from being optimized away&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q: How do I preserve user-declared nets so that they don't get optimized away? I would like to see them written out to the netlist file.'''&lt;br /&gt;
&lt;br /&gt;
There are two approaches :&lt;br /&gt;
* globally preserve all user nets&lt;br /&gt;
* preserve only selective nets&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Globally preserve all user nets&lt;br /&gt;
&lt;br /&gt;
The following flags need to be set for global effect :&lt;br /&gt;
&lt;br /&gt;
 set_runtime_flag db_preserve_user_nets 1&lt;br /&gt;
 set_runtime_flag veri_preserve_user_nets 1      # if using Verilog/SystemVerilog&lt;br /&gt;
 set_runtime_flag vhdl_preserve_user_nets 1      # if using VHDL&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Preserve only selective nets&lt;br /&gt;
&lt;br /&gt;
Setting an attribute on a net will prevent it from being optimized away. The attribute can be any attribute, as seen in the examples below.&lt;br /&gt;
&lt;br /&gt;
Verilog :&lt;br /&gt;
&lt;br /&gt;
 module test (input i, output o);&lt;br /&gt;
   (* any *) wire willstay;&lt;br /&gt;
   wire willgo;&lt;br /&gt;
   (* another = &amp;quot;any&amp;quot; *) reg willstaytoo;&lt;br /&gt;
   assign o = ~i;&lt;br /&gt;
 endmodule&lt;br /&gt;
&lt;br /&gt;
This is the output Verilog netlist :&lt;br /&gt;
 //&lt;br /&gt;
 // Verific Verilog Description of module test&lt;br /&gt;
 //&lt;br /&gt;
 module test (i, o);   // test2.v(1)&lt;br /&gt;
    input i;   // test2.v(1)&lt;br /&gt;
    output o;   // test2.v(1)&lt;br /&gt;
    &lt;br /&gt;
    wire willstay /* verific any=1 */ ;   // test2.v(2)&lt;br /&gt;
    wire willstaytoo /* verific another=&amp;quot;any&amp;quot; */ ;   // test2.v(4)&lt;br /&gt;
    &lt;br /&gt;
    not (o, i) ;   // test2.v(5)&lt;br /&gt;
    &lt;br /&gt;
 endmodule&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
VHDL :&lt;br /&gt;
&lt;br /&gt;
 library ieee;&lt;br /&gt;
 use ieee.std_logic_1164.all ;&lt;br /&gt;
 entity test is &lt;br /&gt;
    port (i : in bit; o : out bit) ;&lt;br /&gt;
 end entity test;&lt;br /&gt;
 architecture arch of test is&lt;br /&gt;
    signal willstay : bit ;&lt;br /&gt;
    signal willgo : bit ;&lt;br /&gt;
    signal willstaytoo : bit ; &lt;br /&gt;
    attribute any : string ;&lt;br /&gt;
    attribute any of willstay : signal is &amp;quot;&amp;quot; ;&lt;br /&gt;
    attribute another : string ;&lt;br /&gt;
    attribute another of willstaytoo : signal is &amp;quot;any&amp;quot; ;&lt;br /&gt;
 begin&lt;br /&gt;
    o &amp;lt;= not i ;&lt;br /&gt;
 end arch ;&lt;br /&gt;
&lt;br /&gt;
This is the output VHDL netlist :&lt;br /&gt;
 --&lt;br /&gt;
 -- Verific VHDL Description of module test&lt;br /&gt;
 --&lt;br /&gt;
 library ieee ;&lt;br /&gt;
 use ieee.std_logic_1164.all ;&lt;br /&gt;
 entity test is&lt;br /&gt;
     port (i: in std_logic;   -- test2.vhd(4)&lt;br /&gt;
         o: out std_logic   -- test2.vhd(4)&lt;br /&gt;
     );&lt;br /&gt;
 end entity test;   -- test2.vhd(3)&lt;br /&gt;
 architecture arch of test is &lt;br /&gt;
     signal willstay : std_logic; -- any=&amp;quot;&amp;quot;    -- test2.vhd(8)&lt;br /&gt;
     signal willstaytoo : std_logic; -- another=&amp;quot;any&amp;quot;    -- test2.vhd(10) &lt;br /&gt;
 begin&lt;br /&gt;
     o &amp;lt;= not i;   -- test2.vhd(16)  &lt;br /&gt;
 end architecture arch;   -- test2.vhd(3)&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=Preserving_user_nets_--preventing_nets_from_being_optimized_away&amp;diff=770</id>
		<title>Preserving user nets --preventing nets from being optimized away</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=Preserving_user_nets_--preventing_nets_from_being_optimized_away&amp;diff=770"/>
				<updated>2022-04-01T18:16:48Z</updated>
		
		<summary type="html">&lt;p&gt;Vince: Vince moved page Preserving user nets --preventing nets from being optimized away to Preserving user nets - preventing nets from being optimized away&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Preserving user nets - preventing nets from being optimized away]]&lt;/div&gt;</summary>
		<author><name>Vince</name></author>	</entry>

	</feed>