A project on SR Flip Flop using CMOS Tecchnology. The project contains the CIR file needed to implement the SR flip flop using ngspice.
The SR flip flop is designed using PMOS and NMOS. Six PMOS and six NMOS are used for designing this circuit. The design was constructed using eSim software and is finally implemented using skywater 130nm pdk.


/Steps followed to execute the design

*The design of the circuit is made using eSim software. 
*Required mosfets are used and wired as specified in reference circuit diagram.
*Ports are connected for all the input and output sources.
*Electrical rules check is done to check for any error in connections. If there is any, error is fixed and then we move further. 
*Now the spice netlist(.cir) is generated in our eSim workspace.
*The spice netlist is modified by adding the sky130 models of the mosfets used in the circuit.
*After that the source voltage, clock, S and R inputs port are given. Transient analysis is done to get the required waveforms of our flip flop. 
*After saving the modified netlist, the CIR file is runned using Ngspice software and the final Q1 and Q2 waveforms are obtained.

/Follow below steps to download sky130 pdk and run ngspice

git clone https://github.com/google/skywater-pdk-libs-sky130_fd_pr
"skywater-pdk-libs-sky130_fd_pr-main folder" needs to be unzipped and the .cir file should be placed in the same folder where the unzipped sky130 pdk is available.

To run the .cir file ngspice needs to be downloaded: https://sourceforge.net/projects/ngspice/files/ng-spice-rework/ 
and the .cir file should be opened with ngspice

/Problems faced

At the beginning I was getting fatal error as the file was not placed in the correct location where the sky130 files were present. The issue was resolved by placing the .cir files in the proper location. 

On running the spice simulation, the waveforms obtained were unreadable. After giving appropriate pulse values in the input, the problem was finally resolved. 

Also, the Q' waveform was not obtained. It resolved after I changed the output names to Q1 and Q2.