Previous

Testing the Design

After configuring the XC4003E with the Watch design, the functionality can be manually tested and observed on the LED Displays. The Watch design implements the functionality of a stopwatch.

The stopwatch counts up to 1 minute and starts over displaying tens of seconds, seconds, and tenths of a second. The stopwatch waits for a start command, counts until a stop command, holds the value that it was stopped at, and can either start again from that value or be reset.

The FPGA demonstration board has a row of eight rocker switches (SW3) and two buttons (RESET and SPARE) that provide input to the design.

Table 9_5 Schematic Labels vs. Demo Board Switches

Watch Design Signal
Demo Board Switch/Button
CLK_SELECT
SW3-8
RESET
SW3-7
GRST
RESET
STRTSTOP
SPARE

In the Watch design, the SW3-7 selects the clock source, SW3-8 is a synchronous state machine reset, the RESET button is a global asynchronous reset, and the SPARE button starts and stops the stopwatch.

To operate the stopwatch function, follow these steps.

  1. Open switches SW3-7 and SW3-8.

    This selects the internal oscillator as the system clock and de-asserts the state machine synchronous reset.

  2. Press the RESET button to reset the stopwatch to 00.

  3. Press the SPARE button to start the count.

    The tenths of a second are displayed on the lower row of eight LEDs starting from D16 to D9. D16 represents 0.2 and D9 represents 0.9 seconds.

    The seconds are displayed on the right-hand side seven segment LED display U8.

    The tens of seconds are displayed on the middle seven segment LED display U7.

  4. Press the SPARE button again to stop the count.

    The LED displays hold the value at which the count was stopped at.

  5. Press either the SPARE button again to resume count or the RESET button to reset the count to 00.

Next