0
1
00:00:02,410 --> 00:00:08,110
After getting familiar with the concept of the multiplexer as the basic block of the decision-making process 
1

2
00:00:08,110 --> 00:00:14,560
in logic circuits. The question is: What is the generalised form of a multiplexer in a real design? In 
2

3
00:00:14,560 --> 00:00:15,040
this lecture, 
3

4
00:00:15,280 --> 00:00:20,530
I will explain the general form of a multiplexer and logic circuits that usually embrace that. 
4

5
00:00:23,450 --> 00:00:29,500
In the first generalised form of a multiplexer, each data input can have a wide bit-width value, 
5

6
00:00:29,540 --> 00:00:37,760
for example, w-bit inputs. Each value on the select input connects one of the w-bit inputs to the w-bit output.
6

7
00:00:40,140 --> 00:00:45,570
In real applications, the design inputs may not directly feed the select inputs of multiplexers. 
7

8
00:00:46,470 --> 00:00:51,930
Instead, a combinational logic should convert the design inputs into the MUX select inputs.
8

9
00:00:54,280 --> 00:01:01,540
Let’s consider this decision-making example in which a, b, c, and d variables have 8 bits. 
9

10
00:01:02,170 --> 00:01:10,480
If c is 18, then the d output is a. If c is 66, then d is b. Otherwise, the d output is 
10

11
00:01:10,480 --> 00:01:10,790
c.
11

12
00:01:11,230 --> 00:01:14,440
Now let’s implement this decision-making example with a multiplexer.
12

13
00:01:17,640 --> 00:01:25,410
The binary representation of 18 is 00010010, then this 8-input AND gate 
13

14
00:01:25,560 --> 00:01:27,270
implements the first if condition.
14

15
00:01:28,020 --> 00:01:34,730
The binary representation of 66 is 01000010, 
15

16
00:01:34,770 --> 00:01:39,090
then this 8-input AND gate implements the else if condition.
16

17
00:01:40,180 --> 00:01:45,250
Therefore, if c==18 then S1S0=01.
17

18
00:01:46,650 --> 00:01:54,870
If c==66 then S1S0=10. Otherwise s1s0=00
18

19
00:01:57,750 --> 00:02:03,670
The AND gates generating S1 And S0 can be used as the selection logic circuits for the multiplexer
19

20
00:02:03,670 --> 00:02:06,040
implementing this decision-making code. 
20

21
00:02:06,660 --> 00:02:12,690
Therefore, the 00 binary value of the MUX control input should connect the c input to the output.
21

22
00:02:13,530 --> 00:02:18,840
The 01 binary value of the MUX control input should pass the a input to the output.
22

23
00:02:20,150 --> 00:02:28,160
And the binary value 10 of the MUX control input should select the b input. Notice that according 
23

24
00:02:28,160 --> 00:02:32,650
to our selection logic circuit, control inputs never get the 11 value. 
24

25
00:02:32,810 --> 00:02:36,890
However, we connected the c variable to the corresponding MUX input.
25

26
00:02:39,510 --> 00:02:45,150
In the third case of MUX generalisation, we assume that the design inputs need a preprocessing step 
26

27
00:02:45,480 --> 00:02:47,340
before feeding the MUX data inputs. 
27

28
00:02:47,610 --> 00:02:51,720
In this case, a logic circuit should perform this preparation process. 
28

29
00:02:53,860 --> 00:02:59,500
As an example, let’s consider this if-else statement that is the modified version of our previous 
29

30
00:02:59,500 --> 00:03:05,740
example. Here, three functions define the data that should be selected.  In this case, a combinational 
30

31
00:03:05,740 --> 00:03:11,230
logic circuit can implement these three functions to provide the input data for the MUX.
31

32
00:03:13,530 --> 00:03:18,600
After understanding the concept of the hardware behind the decision-making process, the question is
32

33
00:03:18,840 --> 00:03:24,240
How can we describe a decision-making process in HLS? The next lecture will answer this question.  
33

34
00:03:27,150 --> 00:03:33,210
This is our takeaway message. A decision-making process can be implemented by a mux and two combinational
34

35
00:03:33,210 --> 00:03:36,250
circuits feeding the mux data and control inputs.
35

36
00:03:39,680 --> 00:03:40,730
Now the quiz question
36

37
00:03:41,640 --> 00:03:45,360
What is the hardware structure that implements this decision-making process? 
