CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

I2C Arbitration Loss Detector

HardLogic CircuitBuild

Multi-master open-drain buses require collision detection to prevent data corruption when multiple devices begin transmitting simultaneously. The arbitration detector monitors the physical bus state against the device's intended transmission state to determine if another master has claimed the bus.

The detector operates synchronously. When the master is actively transmitting (tx_en is 1), it compares its intended output (sda_out) with the actual bus state (sda_in). If the master intends to float the line high (sda_out is 1) but reads a pulled-low bus (sda_in is 0), arbitration is lost. The arb_lost flag must assert on the next clock edge and remain high until cleared by a synchronous rst.

| rst | tx_en | sda_out | sda_in | arb_lost (next) | |-------|---------|-----------|----------|-------------------| | 1 | X | X | X | 0 | | 0 | 0 | X | X | arb_lost | | 0 | 1 | 0 | X | arb_lost | | 0 | 1 | 1 | 1 | arb_lost | | 0 | 1 | 1 | 0 | 1 |

Constraints

  • Implement synchronous reset logic.
  • Ensure arb_lost holds its state once asserted high until rst is applied.
  • Do not evaluate arbitration conditions when tx_en is 0.

Topics

sequentialstate-machinei2carbitration

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks