# Post Synthesis Simulation error, unable to find ports due to flattening 2D array ports to 1D

**URL:** <https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169>\
**Category:** SystemVerilog\
**Tags:** post-synthesis-verification, System-Verilog, SystemVerilog\
**Created:** [August 20, 2023, 9:17am UTC](https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169 "2023-08-20T09:17:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farah\_Adel\_Fathy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/f/c5a1d2/32.png) [@Farah\_Adel\_Fathy](https://verificationacademy.com/forums/u/Farah_Adel_Fathy)\
**Post date:** [August 20, 2023, 9:17am UTC](https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169/1 "2023-08-20T09:17:37Z")

</div>

In post synthesis simulation on Vivado, the netlist flattens 2D array to 1D array. How can we adapt the test-bench to the change of these ports (for example in DUT instantiation, feeding values to this port through $fscanf function))

Example: reg signed [13-1:0] mac\_ofdIsymbol\_tqs [1:0];

this port is now flattened in the netlist to mac\_ofdIsymbol\_tqs[0][12:0] and mac\_ofdIsymbol\_tqs[1][12:0]

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [August 21, 2023, 4:39pm UTC](https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169/2 "2023-08-21T16:39:09Z")

</div>

_In reply to [Farah\_Adel\_Fathy](https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169):_

You need to show exactly how the ports are declared. When you sat flattened, do you mean split into separate ports for each unpacked element?

---

<div class="post-metadata">

**Author:** ![Farah\_Adel\_Fathy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/f/c5a1d2/32.png) [@Farah\_Adel\_Fathy](https://verificationacademy.com/forums/u/Farah_Adel_Fathy)\
**Post date:** [August 23, 2023, 7:49am UTC](https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169/3 "2023-08-23T07:49:58Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/post-synthesis-simulation-error-unable-to-find-ports-due-to-flattening-2d-array-ports-to-1d/42169/2):_

It is now solved. I defined a wrapper that has the instantiation of this module (that has the 2D array ports). This wrapper maps the 1D array ports to 2D and passes it to the targeted module

Illustration: The wrapper has these signals defined:  
input signed [13-1:0] mac\_ofdIsymbol\_tqs\_0,  
wire signed [13-1:0] mac\_ofdIsymbol\_tqs [1:0];

assign mac\_ofdIsymbol\_tqs [0] = mac\_ofdIsymbol\_tqs\_0;  
assign mac\_ofdIsymbol\_tqs [1] = mac\_ofdIsymbol\_tqs\_1;

And mac\_ofdIsymbol\_tqs enters the required module (which is instantiated now under wrapper). As long as 2D arrays are not in the interface there will be no issue.
