# Custom overlay with VHDL

**URL:** <https://discuss.pynq.io/t/custom-overlay-with-vhdl/940>\
**Category:** Support\
**Created:** [February 14, 2020, 8:18pm UTC](https://discuss.pynq.io/t/custom-overlay-with-vhdl/940 "2020-02-14T20:18:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roymesi](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@Roymesi](https://discuss.pynq.io/u/Roymesi)\
**Post date:** [February 14, 2020, 8:18pm UTC](https://discuss.pynq.io/t/custom-overlay-with-vhdl/940/1 "2020-02-14T20:18:47Z")

</div>

In the youtube tutorial [here](https://www.youtube.com/watch?v=Dupyek4NUoI), it is mentioned that using HLS the user can write the code in C and export it to HDL language. Later on, for using the function, I need to know the offset of the registers.  
Say I want to write the hardware function in VHDL in the first place, where do I get the offset of the registers from?

---

<div class="post-metadata">

**Author:** ![cathalmccabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cathalmccabe/32/3348_2.png) [@cathalmccabe](https://discuss.pynq.io/u/cathalmccabe)\
**Post date:** [February 16, 2020, 9:28pm UTC](https://discuss.pynq.io/t/custom-overlay-with-vhdl/940/2 "2020-02-16T21:28:49Z")

</div>

When you package your IP, register info is included in the metadata for the IP. This eventually gets included in the Overlay, and can be read from PYNQ using “register\_map”

See info here.  
[https://pynq.readthedocs.io/en/v2.5/overlay\_design\_methodology/overlay\_tutorial.html](https://pynq.readthedocs.io/en/v2.5/overlay_design_methodology/overlay_tutorial.html)

(You could also use hard coded values - but don’t do this 😉 )

Cathal
