dr. munaf salim › lmsdatapool... · 4/15/2015 2 introduction dr. munaf salim 3 •the logic...
TRANSCRIPT
4/15/2015
1
COMPUTER LAB
CPEG415
Dr. Munaf Salim
Dr. Munaf Salim 1
Unit Unit Unit Unit FIVEFIVEFIVEFIVE
Digital Logic Using Simulink
Dr. Munaf Salim 2
4/15/2015
2
Introduction
Dr. Munaf Salim 3
• The Logic Operations Group Sub−Library contains the blocks shown below
Dr. Munaf Salim 4
• The Logical Operator Block:
• The Logical Operator block is described in Section 2.12, Chapter 2, Page 2−18
• The Combinatorial Logic Block
• The Combinatorial Logic block, often referred to as combinational block,implements a standard truth table for modeling programmable logic arrays(PLAs)*, logic circuits, decision tables, and other Boolean expressions. In aCombinatorial Logic block we specify a matrix that defines all outputs as the Truthtable parameter. Each row of the matrix contains the output for a differentcombination of input elements. We must specify outputs for every combinationof inputs. The number of columns is the number of block outputs
4/15/2015
3
Input 1 Input 2 Output
0 0 0
0 1 0
1 0 0
1 1 1
4/15/2015
4
Dr. Munaf Salim 7
Dr. Munaf Salim 8
4/15/2015
5
Dr. Munaf Salim 9
Dr. Munaf Salim 10
• The Signal Builder Block.
• The Signal Builder block allows us to create interchangeable groups of piece−wise linearsignal sources and use them in a model. The procedure for building a piece−wise linearsignal is as follows:
• 1. We first double−click on the Signal Builder block, a waveform similar to that shown inFigure is displayed. The points at the ends of each line segment indicate that thiswaveform is selected. To deselect it, we press the Esc key.
• 2. To select a particular point, we position the mouse cursor over that point and wele9−click. A circle is drawn around that point to indicate that it is selected.
• 3. To select a line segment, we le9−click on that segment. That line segment is nowshown as a thick line indicating that it is selected. To deselect it, we press the Esc key.
4/15/2015
6
Dr. Munaf Salim 11
• The Signal Builder Block.
• 4. To drag a line segment to a new position, we place the mouse cursor over that line segment and the cursor shape shows the position in which we can drag the segment.
• 5. To drag a point along the y−axis, we move the mouse cursor over that point, and the cursor changes to a circle indicating that we can drag that point. We can then move that point in a direction parallel to the x−axis.
• 6. To drag a point along the x−axis, we select that point, and we hold down the Shi9 key while dragging that point.
• 7. When we select a line segment on the ;me axis (x−axis) we observe that at the lower end of the waveform display window the Left Point and Right Point fields become visible. We can then reshape the given waveform by specifying the Time (T) and Amplitude (Y) points.
Dr. Munaf Salim 12
4/15/2015
7
Dr. Munaf Salim 13
Dr. Munaf Salim 14
4/15/2015
8
Dr. Munaf Salim 15
Dr. Munaf Salim 16
4/15/2015
9
Dr. Munaf Salim 17
Digital Encoders
Design an octal−to−binary encoder.
Dr. Munaf Salim 18
Digital Encoders
4/15/2015
10
Dr. Munaf Salim 19
Digital Encoders
Dr. Munaf Salim 20
Digital Decoders
Design a binary−to−octal decoder.
4/15/2015
11
Dr. Munaf Salim 21
Digital Decoders
Dr. Munaf Salim 22
Equality Comparators
4/15/2015
12
Dr. Munaf Salim 23
Equality Comparators
Dr. Munaf Salim 24
Equality Comparators
4/15/2015
13
Dr. Munaf Salim 25
Multiplexers and Demultiplexers
Dr. Munaf Salim 26
Design an 8−input digital mul;plexer.
4/15/2015
14
Dr. Munaf Salim 27
Design an 8−input digital mul;plexer.
Dr. Munaf Salim 28
4/15/2015
15
Dr. Munaf Salim 29
Dr. Munaf Salim 30
Design an 8−output digital demultiplexer.
The student will designed it as an exercise
4/15/2015
16
Dr. Munaf Salim 31
Adder and Subtractor.
Dr. Munaf Salim 32
Adder and Subtractor.
4/15/2015
17
Dr. Munaf Salim 33
Adder and Subtractor.
Dr. Munaf Salim 34
Adder and Subtractor.
4/15/2015
18
Dr. Munaf Salim 35
Full Adder.
Dr. Munaf Salim 36
Full Adder.
4/15/2015
19
Dr. Munaf Salim 37
Full Adder.
Dr. Munaf Salim 38
Full Adder.
4/15/2015
20
Dr. Munaf Salim 39
Full Adder.
Dr. Munaf Salim 40
Assignment
4/15/2015
21
Dr. Munaf Salim 41
Assignment