Forum Discussion
Altera_Forum
Honored Contributor
11 years agoVHDL : Problem with 4-Bit Adder and Subtractor !
Hi I want to make a 4-Bit Adder and Subtractor with VHDL I have created 1-Bit Full-Adder , XOR Gate ( for Subtract ) and a 4-Bit Adder as shown below : Full-Adder :
LIBRARY ieee; USE i...
Altera_Forum
Honored Contributor
11 years agoYou cant make the rule in the code when you treat the code as if it were a programming language. But this is not a programming language, it is a hardware description language - therefore you need to know what the hardware will be before you write the code!
You need to take a step back, and draw the circuit you expect. If you dont know what to expect, then you need to go and get a text book on digital logic design. Trying to treat VHDL as if it were a programming language just leads to bad results, or just no results at all.