I need help. I believe I did all 6 operations correctly and instantiated my muxes correctly to perform all 6 operations using that one 8-bit full adder module, but my operations aren't working. I provided my work that I did to get where I am at.
The operation of the arithmetic circuit is defined in the specification. Wire c0, c1, c2, c3, c4, c5, c6, c7, c8, w1, w3; //output to OpA on the full adder mux 2 to 1 mux a w1, opselect[2], OpA, OpA; Last-ditch effort search 01, 2024 12:46 AM //output to OpB on the full adder mux 4 to 1 mux b w3, opselect[1:0], OpB, ~OpB, 1b0, 1'b0; //full adder carry_in c (c0, opselect[2], opselect[1], opselect[0]; Full adder w1, w3, c0) full adder full adder full adder.
cin + B X X / A yes y y y, 1 A+1 end module module full_adder(sum, cout, a, b, cin); input a, b, cin; output sum, cout;
assign sum = a ^ b ^ cin; assign cout = a & b | cin & (a | b);
2x1 mux = OpA IO = OpA = 0 I1 = ~OpA = 1 4x1 mux = OpB IO = OpB = 00 I1 = OpB = 01 I2 = 1b0 = 10 I3 = 1b0 = 11 end module A A+B 0 A-B 0 0 cir module mux2tolout, S, I0, I1; input S, I0, I1; assign out = S == 1b0 ? I0 : S == 1b1 ? I1 : x; end module // - - module carry_in(cin, a, b, c); input a, b, c; output cin; wire bn, wi; not n1(bn, b);
A+1 B-A 0 "A 1 n = A B + C or a2 cin, w1, c); end module module mux4tolout, S, I0, I1, I2, I3); input [1:0] S; input [1:0] I0, I1, I2, I3; output out; assign out = S == 2b00 ? I0 : S == 2b01 ? I1 : S == 2b10 ? I2 : S == 2b11 ? I3 : x; end module //----