# I2C Master (VHDL)

**URL:** <https://forum.digikey.com/t/i2c-master-vhdl/12797>\
**Category:** Logic Design\
**Tags:** tech-tips\
**Created:** [March 17, 2021, 10:01pm UTC](https://forum.digikey.com/t/i2c-master-vhdl/12797 "2021-03-17T22:01:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![APDahlen](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/apdahlen/32/40191_2.png) [@APDahlen](https://forum.digikey.com/u/APDahlen)\
**Post date:** [January 8, 2024, 2:08pm UTC](https://forum.digikey.com/t/i2c-master-vhdl/12797/4 "2024-01-08T14:08:47Z")

</div>

Hello ozanaidan,

Yes, use of a synchronizer is generally a good idea when crossing clock boundaries. An example is the SPI clock signal which should be synchronized upon entering the FPGA.

Please accept this Verilog implementation. Most FPGA synthesis tools will accept Verilog or VHDL.

Best Wishes,

APDahlen

> [@Implementing a Clock Boundary Synchronizer in Verilog](https://forum.digikey.com/t/implementing-a-clock-boundary-synchronizer-in-verilog/35809):
>
> In this post we will explore a Verilog description of a clock synchronizer. From your introduction to digital electronics, you may recall the concept of metastability. This is an undesirable condition where a digital signal enters an indeterminate state; neither one nor zero. Let’s start by defining a few terms: Clock boundary: Many logic designs are designed to be synchronous which implies that all logic moves with the same heartbeat. In an FPGA this is implemented as a series of registers.…

---

_[View the full topic](https://forum.digikey.com/t/i2c-master-vhdl/12797)._
