Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started