Skip to content

ENGR 2705 - Lab #9

Title:

Modular Design and Hierarchy

Objectives:
  • Combine previous labs to produce a more sophisticated logic circuit
  • Become familiar with Symbol Editor in Quartus II
Parts:
  • PC running Quartus II
  • Altera DE2 Board
Procedure:

Part 1: Previous Labs 

  1. Have designs from Lab #6, Lab #7, and Lab #8 available.  If your circuits did not work correctly then correct your circuits or get a working copy of the circuits from another student.

Part 2: Generate Symbols 

  1. Open the Lab #7 project and then open the verilog code file for the seven-sement display circuit.
  2. Create a symbol that represents the circuit by choosing Create Symbol Files for Current File under the Create/Update option from the File menu. This creates a default symbol for the circuit which symbol can be viewed and edited by the Symbol Editor.
  3. Verify that an appropriate symbol was created by opening the symbol (.bsf) file which is one of the types of Graphic Files.
  4. Edit the symbol if necessary so that inputs and outputs are in an appropriate order. The lsb should be at the top. Paste a copy of the symbol in your lab book.
  5. Repeat the creating of a symbol for the 4-bit adder circuit from Lab #6. Edit the 4-bit adder symbol arranging the x inputs to be together and the y inputs to be together with the lsb at the top of each group. Paste a copy of the symbol in your lab book.
  6. Create a symbol for the binary to BCD converter circuit from Lab #8 with the lsb of each group at the top on the symbol. Paste a copy in your lab book.

Part 3: Combine Circuits 

  1. Specification. Create a circuit that takes two 4-bit binary numbers, adds them together, and displays the sum as two decimal digits on two seven-segment displays.
  2. Define Inputs and Outputs. Draw a block diagram of the circuit showing the inputs and outputs for the circuit.
  3. Draw Logic Circuit. Using the New Project Wizard, specify (create) the working directory for this lab (you could name the directory lab09) and name this project Lab09 (or something similar). Use the Quartus II schematic editor to produce the circuit by combining the 4-bit adder, binary to BCD converter, and two seven-segment display cirucits to implement the complete circuit. In order to access the symbols of the previous labs, the previous projects will need to be included as libraries for this project by choosing Settings under the Assignments menu and adding them.
  4. Functional Simulation. Perform a functional simulation of the circuit. You do not need to simulate all input combinations. Simulate a few random combinations.
  5. Implement. Compile the circuit for the Cyclone II FPGA on the DE2 Board. Make appropriate pin assignments so that the input comes from the toggle switches and output goes an appropriate pair of seven segment displays.
  6. Timing Simulation. Perform a timing simulation of the circuit using the same input combinations used in the functional simulation. Note the propogation delay.
  7. Download Circuit. Download the circuit into the Cyclone II FPGA on the DE2 board.
  8. Test. Test the circuit. Record your results in you lab book.
  9. Show your working circuit to the instructor.
Conclusions:
  1. Discuss how well the objectives were met.
  2. Discuss what you learned.