Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For 4'b1011 I need to add an input carry and generate a sum and a carry. I keep getting an error message saying that a

For 4'b1011 I need to add an input carry and generate a sum and a carry. I keep getting an error message saying that a value cannot be assigned to input carry_in whenever I try to compile the code, so I am not sure on what I am doing wrong with the code below.

In Verilog

4'b1011: begin out = inp1 + inp2; //adds an input carry, generates a sum & carry if (inp1 +inp2 > 1111) carry_in = 1; //figure out why carry_in =1 is blocking code from running else carry_out <= carry_in; end 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago