# Is hierarchical referencing synthesizable?

**URL:** <https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888>\
**Category:** SystemVerilog\
**Tags:** synthesis, SystemVerilog, hierarchical-reference\
**Created:** [January 3, 2018, 12:26pm UTC](https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888 "2018-01-03T12:26:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reuben](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/reuben/32/1409_2.png) [@Reuben](https://verificationacademy.com/forums/u/Reuben)\
**Post date:** [January 3, 2018, 12:26pm UTC](https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888/1 "2018-01-03T12:26:22Z")

</div>

```verilog

// Inside an RTL module of a design
logic probe_this;

assign probe_this = sub_module1.sub_module2.sub_module3.signal_to_probe;

```

Is that code above will be synthesized together with the RTL codes inside that module?

---

<div class="post-metadata">

**Author:** ![sharvil111](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/sharvil111/32/3790_2.png) [@sharvil111](https://verificationacademy.com/forums/u/sharvil111)\
**Post date:** [January 3, 2018, 3:18pm UTC](https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888/2 "2018-01-03T15:18:29Z")

</div>

_In reply to [Reuben](https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888):_

I don’t think it is synthesizable. In order to access the sub-modules signals, one has to declare the signals as ports and connect them up to higher level. You can add output port from low level module and connect it in top level hierarchically.

As a side note, refer to [some alternative for accessing out of scope signals for a module](https://stackoverflow.com/questions/24591396/access-top-level-resources-outside-of-hierarchy).

---

<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:** [January 3, 2018, 5:16pm UTC](https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888/3 "2018-01-03T17:16:15Z")

</div>

_In reply to [Reuben](https://verificationacademy.com/forums/t/is-hierarchical-referencing-synthesizable/33888/2):_

It depends. You certainly would not be able to preserve any hierarchy if there is reference that crosses the boundary. Best to ask on the forum of a tool that you are using.
