 Spice was a program developed at Berkeley and it was written in Fortran. So Spice actually stands for simulation program for integrated circuit emulation which was developed at Berkeley. It was written in Fortran and after some time Berkeley decided that they cannot support this program anymore. But it was a hugely successful program and became the industry standard and all over the world the major program for simulating circuits. So it was not about to die because Berkeley had stopped supporting it. Many people then ported it to C and this program has been called by various names. So it was for some times called C Spice and then simply Berkeley Spice, B Spice. However that had lots of bugs and because it was volunteer work and being done at different centers it was difficult to centralize everything. Then a team took over and they have called it New Generation Spice. They have added some features to it, removed many bugs and made it much more usable. So that version is called NG Spice, New Generation Spice and that is the version that we have distributed to you and that is the version that we will be using. It is a circuit simulation program and as a circuit simulation program it actually is very similar in terms of its interface to IRSIM that you have already done. However it is a much richer program compared to IRSIM. First of all it is very good online help and the second thing is that there are many kinds of analysis that you can do. So IRSIM essentially does a transient simulation that namely it gives you waveform as a function of time, right. But of course it is done by Spice but apart from that the major kinds of analysis which you can do in NG Spice is DC analysis in which case you apply DC and find out bias points essentially bias point analysis of all the things and you can sweep DC voltages and see the result of sweeping those voltages. So that is the DC analysis. In addition to that you can do AC analysis. In AC analysis you set up the equivalent circuit and get the small signal response of a circuit, okay. So this is equivalent to doing it on paper but now having a more detailed version of this but this is a small signal analysis not a large signal analysis. So that is AC analysis and typically because the signal is small what you have is a plot of response versus frequency, okay. So there are other things you can do but it essentially gives you a Bode plot kind of output of a circuit, okay. Then you have transient analysis. This is very similar to the IRSIM analysis in the sense that you plot things as a function of time. You specify inputs as a function of time and you want to see as time evolves how the voltages or currents in various devices evolve, okay. So that is a transient analysis. In addition to that there are lots of other analysis. For example there is one for noise, okay. So it provides a very rich set of analysis that you can do on a circuit. You describe the circuit in a very similar style to IRSIM but the number of components which are available to you are now very large because IRSIM only knows resistors, capacitors and switches, okay. Whereas here you know JFET, bipolar transistor, all sorts of things, okay. What I am going to do is to show you one amusing problem that you can do using a bipolar and one op-amp simulation which you have already learnt in the class, okay. What I suggest is that we do the amusing problem definitely today and because you have notes for the op-amp simulation I will tell you a little bit about how to proceed but you can complete it at your sites, okay and that can also be a test of how well you have installed this software and so on you are able to run it or not, okay. This one is an image of the actual disc that you are going to receive. So I am going to do everything from here. So I go to the lab directory just this is what your CD is going to look like initially. So I will go to the lab and go to SPICE, okay. Now in this there are various circuits and so on in particular you would see that there is this op-amp dot circuit, okay. This is exactly the circuit that we have done in the class. So the entire thing has been made for you, you can simulate it and you can change the geometries etc etc and see the effect, right. So it will plot the amplitude as well as the phase of the output so that you can see its stability, change the value of the capacitor and so on. I will just, so this is for simulating actually not the 9 transistors op-amp but these are the various transistors, they have the same numbers mn3, mp3 etc etc which we have in the tutorial, okay. So you describe the circuit very similarly except that now each component has a name not just a type. So you have a name, most of you have probably done pSPICE. Everything has used pSPICE before, is there anybody who has never used any kind of SPICE? So everyone knows then, I do not have to describe how this input is described but one advantage you have in this version of SPICE is that at the end of it you can embed controls meaning the commands itself, it is like the cmd file of IRCM, okay. So you can say run this file then plot this number 20 star log so in db you plot the magnitude and plot in degrees the phase, okay and then end of control. So between dot control and dot NC whatever comes that is like the command file of IRCM. So it gets run for you so that whenever you run SPICE the plot already appears on the screen, the very first time around. Then of course you can go ahead and change and do other things, okay. So this is what I want to want you to do essentially at home, okay. This is what the file is but the point is that suppose you do not want to use this ready made file and create your own. Suppose the tutorial that we did evolve at 628 micro Siemens kind of calculations. So if you want to do it on your own how would you proceed then what you need are the transistor parameters, right. You need the early voltage, you need the k prime all those things which you use to get the conductance, right and to do that there are these circuits. So for example this one will drop the IDVD characteristic of an N channel transistor, okay. So by proceeding the saturation characteristics back to the negative x axis you can find the early voltage, right. This one will plot the IDVG, okay for example this. This will plot ID as a function of VG and by looking at the slope of this you can get k prime, mu C ox, right. So these are standard techniques for getting these parameters. So those are also included here. So essentially the idea is that first you run this on the special transistor you have. You are not using approximations, simple equations. You are using the full blown model of that silicon facility, draw the characteristics, calculate the values of early voltage k prime etc., etc. Now go through that tutorial, calculate your own geometries, edit those geometries in the op-amp dot circuit here, okay and now resimulate. So the whole idea is that your pain is minimized otherwise you know you do something and spice reports an error and then you do not know what is going wrong and by the time you have figured it out you have lost all patience, okay. So here is something which is running and you only make incremental corrections to it to get your own device, right. So that we will leave essentially as homework for you. Everything is here. First run it as it is in the tutorial mode as I said at that time then make small modifications run it and then write your own op-amp and run it, okay. That is in the same philosophy that we have been following for the labs otherwise. Now this is the amusing part and let us look at this. I will just read out a paragraph from here so that you can think about it. A Baxander tone control, I am sure all of you are familiar with tone control, okay. Any audio amplifier has a base control and a treble control, okay or you can have a spectral analyzer, you know spectrum equalizer. So these are all called tone controls and the requirement from them is that they increase or decrease the power only in a given frequency band whereas the total volume as far as possible is left untouched. So in this what we are going to analyze is a simple base and treble control which control frequencies only below a certain frequency and above a certain frequency leaving the mid-band unchanged, okay. The mid-band should be controlled by the volume control because if you change the entire power then the power, entire power will change. So we will design a circuit first. The entire thing is given here and the corresponding circuit is given in the dot CIR files here on your CD. You will run it and it is a single transistor bipolar circuit, okay. One of the interesting things is to ask the students to actually make it. After all it is just a single transistor circuit can be breadboarded very easily, okay and ask them to actually measure its passband characteristics and they can just add it to their amplifiers and so on and make awful sounding things actually because they tend to boost the base and create a lot of noise but essentially this is something which always generates a lot of interest in the students and it is a single transistor circuit that they can breadboard and use with their amplifiers. So that is why I said this is an amusing circuit but everything that you require for this including this file which gives you all the nodes, all the theory, all the circuitry, okay. So this PDF file is included and the corresponding simulation file is included. This is the simulation that we will actually do, okay. This documentation actually gives you the spice file as well but an electronic version of this separately is also available, okay. So this is what we are going to, we are not going to have too much time today. So this is what we are going to do in the lab leaving the op amp for simulation at home.