CDA4203L Lab2-Verilog based circuit modeling and validation by simulation Solved

30.00 $

Category:

Description

5/5 - (1 vote)

Objectives:  To learn and practice Verilog based circuit modeling and validation by simulation.

Problem: Implement an ALU (Arithmetic Logic Unit) satisfying the following functional requirements. You should complete schematic capture tutorial, before you start on this lab. You should complete tutorial 2 before starting this lab.

 

Function Select (S)  S1    S0 Y
Invert  0      0 A
Add  0      1 A + B
Subtract  1      0 A – B
Double  1      1 2*A

 

Figure 1: ALU Port Interface and Function Table

  1. Behavioral Verilog: Design an ALU in behavioral Verilog with port interface and functionality as shown in Figure 1. Test the ALU functionality by simulation.  Include at least two vectors per function.
  2. Structural Verilog: Design the ALU in structural Verilog. Only use the following components: NOT, Full Adder, and 2-to-1 Mux.  First you need to develop behavioral Verilog module for each of the above components.  Then, you can instantiate these components to build the ALU. Test the ALU functionality by simulation.  Include at least two vectors per function. You may re-use the test bench you have created in Lab 1.

Deliverables: (1) a concise PDF report that includes your Verilog code and simulation results; (2) A zipped file of your design files (Verilog models and test benches).  Include a README file. Organize your files in folders named Problem1 and Problem2.

Report Organization (A template is provided on Canvas):

â–¡Cover sheet

â–¡Problem 1: Behavioral Verilog Code, Test Bench, and Simulation Results (Waveforms)

â–¡Problem 2: Behavioral Verilog for Components, ALU Structural Code, Test Bench, and Simulation Results (Waveforms)

 

  • Lab-2-Behavioral-and-Structural-Verilog-vbmq0l.zip