I2C Arbitration Loss Detector
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_lostholds its state once asserted high untilrstis applied. - Do not evaluate arbitration conditions when
tx_enis 0.
Topics
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.
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.