VIET NAM NATIONAL UNIVERSITY HO CHI MINH CITY – UNIVERSITY OF
TECHNOLOGY FACULTY OF ELECTRICAL AND ELECTRONICS ENGINEERING
DEPARTMENT OF ELECTRONICS
--oOo—
INTRODUCTION TO COMPUTING
LABORATORY MANUAL
0
0
TABLE OF CONTENT
ABOUT THE MANUAL................................................................................................... 1
LAB 1:
IMPLEMENTATION OF BOOLEAN FUNCTION ON BREADBOARD
WITH LOGIC GATES AND FUNCTIONAL ICS ............................................................................2
A.
PRELAB................................................................................................................. 2
I.
IMPLEMENTATION OF DIGITAL CIRCUIT ON BREADBOARD.............2
II.
QUESTIONS.......................................................................................................... 6
B.
LAB MANUAL.................................................................................................... 13
I.
OBJECTIVES.......................................................................................................13
II.
LAB PREPARATION:.........................................................................................13
III.
LAB INSTRUCTION:.........................................................................................13
LAB 2:
IMPLEMENTATION OF BASIC LOGIC GATES AND FUNCTIONAL
ICs ON FPGA................................................................................................................. 26
A.
PRELAB............................................................................................................... 26
B.
LAB MANUAL.................................................................................................... 34
I.
OBJECTIVES.......................................................................................................34
II.
LAB PREPARATION:.........................................................................................34
III.
LAB INSTRUCTIONS........................................................................................ 34
APPENDIX 1:
QUARTUS AND UBUNTU INSTALLATION ON WINDOWS. 48
A.
UBUNTU INSTALLATION ON WINDOWS...................................................48
I.
Download and install Xming and WSL2:.......................................................... 48
II.
Install Ubuntu on Windows:............................................................................... 48
III.
Some basic commands in Linux..........................................................................51
B.
INSTALL QUARTUS 13.0SP1........................................................................... 53
APPENDIX 2:
DIGITAL CIRCUIT DESIGN FLOW USING
SYSTEMVERILOG....................................................................................................... 54
A.
DESIGN FLOW...................................................................................................54
B.
COMBINATIONAL LOGIC MODELING.......................................................55
I.
Problem................................................................................................................. 55
II.
Design....................................................................................................................55
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
2
C.
SEQUENTIAL LOGIC/FSM MODELING...................................................... 69
I.
Problem................................................................................................................. 69
II.
Problem analysis:................................................................................................. 69
III.
Design....................................................................................................................70
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
1
ABOUT THE MANUAL
This document is intended to serve as a lab manual for students enrolled in Introduction to
Computing Lab at HCMC University of Technology. All the Lab Experiment is designed for
students to:
- Implement combinational and sequential systems on testboard, using digital ICs.
- Implement digital systems on FPGA, using SystemVerilog.
There are 4 labs:
Lab 1 – Implementation of Boolean function on breadboard with Logic Gates and Functional ICs.
Lab 2 – Implementation of Boolean function on FPGA with Logic Gates and Functional Digital ICs.
Lab 3 – Implement Arithmetic Circuits and Sequential Circuit on breadboard.
Lab 4 – Implement Arithmetic Circuits and Sequential Circuit on FPGA.
In order to complete the lab on time, all students are required to do prelabs before each class.
0
0
Lab 1: Implementation of Boolean function on breadboard with logic gates and functional ICs
LAB 1:IMPLEMENTATION OF BOOLEAN
FUNCTION ON BREADBOARD WITH
LOGIC GATES AND FUNCTIONAL ICS
Student’s name:
Class:
Student ID:
Date:
A. PRELAB
IMPLEMENTATION OF DIGITAL CIRCUIT ON BREADBOARD
Breadboard is the component on which the circuits can be set up and external experiments
can be done. The information about usage is given in Figure 1.1 .
I.
Figure 1.1: Breadboard connections
Remember these points when implement digital circuits on breadboard:
- Inserting a DIP – Dual Inline Package:
Before you insert a DIP into the breadboard, make sure all pins are straight. When you
insert a DIP in the breadboard, make sure that the pins on one side of the DIP are not
connected to the pins on the other side of the DIP. This means that the DIP must straddle
one of the long gaps that divide the breadboard into separate sections.
- Providing access to the DIP:
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
3
As you wire your circuit, be sure to leave yourself easy access to the DIP's pins so that you
can touch them with a probe and so that you can replace the DIP without disconnecting any
wires. In particular:
Never pass a wire over a DIP. Instead, route the wires around the DIP.
When you run wires to a DIP, use the breadboard holes farther away from the DIP before
you use the holes that are closer.
- Removing a DIP:
Do not use your fingers to remove a DIP from the breadboard. It's too easy for your fingers
to slip, causing the DIP to twist. This results in bent pins. Instead, use a chip puller to gently
pull the chip up from the board.
- Input and output connections:
There are two logic levels of input data: HIGH (1) level and LOW (0) level. In this
course, almost digital ICs are TTL, in which HIGH level and LOW level are prescribed as
below:
Input: the signal is called HIGH when the voltage is between 2V and 5V, and LOW
when the voltage is from 0 to 0.8V.
Output: the signal is called HIGH when the voltage is between 2.7V and 5V, and
LOW when the voltage is from 0 to 0.5V.
We usually apply 5V to implement HIGH level signal and 0V for LOW level signal.
In this lab, DIP switches are used to supply input signal. Several ways of input connections
are shown in Figure 1.2; resistors in these circuits are usually chosen 10 Kohm. It is
recommended that students implement input circuit as in Figure 1.2 (c), in which the signal
equal 1 when the switch is at upper position and vice versa.
(b)
(a)
Figure 1.2: Input connections
0
0
(c)
Lab 1: Implementation of Boolean function on breadboard with logic gates and functional ICs
Outputs are commonly displayed in LEDs, bar-LEDs, 7-segment LEDs,… Figure 1.3
shows how to connect the output to LED; LEDs in the left circuit will be on when the signal is
1 while level 1 signal turn off the lights in the right circuit. Resistors in output circuits are
usually chosen 1 Kohm.
Figure 1.3: Output connections
Example: Implement function �(�, � ) = � +
-
Inputs: a,b.
-
.
Outputs: f.
-
ICs : 74HC32.
Figure 1.4: Implementation of Boolean function F(a,b) = a + b
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
4
Figure 1.5: Implementation of Boolean function F(a,b) = a + b – application circuit.
0
0
II.
QUESTIONS:
1. What is numbering principle in DIP IC?
2. Identify X, Y, Z, W in four circuits below:
3. If f1,f2,f3,f4 are respectively 0,1,1,0. Indentify status of each LEDs in below figure.
4. Hoàn thành bảng sau (xem datasheet của chúng)
IC
74LS00
Pins
Definition
4 cổng NAND
14-VCC; 7-GND; 3 = 1 nand 2; 6 = 4 nand 5; …….
0
0
74LS02
74LS04
74LS08
74LS32
74LS86
74LS125
74LS126
74LS138
74LS151
5. Compare IC 74LS125 and IC 74LS126. Explain the difference between these 2 ICs.
. � +
6. Implement boolean function �(�, �, �) =
� � : ICs and quantity:
Circuit implementation (remember to note pin numbers on ICs)
0
0
Lab 1: Implementation of Boolean function on breadboard with logic gates and functional ICs
7. Implement boolean function �(�, �, �) =
. � + � � using NAND2 gates (2-input
NAND gates).
Convert the function using NAND equivalents:
Circuit implementation (remember to note pin numbers on ICs)
8. Implement Boolean function �(�, �, �) = m1 + m3 + m6 (z is LSB):
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
8
Write F in SOP form:
List all ICs used to implement the circuit:
Circuit implementation (remember to note pin numbers on ICs)
9. Implement boolean function �(�, �, �) = m1 + m3 + m6, using NOR2 gates (2-input
NOR gates)
Convert the function using NOR equivalents:
Circuit implementation (remember to note pin numbers on ICs)
0
0
10. Given following circuit:
Write �(�, �, �) expression in SOP
Circuit implementation (remember to note pin numbers on ICs)
0
0
11. Implement �(�, �, �) = ∑(2,3,5,7) using IC 74LS151:
Draw the circuit that implement F using IC 74LS151 and logic gates:
Circuit implementation (remember to note pin numbers on ICs).
0
0
Lab 1: Implementation of Boolean function on breadboard with logic gates and functional ICs
12. Implement �(�, �, �) = ∑(0,3,4,7) using 74LS138:
Draw the circuit that implement F using IC 74LS138 and logic gates:
Circuit implementation (remember to note pin numbers on ICs).
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
12
B. LAB MANUAL:
I.
OBJECTIVES:
-
Getting familiar with TTL 74LS series IC.
Implementation of simplified Boolean functions with different logic gate combinations.
-
Getting to know functional combinational ICs.
LAB PREPARATION:
II.
Students have to complete Prelab before class. Students without lab preparation won’t
be allowed to join in the class.
LAB INSTRUCTION:
III.
EXPERIMENT 1
Objectives: Implementation of a function math � (� , � , �) = . � + � � in AND – OR form.
Equipments:
-
Analog Discovery Studio
Integrated Circuits (ICs) : 74LS04, 74LS08, 74LS32
Connection wires.
Procedure:
-
Construct the circuit and apply the power (remember to note pin numbers on ICs).
Apply all possible combinations to the inputs; obtain the output values then take note of
the output fTest in the Table 1.1.
x
0
0
0
0
1
1
1
1
y
0
0
1
1
0
0
1
1
z
0
1
0
1
0
1
0
1
fTest fnand
f
Table 1.1
0
0
Student’s implementation on breadboard:
Draw the schematic that implement F using NAND equipvalents.
NAND equipvalent circuit – application circuit.
0
0
-
Construct the circuit and apply the power (remember to note pin numbers on ICs).
Apply all possible combinations to the inputs and obtain and take note of the outputs
fNAND in the Table 1.1
Student’s implementation on breadboard
EXPERIMENT 2
Objectives: Implementation of a boolean function given in the truth table (Figure 1.2).
Equipments:
-
Analog Discovery Studio
Integrated Circuits (ICs) : 74LS04, 74LS08, 74LS32
Connection wires.
Procedure:
0
0
-
Construct the circuit and apply the power (remember to note pin numbers on ICs).
Apply all possible combinations to the inputs; obtain the output values then take note of
the output fTest in the Table 1.2.
Write the Boolean expression: F =
x
0
y
0
z
0
f
0
0
0
0
0
1
1
1
0
1
1
0
1
1
1
1
0
0
1
0
1
0
0
0
1
1
1
1
0
fTest fnor
Table 1.2
0
0
Student’s implementation on breadboard
Draw the schematic that implement F using NOR equipvalents.
NOR equipvalent circuit – application circuit.
0
0
-
Construct the circuit and apply the power (remember to note pin numbers on ICs).
Apply all possible combinations to the inputs; obtain the output value then take note of
the outputs fNOR in the Table 1.2.
Student’s implementation on breadboard
EXPERIMENT 3
Objectives: Implementation of a boolean function given in the following schematic.
Figure 1.6
Equipments:
-
Analog Discovery Studio
Integrated Circuits (ICs) : 74LS04, 74LS08, 74LS32, 74LS86.
Connection wires.
Procedure:
-
Construct the circuit and apply the power (remember to note pin numbers on ICs).
Apply all possible combinations to the inputs; obtain the output value then take note of
the outputs F1 in the Table 1.3.
x y z
0
F1
0
F2
Lab 1: Implementation of Boolean function on breadboard with logic gates and functional ICs
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1
1
1
Table 1.3
Student’s implementation on breadboard
Optimize boolean function F1 and draw the schematic: F2 =
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
19
- Construct the circuit and apply the power (remember to note IC codes and their pin numbers).
- Apply all possible combinations to the input; obtain the output value then take note of the
outputs F2 in the Table 1.3.
Student’s implementation on breadboard
Give your comments on F1 and F2 results:
EXPERIMENT 4
Objectives: Implementation of a Boolean function �(�, �, �) = ∑(2,3,5,7) by using a
8x1 Multiplexer.
Connection diagram and function table:
0
0
Equipments:
-
Analog Discovery Studio
Integrated Circuits (ICs): 74LS151, 74LS04.
Connection wires.
Procedure:
Draw the schematic diagram to implement the boolean function using 74LS151.
Application cicruit
0
0
Lab 1: Implementation of Boolean function on breadboard with logic gates and functional ICs
- Construct the circuit and apply the power (remember to note IC pin numbers).
- Apply all possible combinations to the inputs and obtain and take note of the outputs F Test in
the Table 1.4.
x
0
y
0
z
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
1
0
1
0
1
1
1
f
fTest
Table 1.4
Electronics Department
Ho Chi Minh City University of Technology, Vietnam
0
0
22