Docsity

Two-Function Calculator - Laboratory 7 | ECE 238L, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 238 โ€“ Lab 7
Two-function Calculator
Introduction
At this time, you should be able to deal with combinatorial circuits, counters and sequence
detectors. The two-function calculator with special operations is intended to test your ability to
integrate several components together.
Directions
Consider the system represented by the block diagram showed in Figure 1.
Figure 1. Block diagram of the system.
The system must accept two parallel two-bit input unsigned numbers A and B, and multiply them
if the input Operation = 1, or add if Operation = 0. Let R be the result of this operation. Then, the
system has to count forward cyclically from 0 to 99 in steps of R, synchronously with the system
clock Clk. The counter stops if the serial sequence X = 1101 is entered, and restarts if a second
sequence X=1101 is detected. The output Output must display the counter value.
Before writing the VHDL description, draw the block diagram of the system and clearly show the
components it will composed of (e.g., adder, sequence detector, etc.) as well as the connections
among components. Then, write the VHDL code corresponding to each component. Simulate
each component individually. Finally, integrate the components into a top file, and simulate the
system.

Partial preview of the text

Download Two-Function Calculator - Laboratory 7 | ECE 238L and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

ECE 238 โ€“ Lab 7

Two-function Calculator

Introduction

At this time, you should be able to deal with combinatorial circuits, counters and sequence detectors. The two-function calculator with special operations is intended to test your ability to integrate several components together.

Directions

Consider the system represented by the block diagram showed in Figure 1.

Figure 1. Block diagram of the system.

The system must accept two parallel two-bit input unsigned numbers A and B , and multiply them if the input Operation = 1, or add if Operation = 0. Let R be the result of this operation. Then, the system has to count forward cyclically from 0 to 99 in steps of R , synchronously with the system clock Clk. The counter stops if the serial sequence X = 1101 is entered, and restarts if a second sequence X =1101 is detected. The output Output must display the counter value.

Before writing the VHDL description, draw the block diagram of the system and clearly show the components it will composed of (e.g., adder, sequence detector, etc.) as well as the connections among components. Then, write the VHDL code corresponding to each component. Simulate each component individually. Finally, integrate the components into a top file, and simulate the system.