Lab 2: Functional Simulation Using Affirma Analog...
Transcript of Lab 2: Functional Simulation Using Affirma Analog...
1
Lab 2: Functional Simulation Using
Affirma Analog Simulator
This Lab will go over:
1. Creating a test bench
2. Simulation in Spectre Spice using the Analog Design environment
1. Creating a test bench:
Now that you have created a schematic and symbolic view of your nand2 it is time to create a test bench. This will be a virtual test bench, but it will have to have a power supply, input vectors, and a ground (plus the nand2) to test its transient response.
To create the nand2 test bench:
In the library manager, execute (LM)File>New>Cell View…. A pop-up like Figure 1 should appear. Fill it out exactly like Figure 1 and click on OK. The schematic editor will appear.
Figure 1: Creating the nand2 test bench.
2
In the schematic editor press i, and go to component browser, by clicking on the browse button, select library AMI06, and select your nand2 as in Figure 2. Stamp it down as shown in Figure 6.
While still in the add instance mode add the gnd and vdd global symbols and stamp them down as in Figure 6.
Add the power supply vdc, and two input signal source vpulse (in NCSU_Analog_Parts) according to Figure 6.
Figure 2: Adding the nand2 symbol to the test bench
Add the load resistor according to Figure 3. Make sure its value is 10G (gigaohm). Stamp it down as in Figure 6.
3
Figure 3: Adding a load resistor
Select the vdc source, execute (VLE)Edit>Properties> Objects… . Change its DC Voltage to 5V.
Select the vpulse source for input signal A., execute (VLE)Edit>Properties> Objects… . Fill-up the pop-up as in Figure 4.
4
Figure 4: Adding a test vector for input A
5
Select the vpulse source for input signal B, execute (VLE)Edit>Properties> Objects… . Fill-up the pop-up as in Figure 5.
Figure 5: Adding a test vector for input B
6
Figure 6: The completed test bench
To check for errors, execute (LM) File>Check and Save. If errors occur you must go back and correct them before proceeding to simulation.
You are now ready to simulate your nand2!, if there are no error.
2. Simulation
Now that you have created a schematic and symbolic view of your nand2 and created a test bench to test your nand2, it is ready to run simulation.
To simulate your circuit, Execute (CIW)Tools>ADEL>Simulation…. A pop-up like Figure 7 should appear. You will need to customize your environment the first time you run Affirma, execute (Affirma)Setup>Design…. A pop up appears and select the library, cell, and view name as shown in Figure 7. To view the schematic execute (Affirma)Session>Schematic Window….
7
Figure 7: Analog Design Environment (ADEL)
You will be using the Spectre simulator, which is a spice like simulator, using BSIM3 model decks, but the underlying algorithms are different. These algorithms are transparent to the user.
To select the model to be simulated, execute (ADEL) Setup>Design/nand2_TB. After that you need to select the model libraries. We need three libraries for the nand2 module i.e ami06p.m, ami06N.m and definitions.scs. These are located at location /opt/cds/class/local/public. Select all the three libraries execute (ADEL) Setup> Model Libraries.
Figure 8: Setting up the Model Libraries.
8
Now select the environment. By default it should look like figure 8.1
Figure 8.1: Selecting Environment.
After selecting the type of environment, now select the type of analyses. (ADEL) Analyses-> Chose. A pop up window will appear as shown below in figure 9. Select the response as trans. And the stop time is 60 ns.
9
Figure 9: Setting up the analysis
Now you need to choose which vectors you wish to plot out, by executing (ADEL)Outputs>To Be Plotted>Select On Schematic. Go back to your nand2 test bench schematic and click on the wires going into your nand2 and the wire between the output of your nand2 and the load resistor. The lines should change color as you select them. If you click on a pin it will probe the current and the terminal of the device you clicked will have circles drown around them.
Press the ESC key to get out of selection mode. Your ADEL pop-up should look like Figure 10, but the net names might be different.
10
Figure 10: Selecting which vectors to plot.
To simulate, execute (ADEL)Simulation>Run or by clicking on the green light icon . The CIW and the Affirma pop-up will show you the process it goes through to simulate your circuit. If all went well, a plot like Figure 11 should appear. The original plot is a combination of all the waveforms on the same axes. To obtain the plot in Figure 11, we execute (Affirma)Waveform Window)Axes>To Strip.
11
Figure 11: The simulation results of nand2
12
Figure 14: Measuring propagation delay.
To measure the low to high propagation delay go to waveform window and execute (WW)Markers>Cross Hair A and place it at the 2.5 volt position on the input signal (/net3) according to Figure 14. Repeat the same process for (WW)Cross Hair Marker B and place it at the 2.5 volt position on the output signal (/net10) according to Figure 14. You should get about 0.125ns delay = the time difference between two markers.
If the simulations worked, go back to the CIW and execute (CIW)Options>Save Defaults… and click OK on the pop-up. This will save your simulator environment, but not your plot settings.