User Tools


Introduction to Digital Systems

In this lab you will familiarize yourself with digital numbers, digital systems, and applications of digital systems by experimenting with the digital FPGA development board that you will use throughout the semester.

Learning Outcomes

  • Become familiar with the lab FPGA board.
  • Learn about simple logic equations, binary numbers, and applications of digital systems.

Preliminary

  • You will need an active CAEDM account to log onto the computers in room 423 EB.
  • You will need a set of headphones to listen to instruction videos and perform the lab exercises. (This will be needed for the next few labs.)
  • You will need a notebook to be used as your lab book to record what you do for each lab. You will need to show what you record in your lab book to a TA as part of the pass off procedure.
  • Carefully read through the instructions for completing lab assignments.

Exercises

Exercise #1 - Introduction to the BYU Digital lab

In this exercise you will become familiar with the BYU digital lab, the equipment in the lab, and policies associated with the lab. Watch the following video to learn more about the lab and its policies.

BYU Digital Lab Overview

TAs and Digital Lab Help Queue

TAs are assigned to the Digital Lab to assist you with the labs during your lab section. Request TA help by placing yourself on the Digital Lab Help Queue. This queue is managed by an online server and will accept requests for help and display them for the TA (the queue is also often projected on the lab projector screen). The Help Queue is accessed from the following link: Digital Lab Help Queue. This link is also near the bottom of the sidebar to the left.

You will also need to use the Help Queue when you need to pass off your lab. The Help Queue is first come first serve with priority given to students who need to pass off.

Managing Files and Disk Space

The computers in the digital lab are managed by CAEDM, the College of Engineering and Technology computer support team. All users of these computers must conform to the CAEDM user policy including the food and drink policy. Review this policy to understand the appropriate uses of the facilities in this room.

You will generate a large number of files as you complete the lab exercises and it will be important to properly manage your files throughout the semester. You will have a number of files that you will want to save throughout the semester (primarily your source files) and many temporary files that you can ignore (the files generated during the synthesis of your digital circuits).

With a CAEDM account (which you are able to keep as long as you are a student) you are also given disk space to store your class files. This disk space will show up as the “J drive” on the lab computers. Read the Using CAEDM Storage (J Drive) tutorial to learn more about this disk space.

It is a good idea to make an ECEn220 folder in your J Drive, make a labs folder inside of that. You should also create a sub-directory for each lab in the course. You will be generating a lot of files for these labs and need to keep them separate.

So, why is the text below in red? You will be completing a lab writeup on Learning Suite. Things in the labs are marked red to signal to you that those things are some of what will be asked for as you complete the lab writeup. As you run across them, you should write the questions and answers in your lab notebook so when you go to complete the lab writeup you will have the information you need.

Indicate your CAEDM user ID.

When are you allowed to go in room 423 EB?

What food and/or drink is allowed in the room 423 EB?

How do you request help from TAs in the Digital lab?

Exercise 1 Pass-off: No pass-off for exercise 1. Answer the above questions on Learning Suite.



Exercise #2 - Introduction to the NEXYS 4 DDR Development Board

During the course of the semester you will build various digital systems using digital logic. You will complete these using the NEXYS 4 DDR development board. You will be using this board throughout the semester so it is important to familiarize yourself with the board and learn how to use it. In this exercise, you will use the NEXYS 4 development board to explore a variety of digital system functions.

A picture of this board is shown below and a corresponding board can be found at your lab station.

 NEXYS 4 DDR

In the center of this board is an Integrated Circuit (IC) device called a Field Programmable Gate Array or FPGA (this is the square device labeled ARTIX-7). This FPGA device is the heart of the board and contains the programmable digital logic that you will use in most of your lab exercises. An FPGA device is a programmable digital circuit that can be configured to perform many different functions based on the user's digital design. You will be creating digital circuit designs during the semester and placing these circuits onto the FPGA device. The circuit that is configured onto the FPGA is defined in a file called a bitstream. These files are created by software from the manufacturer of the FPGA. You will be creating your own circuit bitstreams throughout the semester, but not in this first lab. The following video provides an overview of this NEXYS4 DDR board:

Overview of the NEXYS4 DDR Board

After watching the video, check to make sure the blue jumpers are set as shown in the NEXYS4 jumpers tutorial. If they aren't, correct them.

