RTL Studio Open IDE

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

Hardverilogsimsyn

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.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for I2C Clock Stretch Detector.
  2. 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.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. 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

All Interface Protocols blocks