NOTE: Make sure that all the dip switches (blue box with small white sliding switches) are in the "down" (closest to front of board) position. Otherwise they may interfere with the proper operation of your design!
KB_INPUT.vhd |
|
Description: |
We provide this module for you in a completely functional
form. It will read the input from the keyboard and produce
as output a standard PS/2 representation of the key pressed
(note this is not the ASCII code of the character.)
|
Input: |
The global clock (for synchronization), the PS/2 clock and
data lines (from the keyboard) and the global reset signals
are all inputted to this module. (note: the
pushbutton switch labelled reset on the board is
active-low. Therefore, when you are using this signal, you
must convert it to active-high.)
|
Output: |
The keyboard scancode and a keyboard press signal are the
outputs from this module. The scancode
contains the information that you need. The
keyboard press signal
let you know when to read the scancode. Please examine
modules that we provide you, to find out that there is a
simple and standard way of using this signal |
KB_HEX.vhd | |
Description: |
This module is provided as a skeleton only, one which you
must complete for yourself. It takes the keyboard scancode
as input and converts it to hexadecimal. Invalid digits
should produce no change in the module's output. |
Input: |
The scancode and press signals from the KB_INPUT
module are inputted to this module. The press signal
facilitates synchronization of the module (i.e. lets the
module know when to read the scancode) |
Output: |
This module outputs the four-bit hexadecimal translation of
the scancode. |
PARITY.vhd | ||
Description: |
You must design this module from scratch. While you may
use the VHDL wizard to get a start on this module, the
body of the code, which the wizard does not
provide, must be written by you. This module calculates
parity of the hexadecimal input (which is derived from
the keyboard input) and outputs the parity as it would be
displayed on the 7-segment LED. Display to the LED is
coded by 7 bits as displayed below: To implement this design, we recommend you use a pair of processes in your code. A process is similar to a function in a traditional programming language; the process runs whenever a signal in its sensitivity list is changed. We recommend that you have one process that calculates the parity bit from the incoming hex signal and another that determines the LED output based on that parity bit. |
|
Input: |
The input to this module is the 4 bit hex value. | |
Output: |
A 7-bit std_logic_vector, representing the LED output, is outputted from this module. |
Lab2.vhd | |
Description: |
This is a higher level module that
describes how the other modules in the design interact
with each other. This description is accomplished in
Structural VHDL, and involves declaration and
instantiation of the modules involved. Moreover, when
synthesizing your design, you must ensure that this file
is used as the top level design of your circuit. We have given you most of the information for this design, but you must declare the signals to be used and connect the components correctly. |
Input: |
All inputs to the circuit must be ports in this file. These are the global clock signal, the global reset, and the PS/2 clock and data signals. |
Output: |
Similarly to the inputs, all outputs from the circuit must be ports in this file. These outputs are the 7-bit LED signal and the 4-bit hexadecimal signal, which is sent to the bargraph display. |