What is the proper jumper setting of Jumper JP2? (You'll have to look closely at the board to find which one is JP2.)

Now, turn the NEXYS 4 board on using the switch in the top left corner of the board. When you first turn the board on, the FPGA device will be programmed with a configuration file for a digital circuit that is saved on the board's memory. This digital circuit implements a number of functions on the seven segment display, tri-color LEDs, switches, buttons, and VGA display. Once the FPGA has been configured (as indicated by the DONE LED), the circuit is operational. Answer the following questions about the functionality of this digital circuit:

What do you see on the seven-segment displays?

What happens when you flip the switches on the bottom of the board?

What is happening to the two tri-color LEDs in the center of the board by the FPGA?

Exercise 2 Pass-off: Summarize what the default program does, and explain what the two connecting cables do.

Exercise #3 - Digital Logic and Binary Numbers

In this next exercise, you will configure the FPGA with a different circuit. To use and experiment with this new circuit, you need to load this configuration, or bit, file onto the FPGA. You will be loading bit files on the the FPGA for every lab each week. You will be creating your own bit files in future lab assignments from the circuits you design.

Follow this tutorial to program the FPGA with the new bit file!

The FPGA should now be acting differently in its behavior than when you first powered it on.

Seven Segment Display

The NEXYS4 board has an 8 digit seven-segment display. You will create a circuit to control this display in a future lab.

Press different buttons on the board to see what happens to this display.When none of the buttons are pressed, the display on the right-most digit is determined by the settings of the first four switches (SW3-SW0). Determine the value of the digit for all 16 combinations of switches SW3-SW0. .

SW3 SW2 SW1 SW0 Digit
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1

Tri-Color LEDs

The NEXYS4 board also has two tri-color LEDs (labelled LD17 and LD 16 on the board). Each of these LEDs actually contains three LEDs one each for the colors red, green, and blue. Different colors can be made from different combinations of the colors. The color of both LEDs is determined by the values of SW6-SW4 (SW6 = Red, SW5 = Green, and SW4 = Blue). Determine the colors for all eight combinations of switches SW6-SW4 in the table below.

SW6 SW5 SW4 LED Color
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Single-Color LEDs

Above each of the 16 switches is a small green LED (labeled LD0 to LD15). The first five LEDs from right to left (LD0 to LD4) are each outputs to boolean logic equation based on switches 7-9. Add your completed table below to your lab report.

SW9 SW8 SW7 LD4 LD3 LD2 LD1 LD0
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Exercise 3 Pass-off: Show the steps you need to take to program the board with a bit file and briefly summarize what your program does.

Exercise #4 - VGA Display

The NEXYS4 is capable of producing video output from the VGA port found at the top of the board. Custom circuits must be designed for the board to generate video output. The circuit you programmed to the board earlier has been configured to drive the VGA display. This circuit generates a 1280×1024 image using tri-color “pixels” in each location. The circuit defines the red, green, and blue values at each of the 1,310,720 pixels.

Your board should be connected to your monitor with a VGA cable and the board's output can be viewed by changing your monitor's input source to VGA. The activities in this exercise will involve interacting with the NEXYS4 board and viewing its video output. The following tutorial explains how to change the video display input so you can look at the video generated by the NEXYS4 board:

Accelerometer

The NEXYS4 board has a 3-axis MEMS (Microelectromechanical systems) accelerometer. You'll notice that the circuit from this lab is constantly reading the accelerometer's value and displaying it. The magnitude of the acceleration from all three axes is shown as a bar graph on the right with X and Y drawn as a square. Lift the board with both hands while tilting it in different directions and describe what happens to the green square in the center of the accelerometer section of the display.

Audio

The NEXYS4 board also includes an omnidirectional MEMS microphone. This is located near the left middle of the board and is labeled MIC. This microphone uses an Analog Device ADMP421 chip to capture audio and digitize it into PDM (pulse density modulated) format. This chip is constantly digitizing the audio and sending the digital data to the FPGA device. You can see a waveform of this audio on the VGA display. The circuit is also configured to record the audio data and store it in the 128 Mega bit DDR memory. It will then play this stored audio file back on the audio out jack. Perform this experiment by following these steps:

  1. Attach your headphones to the Audio Out Jack of the NEXYS 4 board
  2. Press the up button, labeled BTNU on the board. Once you press this button, the circuit will save or record all audio. The recording is indicated by the LEDs turning on from left to right. Talk into the microphone during this recording time.
  3. After five seconds of recording, the circuit will then play back the audio. This playback is indicated by the LEDs turning on from right to left.

Describe what happens to the waveform displayed on the screen when you talk into the microphone.

Final Pass Off

To pass off your lab, show a TA the following:

  • Show that you completed the pass-offs for Exercise 2 and 3.
  • Show the FPGA board operating with the configuration file given to you in this lab
  • Briefly describe the overall layout you see on the VGA display.

How many hours did you work on the lab?

Provide any suggestions for improving this lab in the future.

Personal Exploration

As described in the Instructions for Completing ECEN 220 Laboratory Assignments tutorial, you are required to do a simple personal exploration exercise for some labs. The intent is to have you learn more by doing something additional.

Here are a few choices for personal exploration activities for this lab. Choose one and do it and describe it in your lab book:

  • Configure the FPGA with the original configuration bit file by repowering the board. Describe what is shown on the VGA display with the original circuit and compare it with the display with the configuration file provided in this lab.
  • View the temperature of the three different devices on the board and record their values. Discuss the differences in temperature. Why would the temperature on different parts be different?
  • The circuit configured on this FPGA has a secret six-bit code embedded in the logic. You can unlock this code by experimenting with the values on switches SW15-SW10. See if you can find this secret code by trying all combinations of SW15-SW10. Test your code by pressing the center button (BTNC). The code is only tested when BTNC is pressed. You should see different behavior on the LEDs when you press this button with the correct secret code.
  • Pressing BTNL will show a continuous counter counting with Hexadecimal. See if you can estimate the rate at which this counter is counting (i.e., counts per second).
  • Perform some more involved experiments with the microphone and audio out.
  • Perform experiments with the accelerometer.

Describe your personal exploration activities.


TA Notes and Feedback

testingA