Simulation with Spectre


We are going to do DC and transient analysis on the inverter we designed in previous section. We use spectre for simulation (similar to spice).


1.      Create new schematic cell view called inv_test(or inverter_test) in your ee103 library as shown in figure below.

2.      Place an inverter on the schematic window as shown below. This inverter is the one you created in the previous section. For this, hit i on the window, and then go to the ee103->inverter->symbol. To place voltage sources, choose NCSU_Analog_Parts -> Voltage_Sources. Choose Vpulse and VDC to be placed in the schematic. View and edit its properties using q. Place an instance of a capacitor to simulate the effect of loading on the inverter output, which you can find under NCSU_Analog_Parts -> R_L_C -> cap.



To label the nets (wires - eg), press l on the schematic window, and then type any desired names of wire. Move a cursor on the top of wires and click on it.


Since most of your other cells (eg Nand gate, Nor gate) would be using the same supply vdd and gnd, it is sometimes convenient to have them declared globally, so that you don't need to have a separate pin for the supply terminals within each cell. A global declaration can be achieved by labeling the net for the supply or ground or whatever is truly global in the circuit by a <labelname> followed by " ! " sign.


The figure above for the inverter shows that vdd! and gnd! are two global nets. Figure below is an example of the labeling for power supply.



The figure below is an example to edit and view the Vpulse source. You can always edit these entries at any time by pressing í«qí» after selecting a component. In the schematic window, we can see labels instead of direct wire connection. It is corresponding to wire connection.




3.      To start Spectre, click on Launch -> ADE L on the menu in the schematic window. Analog Design Environment window will appear as follows:



Click on the Setup->Simulator -> Directory -> Host. Choose spectre as your simulator. The figure below describes this procedure. The project directory indicates the location where all simulation files are dumped. Remember to clean this directory regularly so that you do not run out of space.


Click on Setup->Model LibrariesíŽ.. A Model Library Setup window will pop up. Enter following statements in the each box on the window as shown in figure below and press OK.






Note that this setting will vanish after closing Analog Design Environment window (at the end of your entire simulation endeavor)  thus we need to save these set-up. Click on Session -> Save in the Analog Design Environment window. Everytime you run simulation, you can load the previous session so that you do not have to enter the model path again.


4. To select analysis type, click on Analysis -> Choose in the Analog Design Environment window. Following 2 figures are examples of transient and dc analysis for inverter. Note that in the transient analysis, we choose 10u sec since the period of the input signal is only 2u sec.



5.      To run simulation, click on Simulation-> Run. We will see a pop-up window which is explain a procedure of the simulation.

6.      To see simulation results,


DC analysis :  click on Result/Annotate/DC node voltage or DC operating points.

We see results displayed on the schematic window with circuits.


Transient analysis : click on Result/Direct Plot/Transient signal


In the case of the transient result, after clicking on Result/Direct Plot/Transient signal, a cursor will move to the schematic window, automatically. Click on a wire where you want to see the voltage output. If you want to see current out, click on a node (and not on a wire).


After choose wires/nodes, hit ESC. We will see a results window as shown in figure below.