Lab 2 - EE-313 First Design Implementation

advertisement
Lab 2 - EE-313 First Design Implementation
Rev 01/15/2013
I.
Purpose:
A. Introduce and exercise the skills necessary to create, compile and test a basic Quartus
project.
B. Familiarize the student with fundamental coding nomenclature.
C. Reinforce knowledge of truth tables and Boolean expressions.
II.
Equipment:
A. Computer with Altera Software and web access
B. Altera DE2 Board with power supply and USB cable
III.
Pre-lab assignment:
A. Read Lab 02 Reading
IV.
Lab Procedure and Questions:
In this project, you will design a logic circuit that allows a light to be turned on or off from
any of three locations. The signal from the light switches can be considered as inputs A, B,
and C to your circuitry. The output of the circuitry Y will be the signal that turns on or off
your light. Use the following design requirements to aid in the completion of the project.
Project Name:
Inputs:
Outputs:
•
yourlastname_lab02
Name
Target
A
SW[2]
B
SW[1]
C
SW[0]
Y
LEDG[8]
AO
LEDR[2]
BO
LEDR[1]
CO
LEDR[0]
Table 1
Note that AO, BO and CO are simply the inputs A,B, and C passed
to an LED to verify proper operation of the switches.
A
0
B
0
C
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
Y
0
1
1
0
1
0
0
1
A. Determine the Sum Of Products expression for the output Y.
All product terms should be minterms. A minterm is a product term that includes each
input variable.
Lab 2 - EE-313 First Design Implementation
Rev 01/15/2013
B. Using the required reading and Altera Quick Reference guide as a reference, create a
new Quartus II project.
1.
2.
Ensure you use the proper project name.
Ensure you create the project in a unique directory owned by you.
C. Implement the logic expression Y using VHDL by creating a new VHDL file that is part of
your newly created project.
1.
2.
3.
4.
5.
The entity name should be threewayswitch.
The entity filename should be threewayswitch.vhd.
The inputs and outputs should be of type STD_LOGIC
Ensure you create the project in a unique directory owned by you.
Use the example in the Pre-Lab Reading to assist.
D. Create a symbol file for the threewayswitch
E. Create a new block diagram/schematic file that connects your three way switch to input
and output pins.
1.
The filename for the schematic should match the project name.
(ie. yourlastname_lab02.bdf )
2.
Name the pins per in accordance with Table 1.
F. Compile the project to ensure no errors. Debug as necessary.
G. Assign pins per the quick reference guide.
H. Re-compile the project.
I.
Program your Altera board
J.
Verify proper operation of the circuit.
K. Demonstrate the proper operation of your circuit to the instructor.
L. Questions
1.
List the operators you used in your VHDL code.
2.
List the reserved words you used in your VHDL code.
3.
List the data types used in implementing your circuit.
4.
What is the assignment operator?
Download