Вы находитесь на странице: 1из 5

Neuromorphic Engineering II Lab 2, Spring 2010 1

Lab 2 March 1, 2011


SPICE
The objectives of this lab are to:
Learn how to use SPICE for transient (time-stepping) circuit simulations. Unlike AC
simulations, which are linearized around a DC operating point, transient simulations
use the full nonlinear device model. As a result they are much slower but can reveal
large signal and transient (e.g. startup) behavior. They are also the only device-level
simulations possible for unstable or multistable circuits like clock generators, neuron
circuits, or ip-ops.
Simulate an integrate and re neuron circuit.
This week, we will use the software tool S-Edit to enter schematics and T-Spice to run
transient circuit simulations.
2.1 Reading
Read the lecture notes and revert to the online TSpice documentation (PDF les) when
looking for details.
2.2 Prelab
1. The prelab should be completed before any computer is touched.
2. This exercise asks you to write a spice netlist by hand. It is a tedious excercise, but
very useful.
a. Use the circuit diagram of Fig. 2.1 and write the circuit netlist using your favourite
text editor.
b. Use the labels nmos and pmos for the transistor models
c. Use a value of 500fF for the Capacitor.
d. As we will use the scale option, in the simulation, use dimensionless values for
L and W (e.g. W=12, L=6).
e. Save the le as myaxonhillock.sp
Neuromorphic Engineering II Lab 2, Spring 2010 2
Figure 2.1: Axon Hillock circuit.
f. Using the neuron circuit in Fig. 2.1, reason what happens to the membrane poten-
tial, Vmem, when a DC input current is injected in the node Vmem itself, and
charges up the membrane. Also explain how the spike output Vout of the circuit
behaves.
2.3 Simulation using Tspice
We will use the Tanner Tools to simulate the neuron circuit in Fig. 2.2. This is the rst
VLSI integrate-and-re circuit that was proposed by Carver Mead and colleagues in the
late eighties.
2.4 Experiments
The SPICE simulation will be run directly from within S-Edit: S-Edit can generate spice
les with both schematics and commands, in spice-format, and pass them to T-Spice. You
will learn to generate these les automatically, but also edit them by hand.
Experiment 1: Simulating the axon-hillock circuit
You will be running simulations from a le in which most of the work has already been
done for you. But you are requested to take notes of the simulations and hand-in a report in
which you print all the anwsers to the questions below and include the plots requested. In
the report, include the code of the myaxonhillock.sp le that you made in the prelab.
1. Copy the folder axonhillock from /projects/class/axonhillock/ to
Neuromorphic Engineering II Lab 2, Spring 2010 3
Figure 2.2: Axon Hillock circuit.
a local directory.
2. Launch sedit and open the le, and the axonhillock cell.
3. Study all of the options and settings in the Spice setup diag box, from the menu
SetupSpice Simulation. Consult the t-spice manual from the t-spice help menu.
4. Run a Spice simulation, and study the output. Find and plot the out and mem
waveforms. Are they like you expect them to be from the pre-lab? Explain why (or
why not).
5. What does the simulation option power-up do? How does the simulation differ
without this option?
6. Change the value of the feedback capacitor and experiment with values ranging from
10fF to 500fF. Run the simulations for at least 3 different value settings. What
changes in the simulations? Can you eplain why?
7. Change the input current (through the in voltage source) and re-run the simulation
until you get 10 spikes in total. Produce a plot the waveforms on separate windows,
with a zoomed version of just 2 spikes (and include it as a gure in the report).
8. Now switch to T-Spice, and open the netlist le axonhillock.sp (stored in a tempo-
rary directory). Study it, and see if the main structure differs from the spice-le you
wrote by hand. From the t-spice manual nd out how to measure the average current
owing through the n-FET of the rst inverter connected to Vmem, in the transient
analysis. Re-run the simulation, nd the measurement and note it in the report.
9. Find out how to measure the average power dissipated through the Vdd voltage
source, re-run the simulation, and print in the report the result obtained. What per-
centage of the total power budget is dissipated by the rst inverter?
Neuromorphic Engineering II Lab 2, Spring 2010 4
Figure 2.3: Axon Hillock circuit.
Experiment 2: Low-power silicon neuron
Here you will run simulations on a new silicon-neuron circuit, and compare its power dis-
sipation with the one of the standard axon-hillock circuit.
1. Copy the axonhillock into a new cell (e.g. soma lowpower).
2. Modify the new cell, and create a circuit like the shown in Fig. 2.3.
3. Run the simulation and verify that the circuit works as a silicon neuron.
4. Find the value of the input current that produces the same number of spikes used in
the axonhillock simulations, where you computed the average power dissipation (10).
5. Measure the average power dissipation of this circuit, by adding the right command
in the Additional spice commands of the S-Edit Spice-Simulation dialog window.
6. How does this power dissipation gure compare to the one of the axon-hillock cir-
cuit? What is the reason for this behavior? Explain this in the report.
Congratulations, you have done your rst transient simulation in SPICE. Perhaps now you
can understand why people both love and hate simulators. Never forget that this is only a
simulation, and even the best transistor models dont capture everything that is important
for analog (or even digital) circuit performance.
Neuromorphic Engineering II Lab 2, Spring 2010 5
2.5 What we expect
How to use basic SPICE commands to simulate circuits. What are the limitations of circuit
simulators? What characteristics of circuits do they not model? What makes a low-power
silicon neuron so low-power?
2.6 Next Week
Layout using LEDIT.

Вам также может понравиться