Parity Checker
Serial communication protocols rely on lightweight error detection to catch single-bit corruption during transmission. The parity checker is a standard physical layer mechanism that validates incoming frames by calculating parity on the fly.
The circuit maintains a running even parity calculation for an incoming serial payload synchronized to an implicit clock.
rst(1-bit): Synchronous active-high reset. Clears the internal parity state and theerroutput to 0.data_in(1-bit): The incoming serial data stream.en(1-bit): When high, the currentdata_inbit is accumulated into the running parity state.check(1-bit): When high,data_inrepresents the received parity bit. Ifdata_indoes not match the accumulated payload parity, assert theerroutput to 1 on the next clock cycle.err(1-bit): The parity error flag. Once asserted, it must remain high until the module is reset.
Constraints
- Implement synchronous active-high reset logic for all state elements.
- The
erroutput must be registered. - Do not accumulate
data_ininto the parity state during the cycle whencheckis high.
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.