37
Lines 40-51:
If the scan code in the shift register matches the codes for the digits 0-9,
then the right LED digit segments will be activated to display the corresponding digit.
If the scan code does not match one of these codes, the letter ‘E’ is displayed.
The steps for compiling and testing the design using an XS40 combined with an XStend
Board are as follows:
n
Synthesize the VHDL code in the KEYBRD40\KEYBRD.VHD for an XC4005XL
FPGA.
n
Compile the synthesized netlist using the KEYBRD40.UCF constraint file (
Listing 21
).
n
Mount an XS40 Board in the XStend Board and attach the downloading cable from
the XS40 to the PC parallel port. Apply 9VDC though jack J9 of the XS40. Place
shunts on jumpers J4, J7, and J8 to enable the LEDs. Remove the shunt on jumper
J17 to keep the XStend codec from interfering. Set all the DIP switches to the OPEN
position.
n
Attach a keyboard to the PS/2 connector of the XStend Board.
n
Download the KEYBRD40.BIT file into the XS40/XStend combination with the
command:
XSLOAD KEYBRD40.BIT
.
n
Press keys on the keyboard and observe the results on the LED displays.
n
The steps for compiling and testing the design using an XS95 combined with an
XStend Board are as follows:
n
Synthesize the VHDL code in the KEYBRD95\KEYBRD.VHD for an XC95108 CPLD.
n
Compile the synthesized netlist using the KEYBRD95.UCF constraint file (
Listing 22
).
n
Generate an SVF file for the design.
n
Mount an XS95 Board in the XStend Board and attach the downloading cable from
the XS95 to the PC parallel port. Apply 9VDC though jack J9 of the XS95. Place
shunts on jumpers J4, J7, and J8 to enable the LEDs. Remove the shunt on jumper
J17 to keep the XStend codec from interfering. Set all the DIP switches to the OPEN
position.
n
Download the KEYBRD95.SVF file into the XS95/XStend combination with the
command:
XSLOAD KEYBRD95.SVF
.
n
Press keys on the keyboard and observe the results on the LED displays.
•
Listing 20:
VHDL code for receiving keyboard scan codes from the PS/2 interface.
001- LIBRARY IEEE;
002- USE IEEE.STD_LOGIC_1164.ALL;
003-
004- ENTITY kbd_read IS
005- PORT
006- (
Summary of Contents for XStend XS40
Page 17: ...16 Figure 5 Programmer s model of the XS40 XStend Board combination...
Page 18: ...17...
Page 20: ......
Page 31: ......
Page 33: ......
Page 41: ......
Page 58: ...Appendix A XStend Schematics...
Page 59: ...XStend V1 3 XS Board Connectors...
Page 60: ...XStend V1 3 RAM...
Page 61: ......
Page 62: ...XStend V1 3 Stereo Codec...
Page 63: ......