Beruflich Dokumente
Kultur Dokumente
This thesis is submitted in part of the requirement for the Degree of Bachelor
Engineering (Electrical-Microelectronics)
JULY, 2012
UNIVERSITI TEKNOLOGI MALAYSIA
DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND
COPYRIGHT
Certified by:
NOTES: * If the thesis is CONFIDENTAL or RESTRICTED, please attach with the letter from
the organization with period and reasons for confidentiality or restriction.
SIMULATION OF STATIC RANDOM ACCESS MEMORY (SRAM) IN HSPICE
This thesis is submitted in part of the requirement for the Degree of Bachelor
Engineering (Electrical-Microelectronics)
JULY, 2012
ii
“I declared that I have read through this thesis and my opinion this report is sufficient
enough for fulfilling the standard of the thesis for the Bachelor Degree in Electrical
Engineering (Electrical-Microelectronics)”
Signature : ………………………………………..
Supervisor’s Name : DR. MICHAEL TAN LOONG PENG
Date : 04 JULY 2012
iii
DECLARATION
“I hereby declare that following project is the result of my own work expect for
commentaries and summaries that I had clearly stated the source”.
Signature : ………………………………………
I/C No : 880707-23-5064
DEDICATION
Special dedicated to
ACKNOWLEDGEMENT
First of all, I would like to express my heartfelt thanks and highly appreciation
to my respected supervisor, Dr Michael Tan Loong Peng for his assistances, invaluable
advices, encouragement, guidance, motivation and comments throughout this thesis.
I also wish to convey my gratefulness to my beloved family for their love and
support to succeed this thesis. Special thanks to all my friends and all whom had helped
and support me in one way or other during my project.
vi
ABSTRACT
The operation time of each operation is observed and compared. The complete
time taken for the read operation is higher than write operation. Static noise margin
(SNM) in the write and read operation are calculated and discussed. SNM during read
simulation are greater than write operation. The smaller the static noise margins values
the better the design. The sizing of each MOSFET are really important in order to drive
the circuit achieved the maximum performance.
vii
ABSTRAK
TABLE OF CONTENTS
PAGE TITLE i
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT v
ABSTRACT vi
ABSTRAK vii
TABLE OF CONTENTS viii
LIST OF FIGURES xi
LIST TABLE xiii
LIST OF ABBREVIATION xiv
1 INTRODUCTION
1.1 Background 1
1.2 Problem Statement 2
1.3 Objective 4
1.4 Scope 5
ix
2 LITERATURE REVIEW
2.1 Introduction 6
2.2 HSPICE 7
2.3 CosmosScope 8
2.4 SRAM 9
2.4.1 Determine Cell (6T) 10
2.4.2 Static Noise Margin (SNM) 14
3 METHODOLOGY
3.1 Introduction 16
3.2 Flow Chart 17
3.3 Circuit Modelling 18
3.4 Design in HSPICE 19
3.5 Simulation Work in CosmosScope 19
4.1 Introduction 20
4.2 Inverter Simulation 21
4.2.2 Normal Operation Simulation 26
4.2.3 Read Operation Simulation 31
4.2.4 Write Operation Simulation 36
x
5.1 Conclusions 41
5.2 Future Work 43
6 REFERENCES 44
7 APPENDIX 46
xi
LIST OF FIGURES
LIST OF TABLES
LIST OF ABBREVIATION
IC - Integrated Circuit
INTRODUCTION
1.1 Background
The Static Random Access Memory (SRAM) was created by using the HSPICE
software. The circuits performance of SRAM will be obtained through HSPICE and the
performance of circuit will be analyzed based on the waveform in generate from
CosmosScope.
According to this project, some major improvements are made from the previous
project methodology. Initially, the previous projects use the typical SPICE simulator
which is more complicated and need more step and process to finish the project. Start it
from design the schematic in S-Edit, proceed to draw the layout in L-Edit then
compared the net list in T-Spice. The problem will occur if both net lists are not same
and need to recheck the programmed from the start to solve the error.
3
The major advantage by design the cell in HSPICE is faster and efficient
compared to other typical SPICE. The difference is HSPICE is that is no need to place
the schematic symbol onto the layout.
4
1.3 Objective
There are two objectives in this project. The main objective is to predict the
performance of 16 bit SRAM using Predictive Technology Models (PTM) card. These
predictable models files are compatible with the standard circuit simulators, such as
SPICE. The PTM model 32nm is one of PTM version for sub-45nm bulk CMOS. It is
providing new modeling features of metal gate/high-k, gate leakage, temperature
effect, and body bias.
This project consists of two phase; simulation and modeling. To study the
circuit-level modeling of SRAM which use HSPICE to design and simulate the netlist
of 6T cell SRAMand CosmosScope to produce the output waveform to investigate the
characteristic of 6T cell SRAM during the write and read operation. Secondly, study
on the characterization of the static random access memory and lastly, analyzing and
interpreting the data.
CHAPTER 2
LITERATURE REVIEW
This chapter provides the background and reading of the project. These include a
detail description of each device and operation that involved in this project.
2.1 Introduction
The software that will be used in order to simulate the Static Random Access Memory
(SRAM) cell is HSPICE and CosmosScope. The netlists is designed in HSPICE and the
output waveform will be generated by using CosmosScope. The simulation and
investigation focused on 6T SRAM cell. Each bit in an SRAM is stored on four
transistors that form two cross-coupled inverters. This storage cell has two stable states
which are used to denote “0” and “1”. Two additional access transistors help controlling
the access to the cross coupled unit formed by the inverters during read and write
operations
7
2.2 HSPICE
HSPICE simulator is one of the products from the HSPICE Integrator Program.
It is able to generate the circuit in steady-state, frequency domains and also in the
transient state. Device reliability simulation and design yield process variability can be
done by using this program.
One of the advantages of the HSPICE is can produce the very useful graphs that
can design the project management and in engineering, which is graphical curves. This
software uses the synopsis which the accurate gold standard for simulate the circuit and
fully support the most accurate and expensive set of industry standard and propriety
simulation model. HSPICE precede the other program on both multicore and single
computers in term of the characterization application speed, extracted larger netlist,
designing 65nm and integrity of signal.
8
2.3 CosmosScope
The result of the statistical circuit can be easy analysing by use CosmosScope
software. The different type of session of multiple output files generated can be simply
open with the help of signal manager.
After simulate, any number of graphs complete with annotations, text variables,
and measurements can be saved. Then, in a later session, the graphs can be quickly
restored for modification or for use as the basis for a new graph. CosmosScope also
incorporates graph outlines that let designers apply axis-range labels, annotations, text
variables and measurements to new sets of waveforms; this allows definition of a
standard template for subsequent sets of graphs and measurements.
9
2.4 SRAM
There is two type of RAM, first is SRAM and second is DRAM. Both of this
RAM is very important in computer system application. SRAM use a static method (as
long as the electric power is supplied to the memory chip, the data will remain constant
and static) in order to stores the data. On the others hand, DRAM use the dynamic
method, which is mean, it is always need to refresh the data stored in the memory.
SRAM is faster and can save the use of power supply compared with DRAM.
The structure of SRAM is more complex compared with DRAM. DRAM is less
expensive to manufacture than SRAM. This reason SRAM is normally used in smaller
application like CPU cache memory and user electronic and DRAM at all time used in
larger application like main memory for personal computers.
The fewer transistors used and the smaller the cell the better the design. Due to
increasing of price of silicon wafer, using the smaller cell can reduce the total cost per
bit of memory. The cell that used less that 3T is calling DRAM. The command cell
used in SRAM is 6T. The structure of 6T SRAM cell is performing by 2 connection
inverter. The four transistors in the center form two cross-coupled inverters. In actual
devices, these transistors are made as small as possible to save chip-area, and are very
weak. Due to the feedback structure, a low input value on the first inverter will generate
a high value on the second inverter, which amplifies (and stores) the low value on the
second inverter. Similarly, a high input value on the first inverter will generate a low
input value on the second inverter, which feeds back the low input value onto the first
inverter. Therefore, the two inverters will store their current logical value, whatever
value that is.
10
Figure 2.2 below demonstrates the typical six-transistor cell used for CMOS
static random-access memories (SRAM). The cell consists of two cross-coupled CMOS
inverters that store one bit of information, and two N-type transistors that connect the
cell to the bit lines.
The function of the logical gate inverter is to output the opposite of the input.
This can be chained with other logic gates to allow for very complicate logic circuits.
All logical circuits can be constructed out of OR and the invertors. A power inverter, on
the other hand, is a device that can be used to convert DC current to AC. This allows to
run normal appliances (that require AC) off a battery (which delivers DC) or the like
.An inverter is an electrical device that converts direct current (DC) to alternating
11
current (AC); the resulting AC can be at any required voltage and frequency with the
use of appropriate transformers, switching, and control circuits. Inverters are commonly
used to supply AC power from DC sources such as solar panels or batteries.
Static inverters have no moving parts and are used in a wide range of
applications, from small switching power supplies in computers, to large electric utility
high-voltage direct current applications that transport bulk power.
12
There are three operations in SRAM simulation which is standby mode, read
operation mode and write operation mode. If the word line is not asserted, the access
transistors M5 and M6 disconnect the cell from the bit lines. The two cross-coupled
inverters formed by M1 – M4 will continue to reinforce each other as long as they are
connected to the supply. This operation is call standby operation.
In the read operation, word line is activated while the external word line driver
is disabled. The value can be determined by external logic if the inverter inside the
SRAM cell drives the bitlines.
In the write operation, in order to drive the bitlines, the big (external) tristate
drivers need to activate first. The previous state of the cross-couple can easily be
override. It is because the internal driver (small transistor used in the 6T SRAM cell) is
much smaller than the external drivers. Next, allowed the wordline transistors. Still,
when shafting the data, the short-circuit will happen for just a few nanoseconds.
13
So typically it takes six transistors to store one memory bit. The design of a
basic SRAM cell is shown in Figure 2.3. Access to the cell is enabled by the word line
(WL) which controls the two access transistors M5 and M6 which allow the access of
the memory cell to the bit lines: ‘BL’ and ‘BLbar’. They are used to transfer data for
both read and write operations. The presence of dual bit lines i.e. ‘BL’ and ‘BLbar’
improves noise margins over a single bit line. The operation of CNFETs based
memories is very similar to that of CMOS except for minor differences in device
orientation. One such difference being that the source and drain terminals of a CNFET
are not interchangeable as is the case with CMOS devices. Care must therefore be taken
to orient the transistors in a memory cell in a manner that will ensure correct
transmission of logic levels.
14
Static noise margin (SNM) is the maximum voltage amplitude of external signal
that can be algebraically added to the noise-free worst-case input level without causing
the output voltage to diverge from the allowable logic voltage level. SNM is the most
important parameters of SRAM cell because too compared which cell is better and as
DC disturbance present in logic gates. The concept of SNM for an SRAM cell is shown
the figure below.
The minimum noise voltage to flip the state of the cell at each of the cell storage
is called SNM. SNM can be obtained by drawing and mirroring the inverter
characteristics (left side and right side inverter of the 6T cell). Next, determine the
maximum square between both inverters.
CHAPTER 3
METHODOLOGY
3.1 Introduction
This chapter discusses the methodology and step that involved in this project.
This project implicates programming simulation and design only. This chapter also
explains the flow of the project step and the software involves in this project.
17
Figure 3.1shows the flow chart of this project. The first stage is literature review
on HSPICE and CosmoScope software and SRAM chip in general and 6T cell SRAM
structure in particular. All of the information that collected from the web site, related
books and from my supervisor need to be understood thoroughly.
Circuit modelling
Design in Hspice
Simulation in CosmosScope
There are 3 types of model that need to be design in this project which start from
the normal operation of SRAM cell then followed by the write operation and read
operation. The pull-up PMOS transistors is sized as twice or three-times the widths of
the pull-down NMOS transistors. It is because the mobility of PMOS is less than twice
or three time than the NMOS transistors. The size of both access transistor need to be
greater than the PMOS MOSFET and smaller than the NMOS MOSFET to achieve
higher design performance.
All 6 transistors and Word Line (WL), Bitline (BL) and BLB (BLB) are labeled
correctly. Node Q and QB are label in order to simply the process of design the netlist
in the HSPICE later. There are four processes in this step.
Inverter Netlist
Recalling that, HSPICE is used for circuit simulation and CosmosScope is used
to view output waveform. The simulation work of SRAM will be discussed more deeply
in the result and discussion part later. Time analysis and the characteristic of SRAM
will be diagnosed.
CHAPTER 4
4.1 Introduction
The first line of the SPICE file is always a comment line. Therefore any
statements on this line will be ignored. The .lib line includes the model file
32n.txt, which is assumed to be in the current running directory. The next two
lines are a PMOS and an NMOS transistor, respectively. After the transistor
name (which must begin with m), the source, gate, drain, and bulk nodes are
given.
22
Next is the model. The length and width are specified. The process is a
0.18um process, so 0.18um is the minimum gate length. Source and drain
perimeters and areas can also be specified here. The two supply nets are defined
next.
Several files are created by HSPICE: inv.ic: Text file containing the
circuit initial conditions inv.st0: Text files containing a summary of the
simulation inv.tr0: Binary files containing transient analysis waveforms.
Then compare the input and ouput on the same graph, simply click and
drag the title “v(out)” from the top graph to the bottom graph where v(in) is
plotted.
SRAM cell 6T
.lib "32n.txt" cmos_models
*source
**supply
vdd 4 0 dc 2
**access control
vwl wl 0 pulse(0 4 100u 100u 2m 8m)
**data
vbl bl1 0 dc 1
vblr blr1 0 pulse(0 1 5m 100u 100u 15m 1)
**control
vr_w r_w 0 pulse(0 1 0 1u 1u 10m 1)
*devices
**switches
GBL BL1 BL VCR PWL(1) r_w,0 0,1e20 1m,1e-20
GBLR BLR1 BLR VCR PWL(1) r_w,0 0,1e20 1m,1e-20
As explained in the inverter simulation, the first line of the SPICE file is
always a comment line. Therefore any statements on this line will be ignored.
The .lib line includes the model file 32n.txt, which is assumed to be in the
current running directory. As a access controller, a pulse of wordline (WL)
source is defined from 0 to 4 V with 100 micro second rise time, 100 micro
second fall time, 2ms pulse width, and 8ms repetition period. As a data
controller, pulse voltage of bitline (BL) source is defined from 0 to 1 V with
5ms delay, 100 micro second rise time, 100 micro second fall time, 15m pulse
width, and 1 repetition period. . As a controller, a write pulse voltage source is
defined from 0 to 1 V with 0s delay, 100 micro second rise time, 1 micro second
fall time, 10ms pulse width, and 1 repetition period.
The Figure 4.1 shows the simulation of SRAM 6T cell. From the Figure 2.2 the
output voltage at node Q is depending on WL and BL input. Once the WL and BL are
supply with input and voltage at node Q will start to increase, otherwise it will remain
zero. On the other hand, the output voltage at node QB is depending on WL and BLB.
WL control both side of inverter.
Figure 4.6 show the total MOSFET used is six; two PMOS MOSFET and four
NMOS MOSFET. The transient time is 0.10 second and the circuit took 0.20 seconds to
complete the simulation. This figure will only show when there is no error occur during
the simulation
31
The wordline (WL) and bitlines (BL) are held at VDDduring read operation.
Figure 4.8 shows how to extract the read static noise margin (SNM) of the cell.
First, the feedback from the cross coupled inverters is broken. Next, the voltage
of the inverter formed by half of the SRAM cell is found by sweeping Q (the inverter’s
input) from 0 to VDD and measuring QB (the inverter’s output). This plot is then used to
construct the “butterfly plot” that is representative of the two halves of the cell driving
each other. The read SNM is the side length of the maximum possible square that can fit
inside of the butterfly plot.
32
*one inverter
MPL Q QBN VDD! VDD! pmos L=33n W=33n
MNL Q QBN 0 0 nmos L=22n W=88n
*one inverter
MPR QB QN VDD! VDD! pmos L=33n W=33n
MNR QB QN 0 0 nmos L=22n W=88n
*access transistor
MNAL BLB WL QB 0 nmos L=22n W=44n
MNAR BL WL Q 0 nmos L=22n W=44n
The VDD supply was set to 0.95 V. The HSPICE simulator will give error if the
voltage is less than 0.25 V. It is happen because, the supply voltage need to be higher
than threshold voltage. Set the input for V(Q)= VDD and V(QB)=0 to store the logic “1”
in the cell initially. Write the logic “0” in the cell by set the V(BL)= VDD and V(BLB)=
VDD .
33
Voltage VNOISE is used to control the cell flipping of the output. It can be set
into any required number and did some investigation, VNOISE= 0.66 volt is the value
for this simulation project. Broken up the cell inside the 6T SRAM into the two parts.
Each part acts as inverter. Length of transistor is set as Figure 3.2.
During the read operation, when QB reaches the threshold voltage of the
NMOS, M3, the voltage at node Q starts to fall and the regenerative action of the cross-
coupled inverter will force the flipping on the bit in the cell. To prevent the read
operation failure the values of M5 should be strong enough to make sure the stability of
the operation can be achieved. The SNM value of the write operation is 0.1016V. The
total time to complete this operation is 0.22s
35
Since, Figure 4.11shows the total MOSFET used in read simulation is six, it
means there is no missing transistor in this simulation. The HSPICE simulation
calculates it correct and no error occur. The transient time is 0.08 second and the circuit
took 0.22 seconds to complete the simulation.
36
During a write operation, VDD is applied to the wordline and the value to be
written into the memory cell is driven onto the bitlines. Thus, Figure 3.4 illustrates how
to extract the write static noise margin (SNM). Again, feedback from the cross-coupled
inverters is broken and the voltage of the inverter is measured. Note however that in this
case, the voltages of the two halves of the SRAM are no longer the same (since one the
bitlines is driven to 0V, and the other to VDD). These voltages are used to create a
butterfly plot, and write SNM is the side length of the largest that can fit inside of the
butterfly plot.
*6Transistor SRAM
.TEMP 25.0000
.lib "32n.txt" cmos_models
.GLOBAL VDD!
.PARAM VDD = 0.95
.PARAM VNOISE = 0.66
.PARAM BITCAP = 1e-12
.OPTION POST
*one inverter
MPL Q QBN VDD! VDD! pmos L=32n W=32n
MNL Q QBN 0 0 nmos L=56n W=32n
*one inverter
MPR QB QN VDD! VDD! pmos L=32n W=32n
MNR QB QN 0 0 nmos L=56n W=32n
*access transistor
MNAL BLB WL QB 0 nmos L=38n W=37n
MNAR BL WL Q 0 nmos L=38n W=37n
VWL WL 0 DC=VDD
Same as read operation, the VDD supply in write operation was set to 0.95 V.
The HSPICE simulator will give error if supply voltage is less than threshold voltage.
Set the input for V(Q)= VDD and V(QB)=0 to store the logic “1” in the cell initially.
Supply the logic “0” to the bitline voltage by set the V(BL)= 0. Then give the value “1”
to the beltline bar, V(BLB)= VDD. The others values are same with the read operation.
Sizing of each transistor are set as table 4.1.
39
During the write operation, write Q=0 while Q= VDD. When the voltage at node
Q reaches a voltage so that the PMOS, M2, gets on, the voltage at note QB starts to rise
and the regenerative action of the cross-coupled inverter will force the write Q=0. To
prevent the write operation failure the values of M6 should be strong enough to make
sure the stability of the operation can be achieved. The SNM value of the write
operation is 0.051792V. The total time to complete this operation is 0.09s
40
Same as read operation, since, Figure 4.15shows the total MOSFET used in read
simulation is six; it means there is no missing transistor in this simulation. The HSPICE
simulation calculates it correct and no error occur. The transient time is 0.05 second and
the circuit took 0.09 seconds to complete the simulation.
CHAPTER 5
5.1 Conclusions
The SNM values of the read operation were higher than write operation. The
read static-noise-margin (SNM) deteriorates with decrease in supply voltage (VDD) and
increases with the transistor mismatch. This mismatch happens due to variations in
physical quantities of identically designed devices i.e., their threshold voltages, body
factor and current factor. Though SNM decreases at low VDD the overall SRAM delay
increases and moreover the read operation at low VDD leads to storage data destruction
in SRAM cells. The main operations of the SRAM cell are the write, read and hold. The
static noise margin is certainly more important at hold and read operations. Specifically
in read operation when the wordline is „1‟ and the bitlines are precharged to “1”. The
internal node of SRAM which stores “0” will be pulled up through the access transistor
across the access transistor and the driver transistor. This increase in voltage severely
degrades the SNM during read operation. The SNM deteriorates with the decrease in
supply voltage, at low VDD the read and write operations cannot perform properly. The
complete time for write operation is greater than the read operation because during read
operation, the cell need to wait the input from the outside to start operate, but in the
write operation the input is already store in the cell.
43
a. The used of voltage VNOISE is to control and check the output cell flipping.
In order to get the exact values of VNOISE, graphical technique can be used.
The polarity of the noise voltage sources at the input of each inverter. It
depends on the logic values of the bit stored in the cell.
b. The cell ration (ratio of the widths of pull-down NMOS and access
transistor) for read and pull-up ratio (ratio of the width of pull-up PMOS and
access transistor) for write can be determine first in order the get the exact
value of transistors by using hand calculation.
44
REFERENCES
APPENDIX
32 PTM Model