Neuromorphic Engineering II Lab 2, Spring 2010

download Neuromorphic Engineering II Lab 2, Spring 2010

of 5

description

Neuromorphic Engineering II Lab 2, Spring 2010

Transcript of Neuromorphic Engineering II Lab 2, Spring 2010

  • 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 ACsimulations, which are linearized around a DC operating point, transient simulationsuse the full nonlinear device model. As a result they are much slower but can reveallarge signal and transient (e.g. startup) behavior. They are also the only device-levelsimulations possible for unstable or multistable circuits like clock generators, neuroncircuits, or flip-flops.

    Simulate an integrate and fire neuron circuit.

    This week, we will use the software tool S-Edit to enter schematics and T-Spice to runtransient circuit simulations.

    2.1 Reading

    Read the lecture notes and revert to the online TSpice documentation (PDF files) whenlooking 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, butvery useful.

    a. Use the circuit diagram of Fig. 2.1 and write the circuit netlist using your favouritetext editor.

    b. Use the labels nmos and pmos for the transistor modelsc. 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 file 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, andcharges up the membrane. Also explain how the spike output Vout of the circuitbehaves.

    2.3 Simulation using Tspice

    We will use the Tanner Tools to simulate the neuron circuit in Fig. 2.2. This is the firstVLSI integrate-and-fire circuit that was proposed by Carver Mead and colleagues in thelate eighties.

    2.4 Experiments

    The SPICE simulation will be run directly from within S-Edit: S-Edit can generate spicefiles with both schematics and commands, in spice-format, and pass them to T-Spice. Youwill learn to generate these files automatically, but also edit them by hand.

    Experiment 1: Simulating the axon-hillock circuit

    You will be running simulations from a file in which most of the work has already beendone for you. But you are requested to take notes of the simulations and hand-in a report inwhich you print all the anwsers to the questions below and include the plots requested. Inthe report, include the code of the myaxonhillock.sp file 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 file, and the axonhillock cell.

    3. Study all of the options and settings in the Spice setup diag box, from the menuSetupSpice 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 memwaveforms. Are they like you expect them to be from the pre-lab? Explain why (orwhy not).

    5. What does the simulation option power-up do? How does the simulation differwithout this option?

    6. Change the value of the feedback capacitor and experiment with values ranging from10fF to 500fF. Run the simulations for at least 3 different value settings. Whatchanges in the simulations? Can you eplain why?

    7. Change the input current (through the in voltage source) and re-run the simulationuntil 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 figure in the report).

    8. Now switch to T-Spice, and open the netlist file axonhillock.sp (stored in a tempo-rary directory). Study it, and see if the main structure differs from the spice-file youwrote by hand. From the t-spice manual find out how to measure the average currentflowing through the n-FET of the first inverter connected to Vmem, in the transientanalysis. Re-run the simulation, find the measurement and note it in the report.

    9. Find out how to measure the average power dissipated through the Vdd voltagesource, re-run the simulation, and print in the report the result obtained. What per-centage of the total power budget is dissipated by the first 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 inthe axonhillock simulations, where you computed the average power dissipation (10).

    5. Measure the average power dissipation of this circuit, by adding the right commandin the Additional spice commands of the S-Edit Spice-Simulation dialog window.

    6. How does this power dissipation figure 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 first transient simulation in SPICE. Perhaps now youcan understand why people both love and hate simulators. Never forget that this is only asimulation, and even the best transistor models dont capture everything that is importantfor 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 circuitsimulators? What characteristics of circuits do they not model? What makes a low-powersilicon neuron so low-power?

    2.6 Next Week

    Layout using LEDIT.