MANCHESTER ENCODER AND MILLER ENCODER:-

	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).To run the output go to command prompt and give specific paths related to .cir file ,there it will open a ngspice window and we will get required waveforms which we plot in command section.

While implementing my circuit I have faced problem while running the .cir file i.e In miller encoder we have to give data as bitstream but while giving bitstream it showing too many iterations in the covergence .so i have given each bits seperately and excueted.

For my project first implemented the circuit and subcircuits my project consists of 2subcircuits(manchester, tfliflop) and designed schematic files for miller encoder 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 (millercircuit) symbols.cir only 

symbols.cir file:-



* C:\Users\admin\eSim-Workspace\symbols\symbols.cir

.lib "models/sky130.lib.spice" tt
.include static.sub
.include toutput.sub
X1  vdd clk data Net-_X1-Pad4_ static		
X2  vdd Net-_X1-Pad4_ out toutput		
*U1  vdd clk data out PORT

Vdd vdd 0 3.3
Vd0 data 0 pulse(0 1 0s 0s 0s 4us 8us)
 	
Vd1 clk 0 pulse(1 0 0s 0s 0s 2us 4us)





.tran 0.1us 20us

.control
run

plot V(data)
plot V(clk) 
plot V(out)

.endc		
		

.end
