Interface Protocols
I2C Clock Stretch Detector
Detects I2C clock stretching by counting SCL low cycles against a configurable threshold.
About this block
Simulate it in the Verilog IDE
I2C Clock Stretch Detector is a Verilog reference block in the Interface Protocols catalog. UART, SPI, I2C, and other serial or peripheral protocol interfaces. Marked Hard: a larger reference. Simulate the packaged testbench before you change the RTL.
This IP core provides a robust, configurable mechanism for detecting I2C clock stretching. By monitoring the SCL line and comparing the low duration against a user-defined threshold, it enables master controllers to gracefully handle slow slaves or bus contention. The synchronous design ensures easy integration into existing FPGA/ASIC designs, and the dual output flags allow for both event detection and active state monitoring.
- Choose Open in IDE. RTL Studio loads the packaged workspace for I2C Clock Stretch Detector.
- Read the Verilog module in the editor. The catalog line for this block: Detects I2C clock stretching by counting SCL low cycles against a configurable threshold.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.
RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.
More in Interface Protocols
- 1-Bit GPIO Pin Driver (Combinational) — L1 Upgrade — L2 Upgrade
- 32-Bit MMIO GPIO (DI Read, Byte-Strobed DO) — L2 Upgrade
- 8-Bit GPIO Output Register
- 8-Bit GPIO Set/Clear Register
- 8-Bit GPIO with Direction and Rising-Edge IRQ
- I2C Arbitration Lost Detector
- I2C Bus Idle Timeout
- I2C NACK Sticky Flag Detector
- I2C Start/Stop Detector
- JTAG TAP Controller
- Lightweight I²C Master Controller (Standard Mode)
- Lightweight I²C Slave Controller (Standard Mode)
- SPI Master Lite
- SPI Mode-0 Host (8-Bit Frames)
- SPI Mode-3 Slave (CPOL=1, CPHA=1) 8-Bit
- SPI Slave Controller (Mode 0)