i have homework and i want to solve it Write the VHDL code for a 32-Bit Subtractor, using a Carry Look Ahead adder and then simulate it. You must use the process statement in your code. For the subtractor use 2s Complimen can any one help me
All a process statement does in VHDL is execute when a signal in your parameter list changes. You would have to come up with the design for your 32 bit subtractor and then figure out when you would want it to run. Then figure out the signal (or signals) that should trigger a process to help it execute. It would also be helpful if you had some code so we can get a better idea of what you're trying to do. There are many ways to implement this...
Calculating the adder’s next carry:COUT = Ci+1 = Ai.Bi + (Ai ⊕ Bi).Ci Ci+1 = Gi + Pi.Ci Generate Function:Gi = Ai.Bi The Gi is equal to binary 1 when both A and B are binary 1, regardless of the value of the incoming carry to the stage Ci,Propagate Function:Pi = (Ai ⊕ Bi) The function Pi is equal to binary 1 when either A and B is binary 1, in this case a carry out is produced if Ci =1
Calculating the Next carry for a Four-bit adder:C1 = G0 + P0.C0 C2 = G1 + P1.C1 = G1 + P1.G0 + P1.P0.C0 C3 = G2 + P2.G1 + P2.P1.G0 + P2.P1.P0.C0 C4 = G3 + P3.G2 + P3.P2.G1 + P3.P2.P1.G0 + P3.P2.P1.P0.C0 Calculating the Sum:Si = Ai ⊕ Bi ⊕ Ci = Pi⊕ Ci.