CECS 225 LAB 01: Half Adder solution

$30.00

Original Work ?

Download Details:

  • Name: Lab-01-x3w0nf.zip
  • Type: zip
  • Size: 1,011.58 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Purpose: In this project you are asked to define and test a Half Adder

Objectives:

  • Continue to get familiar with EDAPlayground
  • Start to learn HDL (Verilog) basics
  • To understand binary addition

 

Step 1:  create module on the right panel

 

The Half Adder is a digital building block with 2 inputs (A, B) and 2 outputs (S, Cout).  The Half Adder logic must be modeled next. The circuit below shows the Half Adder logic circuit and the equivalent boolean equations:

 

out
S = A xor B

 

Cout = A and B

 

Binary Operator Symbols in Verilog

~ NOT
*, /, % mult, div, mod
+, – add,sub
<<, >> shift
<<<, >>> arithmetic shift
<, <=, >, >= comparison
==, != equal, not equal
&, ~& AND, NAND
^, ~^ XOR, XNOR
|, ~| OR, NOR
?: ternary operator

 

 

This completes the verilog module definition of the half adder.  Next it must be tested to ensure it works correctly.

 

 

Step 2:  Create a Half Adder Verilog Test Fixture.  To test a module for correct functionality, a set of inputs will be provided to produce an expected set of outputs.  A Verilog Testbench is used to test a Verilog source module.

 

Create the Half Adder test script.  To test a module for correct functionality, a set of inputs will be provided to produce an expected set of outputs.  For simple modules like the half adder a truth table is used to show the outputs that can be expected from a set of inputs.

The Cout output column shows that Cout equals 1 only when A equals 1 and B equals 1.

 

The S output column shows that S equals 1 when the value of A is not equal to the value of B.

 

 

 

Simulation results are shown as waveforms.

 

 

 

 

Finally, upload report to the project Dropbox in beachboard (refer to EDAPlayground Tutorial for report guidance)!

🚀 Custom Work, Just for You! 🚀

Can’t find the tutorial you need? No worries! We create custom, original work at affordable prices! We specialize in Computer Science, Software, Mechanical, and Electrical Engineering, as well as Health Sciences, Statistics, Discrete Math, Social Sciences, Law, and English.

✍️ Custom/Original Work Essays cost as low as $10 per page.
💻 Programming Custom Work starts from $50.

🔥 Get top-quality help now! 🔥

Get Your Custom Work