SHENZHEN I/O

SHENZHEN I/O

评价数不足
SIMPLE ERROR DETECTION
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
7.941 KB
7 月 26 日 下午 2:21
7 月 26 日 下午 2:33
3 项改动说明 ( 查看 )

订阅以下载
SIMPLE ERROR DETECTION

描述
Parity is a simple error detection scheme. It works by adding an additional bit to ensure that the 'data word' contains either an Even (if using Even parity) or Odd (if using Odd parity) number of 1's. By checking that the 'even-ness' of ones in the data is correct, you can crudely tell if an error has occurred while receiving the data.

This client requires a system that can receive data words formed of 7-bits of data, followed by a single parity bit which has been set to set the Parity of the data. The system must then output a one if the parity of the data word is incorrect (i.e. does not match the setting).

*data* is a simple input, which receives data words formed of 7 serial data bits followed by a single parity bit.
*even* is a simple input that selects between Even (when set to 100) and Odd parity (when set to 0) mode - i.e. whether we expect an even or odd number of 1's.
*error* is a simple output that goes high on the very last bit of the word if an error has been detected.

For example, if 00101101 was received, and the system was set to Even parity mode, then no error is detected - because there is an even number of 1's.
Alternatively, if 1011000 was received, and the system was set to Even parity mode, then an error has occurred - as there is an Odd number of 1's, but Even parity expects an even number.

Basic Solution Stats: 6 Cost | 610 Power | 16 Lines