This is a project which demonstrates a 4-Bit ALU coded in Ngspice which was made as a part of the VLSI-Design course taken by me in the Monsoon 2023 Semester.
The implementation can perform four important operations on two 4-Bit Numbers:
- Addition
- Subtraction
- Comparator
- ANDing both numbers
The input from the user side are the two 4-Bit Numbers. Find below the select line combinations and their respective functions to help you select your desired operation you would like to test:
- Setting S1 = 0 and S0 = 0 performs Addition Operation.
- Setting S1 = 0 and S0 = 1 performs Subtraction Operation.
- Setting S1 = 1 and S0 = 0 performs Comparator Operation.
- Setting S1 = 1 and S0 = 1 performs ANDing Operation.
To run the project on your computer, you must have ngspice installed on your machine.
Clone the repo to your local machine and go to the directory.
Say you want to test the addition operation, then edit the alu.sp file and uncomment the appropriate lines both at the select lines section and in the plots section of the code.
Once done, run the following command in your terminal:
ngspice alu.sp