APPROXIMATE COMPRESSORS:-

	Firstly connect the circuit diagram in esim. In esim first go to new project then give project name then click ok open the schematic of the your project and using place component we can choose the components required to our circuit and place component in the schematic window and connect the circuit connections through wire as per circuit diagram and give component names and input output port names and annotate the circuit and check the ERC if there are no errors then generate netlist.to generate netlist go to spice select default format and click on generate the .cir file is generated.
For subcircuit click on subcircuit and click on newsubcircuitschematic and give subcircuit name and schematic window opens and go to file and append the schematic required  and annotate the circuit and check erc and generate netlist and click on kicad conversion then click on library editor and go to file and current library and select esimsubcircuit then ok and click on create component give component name and port name and click ok and take required shape (rectangle,square etc) and give pin name and pin number and input or ouput and place them to component and go to file and save the current library
 subcircuit created. And subcircuit can be used while designing the circuit.
For .cir file go to esim workspace and projectname and copy file and paste in the skywater130 folder.
Edit the .cir file remove all the slash and add .lib "models/sky130.lib.spice" tt and give input voltage delay time,rise time,fall time, timeperiod and pulse width and for plotting the output give plot(inputs/outputs).If any subcircuits present add .include subcircuit filename and save the file and select the file and right click go to FOSSEE and ngspice-nghdl and then bin and then click on ngspice.exe then open and run the file.

While implementing my circuit I have faced problem while running the .cir file waning:redefination of subckt sky130_fd_pr__nfet_01v8,ignored error after removing the   .lib "models/sky130.lib.spice" tt in subcircuit files output plotted

For my project first implemented the circuit and subcircuits my project consists of 3subcircuits(andgate,2_orgate,3_orgate) and designed schematic files for compressor5 and compressor6 and generated the netlist and copied the .cir files and .sub files to the skywater130 folder and edit the .cir files giving input and plotting and then save and run the file.the ngspice window opens and output waveform window opens.

While uploading .cir files I have uploaded compressor5 circuit .cir only 

compressor6 .cir file:-



* C:\Users\swapnareddy\eSim-Workspace\comp_6\comp_6.cir

.lib "models/sky130.lib.spice" tt

.include 3_or.sub
.include and_gate.sub
X1  vdd p0 p1 Net-_X1-Pad4_ and_gate		
X2  vdd Net-_X1-Pad4_ p2 p3 w1 3_or		
X3  vdd p2 p3 Net-_X3-Pad4_ and_gate		
X4  vdd Net-_X3-Pad4_ p4 p5 w3 3_or		
X5  vdd p4 p5 Net-_X5-Pad4_ and_gate		
X6  vdd Net-_X5-Pad4_ p0 p1 w2 3_or		
*U1  vdd p0 p1 p2 p3 p4 p5 w1 w3 w2 PORT		

Vdd vdd 0 3.3
Vd0 p0 0 pulse(0 1.8 0s 0s 0s 5us 10us) 
Vd1 p1 0 pulse(0 1.8 0s 0s 0s 5us 10us) 
Vd2 p2 0 pulse(0 1.8 0s 0s 0s 5us 10us) 
Vd3 p3 0 pulse(0 1.8 0s 0s 0s 5us 10us) 
Vd4 p4 0 pulse(0 1.8 0s 0s 0s 5us 10us) 
Vd5 p5 0 pulse(0 1.8 0s 0s 0s 5us 10us) 


.tran 0.1us 40us

.control
run

plot V(p0)
plot V(p1)
plot V(p2)
plot V(p3)
plot V(p4)
plot V(p5) 
plot V(w3)
plot V(w2)
plot V(w1)

.endc
.end
