Here is the assignment "For this project, you will be taking in two 4 bit inputs (A and B), adding them
together, and then decoding the result into a format that a 7 Segment display
supports. You must also indicate any overflow with an “o” on the display. "
Everyone is struggling very hard with this because of our lack of knowledge and bad professor. I have this code:
I read in a wiki that this SHOULD take in two 4bit inputs and add them together, but how do I decode this into something a 7 segment display could use? Very confused. Thanks for any help!
EDIT: There is a pretty good chance I'm completely wrong, if so, how do I even go about doing this?
together, and then decoding the result into a format that a 7 Segment display
supports. You must also indicate any overflow with an “o” on the display. "
Everyone is struggling very hard with this because of our lack of knowledge and bad professor. I have this code:
Rich (BB code):
module Proj2Module(
input [3:0] a,
input [3:0] b,
output [3:0] sum,
output carry
);
wire cin;
assign cin = 1'b0;
SingleStage s0( .a( a[0] ), .b( b[0]), .cin( cin ), .s( sum[0]), .cout( ripple0 ) );
SingleStage s1( .a( a[1] ), .b( b[1]), .cin( ripple0 ), .s( sum[1]), .cout( ripple1 ) );
SingleStage s2( .a( a[2] ), .b( b[2]), .cin( ripple1 ), .s( sum[2]), .cout( ripple2 ) );
SingleStage s3( .a( a[3] ), .b( b[3]), .cin( ripple2 ), .s( sum[3]), .cout( carry ) );
endmodule
EDIT: There is a pretty good chance I'm completely wrong, if so, how do I even go about doing this?
Last edited: