Chapter 2 –Using the DIO2
Board Part 1
1) Create a new project named chap2.
2) Download the cpld_control files to use the DIO2 board.
3) Unzip the files and place them in the chap2 directory.
4) Use “Add Source…” to add “cpld-control.v” and “sch1.sch” to your project.
5) Click on “CPLD_control” and choose “Create Schematic Symbol” from the “Design Entry Utilities” menu.
6) Double-click “sch1.sch” and update “cpld_control” if it asks. If all goes according to plan, you should see everything in a hierarchy similar to the window below.

7) Now that “sch1” is open, connect the buttons and switches to the LEDs. Save the file (you might have to use “Save As …”) and close the window.

8) Click “Edit Implementation Constraints File” and copy the contents of “example.ucf” into the file that appears.
9) Set the “Start-up clock” to “JTAG Clock” as in Chapter 1 and “Generate Programming File”.
10) Program the chip again and watch how the buttons and switches control the LEDs.
11) The CPLD_control block gives you access to read the buttons and switches as well as the LEDs. The 7 segment LCD has a built in decoder so that seg_high controls the top 2 four bit numbers. You can get more info from reading the DIO2 manual or just playing with the design.
1) Use the above example and the built in counters to create a visual counter on the 7 segment LED.
2) Create a 4 bit adder using the 8 switches as inputs and the 7 segment LEDs as output (in HEX).