Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Other Engineering Expert

Lab: Value Display in Hex and Decimal

Objectives

• Produce a hierarchical design using Verilog submodules
• Develop a testbench for a module
• Implement a design on the DE2 board Constraints

Overview

In this lab you will extend the adder you developed in Lab to display the operands and sum on the 7-segment displays of the DE2 board.

Details

As your first steps in using the DE2 board, you will implement the adder you developed in Lab 1 by taking input from switches and displaying the operands and result on 7-segment displays. Your design should be entirely combinational, so as the user toggles the switches the display should change to match.

You are free to use any modeling technique that you determine is appropriate for the design. You may reuse your adder from Lab 1, you may recreate or modify your adder to match the Lab 2 requirements, or you may implement Lab 2 without a separate adder module.

In addition to implementing the adder, you will also develop a testbench for one submodule.

A blank project is provided for you on Learn, which includes the top-level module definition. Do not change the top-level module deftnition. To open the project for the first time, download the file to your system, open Quartus II, select Restore Archived Project from the Project menu, and select project file in the Archive Name field. After you have restored the project, you can open it through the normal process to open a project.

To help debug your system, the blank project includes a testbench for the top-level module. You can run the simulation by selecting Tools→Run Simulation Tool→RTL Simulation. If the waveform appears correct and you receive a message in the Transcript window (you may have to scroll up) that there are no errors, then your lab likely works correctly.

After your system passes the testbench, you will want to program the design into the DE2. Ensure you create the appropriate pin constraints so your design uses the correct FPGA pins. The DE2 User Manual lists all pinout information for the DE2 board.

Input

The operands to add together will come from the switches on the DE2 board. Each operand will be an 8-bit value with SW[16:9] producing one operand and SW[7:0] producing the other operand. SW[8] and SW[17] will not be used.

7- Segment Display

Use the following representations for values displayed on the 7-segment displays. While there are other valid representations, the testbench provided to you expects these formats. Note that 1 should appear on the right vertical segments.

1568_7-Segment Display.jpg

Operand Display

The operands should be displayed to the user on the 7-segment displays HEX7 through HEX4 in hexadecimal. The operand specified by SW[16:9] should be displayed on HEX7 and HEX6, with HEX7 the more significant digit. Similarly, the operand from SW[7:0] should be displayed on HEX5 and HEX4, with HEX5 the more significant digit.

Result Display

The result of the addition should be displayed on the 7-segment displays HEX3 through HEX0 in decimal. HEX3 is the most significant digit and HEX0 is the least significant digit. In order to display the result in decimal, you will need a BCD converter. A BCD converter appropriate for this lab is provided for you to use. Since your operands are each of 8 bits, your result must be of 9 bits to account for the carry that might occur.

Testbench

Testbenches provide a powerful mechanism for testing module functionality. Your task is to create a testbench for the BCD converter module provided to you. Your testbench should provide an exhaustive (all possible inputs) test of the BCD converter and display useful messages. You are encouraged, but not required, to create testbenches for other modules as well.

Name your testbench for the BCD converter bcd_converter_tb. Create a Test Bench entry in your project for the BCD converter testbench that you create.

When creating your BCD converter testbench, remember that Verilog has many useful mathematical operators, such as modulus.

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M91974646

Have any Question?


Related Questions in Other Engineering

Mine safety amp environmental engineering assignment -part

Mine Safety & Environmental Engineering Assignment - Part 1 - Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the fo ...

Assignment 11 what is the purpose of ore reserve and

ASSIGNMENT 1 1. What is the purpose of ore reserve and resource estimation? Why are resource and reserve estimates important to the mining industry? 2. What is meant by ore? What is meant by the term waste? How is the di ...

Control theory - lab reportsfor experiments 1 to 4 you must

Control Theory - Lab Reports For experiments 1 to 4 you must undertake the following: a) At the start of each section (including the pre-lab activities) there are a number learning outcomes. That is, what students should ...

Task 1using the lab kit design a circuit for the processor

Task 1: Using the lab kit, design a circuit for the processor to control the output of a connected 7-segment LED display device. You will be provided with a standard common anode 7-segment display of the type FND-507 (or ...

Question - show that the zero-point energy of a simple

Question - Show that the zero-point energy of a simple harmonic oscillator does not contribute to its entropy or heat capacity, but does contribute to its energy and Helmholtz function.

Select a risk problem from the list below and prepare a

Select a risk problem from the list below and prepare a risk management plan in accordance with AS/NZS ISO 31000:2009. Please ensure that: - Establish the context clearly, in accordance with the Standard; - Define your s ...

Mine safety amp environmental engineeringpart 1 questions1

Mine Safety & Environmental Engineering Part 1. Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the following terms ...

Question 1 define rock mechanics discuss the main

Question 1 . Define rock mechanics. Discuss the main objectives of the application of rock mechanics in mining. Question 2. Define stress. Draw a diagram and define the normal and shear stress by resolving the resultant ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

1 online discussion forum - post your proposed topic and

1. Online Discussion forum - Post your proposed topic and chosen data set as well as a short plan for the project. This is required for approval of the topic. As discussed, students must select unique topics, therefore i ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As