0
1
00:00:00,710 --> 00:00:06,350
In this lecture, I am taking the parity-bit generator design as a typical example that contains a
1

2
00:00:06,350 --> 00:00:13,150
repetitive computing pattern which can be implemented by the parallel for-loop in HLS. 
2

3
00:00:13,280 --> 00:00:16,760
The parity-bit is a technique to detect a single-bit error in binary data.
3

4
00:00:18,660 --> 00:00:24,750
The binary data can become erroneous while it is saved in the memory or during the process of transmitting
4

5
00:00:24,750 --> 00:00:26,090
from one place to another. 
5

6
00:00:27,540 --> 00:00:34,230
Some bits may change their states because of different types of unpredicted events such as the interaction
6

7
00:00:34,230 --> 00:00:42,600
with energetic particles (or terrestrial radiations), magnetic fields or electric spikes. This phenomenon 
7

8
00:00:42,600 --> 00:00:49,830
is critical in nano-scale semiconductor technologies, nuclear power stations, satellites and aerospace 
8

9
00:00:49,830 --> 00:00:50,670
applications.
9

10
00:00:52,400 --> 00:00:59,370
Single Event Upset (also known as soft-error) is one of the famous models representing this type of error.
10

11
00:00:59,960 --> 00:01:06,560
This model assumes that one of the binary bits changes its state from 0 to 1 or from 1 to 0.
11

12
00:01:09,090 --> 00:01:15,330
As an example, a Single Event Upset in the flight computers of Airbus A330 on 7 
12

13
00:01:15,330 --> 00:01:23,070
October 2008 is suspected to result in an aircraft upset that nearly ended in its crashing after the 
13

14
00:01:23,070 --> 00:01:26,040
computers underwent several malfunctions.
14

15
00:01:29,470 --> 00:01:34,540
Parity is a simple mechanism to detect a single bit error in a binary data.
15

16
00:01:35,710 --> 00:01:42,070
The parity bit is a one-bit signature of an n-bit binary data that is usually saved or transmit with
16

17
00:01:42,070 --> 00:01:42,540
the data.
17

18
00:01:43,330 --> 00:01:49,830
A parity bit generator receives data and generates the parity-bit. Then this bit is attached to the data.
18

19
00:01:51,240 --> 00:01:57,120
Later, the parity-bit checker can check the validity of the parity-bit and detect any possible 
19

20
00:01:57,120 --> 00:01:57,920
single-error in the data. 
20

21
00:01:59,720 --> 00:02:03,540
There are two types of parity: odd parity and even parity.
21

22
00:02:04,250 --> 00:02:11,140
The idea behind this is that the total number of “1”s in a binary value should always be even or odd. 
22

23
00:02:11,510 --> 00:02:12,140
The parity bit should be generated to meet this constraint.
23

24
00:02:12,140 --> 00:02:14,930
The parity bit should be generated to meet this constraint.
24

25
00:02:15,620 --> 00:02:17,030
Let’s take a few examples:
25

26
00:02:18,580 --> 00:02:24,670
If we assume that the binary value is 0b1101001, then the number of 1s is 4, 
26

27
00:02:24,850 --> 00:02:25,540
which is even.
27

28
00:02:26,690 --> 00:02:29,820
In the case of even parity, the extra bit should be zero 
28

29
00:02:30,470 --> 00:02:32,510
that is p=0. 
29

30
00:02:33,320 --> 00:02:37,520
This makes the total number of 1’s in the (data+parity) value even. 
30

31
00:02:39,150 --> 00:02:44,490
In the case of odd parity, the extra bit should be 1 that is p=1. 
31

32
00:02:44,940 --> 00:02:49,100
This makes the total number of 1’s in the (data+parity) value odd.
32

33
00:02:49,590 --> 00:02:57,120
If the data is 1011101, which has five 1s, then even parity bit is 1 and 
33

34
00:02:57,120 --> 00:02:58,710
the odd parity-bit is 0.
34

35
00:03:00,990 --> 00:03:07,290
In the following lecture, I will explain how to implement the parity bit generator circuit using a set of 
35

36
00:03:07,290 --> 00:03:08,190
XOR gates.
36

37
00:03:10,100 --> 00:03:16,310
The takeaway messages are:  Parity-bit can be used to detect a single-bit error in a binary data
37

38
00:03:17,180 --> 00:03:23,300
There are two types of parity-bit: even and odd,  In the even parity, the (parity + data) should have an 
38

39
00:03:23,300 --> 00:03:29,660
even number of bits,  In the odd parity, the (parity + data) should have an odd number of bits
39

40
00:03:30,350 --> 00:03:31,640
Now the first quiz
40

41
00:03:33,010 --> 00:03:35,940
Find the even parity bit (pe) and odd parity bit (po) for the following data
41

42
00:03:38,080 --> 00:03:44,200
As the second quiz find the erroneous data in the following (parity+data) binary values.
