<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.verific.com/faq/index.php?action=history&amp;feed=atom&amp;title=How_to_find_port_dimensions</id>
		<title>How to find port dimensions - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.verific.com/faq/index.php?action=history&amp;feed=atom&amp;title=How_to_find_port_dimensions"/>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_find_port_dimensions&amp;action=history"/>
		<updated>2026-05-02T12:45:20Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>https://www.verific.com/faq/index.php?title=How_to_find_port_dimensions&amp;diff=286&amp;oldid=prev</id>
		<title>Hoa: Created page with &quot;'''Q: How do I get port dimensions?'''  A port can have multiple (packed/unpacked) dimensions like &quot;module test (input [1:0][2:3] in1 [4:5][6:7]);&quot;. Below is a code excerpt in...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.verific.com/faq/index.php?title=How_to_find_port_dimensions&amp;diff=286&amp;oldid=prev"/>
				<updated>2017-04-06T21:42:48Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Q: How do I get port dimensions?&amp;#039;&amp;#039;&amp;#039;  A port can have multiple (packed/unpacked) dimensions like &amp;quot;module test (input [1:0][2:3] in1 [4:5][6:7]);&amp;quot;. Below is a code excerpt in...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Q: How do I get port dimensions?'''&lt;br /&gt;
&lt;br /&gt;
A port can have multiple (packed/unpacked) dimensions like &amp;quot;module test (input [1:0][2:3] in1 [4:5][6:7]);&amp;quot;. Below is a code excerpt in C++:&lt;br /&gt;
&lt;br /&gt;
  Array *port_arr = vgModule-&amp;gt;GetPorts();&lt;br /&gt;
  VeriIdDef *port_id ;&lt;br /&gt;
  unsigned i;&lt;br /&gt;
  FOREACH_ARRAY_ITEM(port_arr, i, port_id) {&lt;br /&gt;
    if (!port_id) continue ;&lt;br /&gt;
    char* name = port_id-&amp;gt;GetName();&lt;br /&gt;
    unsigned j=0 ;&lt;br /&gt;
    VeriRange *dim ;&lt;br /&gt;
    while (dim = port_id-&amp;gt;GetDimensionAt(j++)) {&lt;br /&gt;
      VeriExpression *left = dim-&amp;gt;GetLeft() ;    // Left range bound&lt;br /&gt;
      VeriExpression *right = dim-&amp;gt;GetRight() ; // right range bound&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
For array (e.g. &amp;quot;module test (input [15:0] in1);&amp;quot;), it's sufficient to call GetDimensionAt(0) instead of the FOREACH loop as above.&lt;/div&gt;</summary>
		<author><name>Hoa</name></author>	</entry>

	</feed>