Module 1 General Aspects of Computer Organization
Module 1 General Aspects of Computer Organization
Microcontroller Microprocessor
It contains a large memory semiconductor It uses semiconductor memories, but does not
memories like cache and RAM. it also require secondary memories like hard disk, CD.
contains secondary storage like hard disks It sometimes has special memory called flash
etc. memory.
It is designed such that it can cater to It is designed such that it can cater to a particular
multiple tasks as per requirement. predefined task.
The Operating system and other software The operating system(mostly RTOS i.e Real
for the general-purpose computers, are Time Operating System) and other software
normally complicated and occupy more occupy less memory space.
memory space
Brief description of evolution of x86, ARM, and AVR computer families
Microcontroller versus general-purpose microprocessor
What is the difference between a microprocessor and a microcontroller? By microprocessor is
meant the general-purpose microprocessors such as Intel's x86 family (8086, 80286, 80386,
80486, and the Pentium) or Motorola's PowerPC family. These microprocessors contain no
RAM, no ROM, and no I/O ports on the chip itself. For this reason, they are commonly referred
to as general-purpose microprocessors.
A system designer using a general-purpose microprocessor such as the Pentium or the PowerPC
must add RAM, ROM, I/O ports, and timers externally to make them functional. Although the
addition of external RAM, ROM, and I/O ports makes these systems bulkier and much more
expensive, they have the advantage of versatility, enabling the designer to decide on the amount
of RAM, ROM, and I/O ports needed to fit the task at hand. This is not the case with
microcontrollers. A microcontroller has a CPU (a microprocessor) in addition to a fixed amount
of RAM, ROM, I/O ports, and a timer all on a single chip. In other words, the processor, RAM,
ROM, I/O ports, and timer are all embedded together on one chip; therefore, the designer
cannot add any external memory, I/O, or timer to it. The fixed amount of on-chip ROM, RAM,
and number of I/O ports in microcontrollers makes them ideal for many applications in which
cost and space are critical.
In many applications, for example, a TV remote control, there is no need for the
computing power of a 486 or even an 8086 microprocessor.
In many applications, the space used, the power consumed, and the price per unit are
much more critical considerations than the computing power. These applications most often
require some I/O operations to read signals and turn on and off certain bits. For this reason,
some call these processors IBP, "itty- bitty processors."
It is interesting to note that many microcontroller manufacturers have gone as far as integrating
an ADC (analog-to-digital converter) and other peripherals into the microcontroller.
Microcontrollers for embedded systems
In the literature discussing microprocessors, we often see the term embedded system.
Microprocessors and microcontrollers are widely used in embedded system products. An
embedded system is controlled by its own internal microprocessor (or micro- controller) as
opposed to an external controller. Typically, in an embedded system, the microcontroller's
ROM is burned with a purpose for specific functions needed for the system. A printer is an
example of an embedded system because the processor inside it performs one task only;
namely, getting the data and printing it. Contrast this with a Pentium-based PC (or any x86
PC), which can be used for any number of applications such as word processor, print server,
bank teller terminal, video game player, network server, or Internet terminal. A PC can also
load and run software for a variety of applications. Of course, the reason a PC can per- form
myriad tasks is that it has RAM memory and an operating system that loads the application
software into RAM and lets the CPU run it. In an embedded system, typically only one
application software is burned into ROM. An x86 PC contains or is connected to various
embedded products such as the keyboard, print- er, modem, disk controller, sound card, CD-
ROM driver, mouse, and so on. Each one of these peripherals has a microcontroller inside it
that performs only one task. For example, inside every mouse a microcontroller performs the
task of finding the mouse's position and sending it to the PC. Some embedded products like
Garage door openers, Answering machines, Fax machines, Home computers, TV, Cable TV
tuner, Camcorder, Remote controls, Lighting control, Paging, Toys, Exercise equipment, Fax
machine, Colour printer, Air bag, Instrumentation Security system, Transmission control use
Microcontrollers.
Brief description of evolution of x86, ARM, and AVR computer families
Three popular instruction set architectures (ISAs): x86, ARM and AVR. The x86 architecture
is found in nearly all personal computers (including Windows and Linux PCs and Macs) and
server systems. Personal computers are of interest because every reader has undoubtedly used
one. Servers are of interest because they run all the services on the Internet. The ARM
architecture dominates the mobile market. For example, most smartphones and tablet
computers are based on ARM processors. Finally, the AVR architecture is found in very low-
cost microcontrollers found in many embedded computing applications. Embedded computers
are invisible to their users but control cars, televisions, microwave ovens, washing machines,
and practically every other electrical device.
In its first year of operation, Intel sold only $3000 worth of chips, but business has picked up
since then (Intel is now the world’s largest CPU chip manufacturer). In the late 1960s,
calculators were large electromechanical machines the size of a modern laser printer and
weighing 20 kg. In Sept. 1969, a Japanese company, Busicom, approached Intel with a request
that it manufacture 12 custom chips for a proposed electronic calculator. The Intel engineer
assigned to this project, Ted Hoff, looked at the plan and realized that he could put a 4-bit
general-purpose CPU on a single chip that would do the same thing and be simpler and cheaper
as well. Thus, in 1970, the first single-chip CPU, the 2300-transistor 4004, was born. It is worth
noting that neither Intel nor Busicom had any idea what they had just done. When Intel decided
that it might be worth a try to use the 4004 in other projects, it offered to buy back all the rights
to the new chip from Busicom by returning the $60,000 Busicom had paid Intel to develop it.
Intel’s offer was quickly accepted, at which point it began working on an 8-bit version of the
chip, the 8008, introduced in 1972. The Intel family, starting with the 4004 and 8008, is shown
in Fig. 1-11, giving the introduction date, clock rate, transistor count, and memory.
All the Intel chips are backward compatible with their predecessors as far back as the 8086. In
other words, a Pentium 4 or Core can run old 8086 programs without modification. This
compatibility has always been a design requirement for Intel, to allow users to maintain their
existing investment in software. Of course, the Core is four orders of magnitude more complex
than the 8086, so it can do quite a few things that the 8086 could not do. These piecemeal
extensions have resulted in an architecture that is not as elegant as it might have been had
someone given the Pentium 4 architects 42 million transistors and instructions to start all over
again. It is interesting to note that although Moore’s law has long been associated with the
number of bits in a memory, it applies equally well to CPU chips. By plotting the transistor
counts against the date of introduction of each chip on a semilog scale, we see that Moore’s
law holds here too.
While Moore’s law will probably continue to hold for some years to come, another problem is
starting to overshadow it: heat dissipation. Smaller transistors make it possible to run at higher
clock frequencies, which requires using a higher voltage. Power consumed and heat dissipated
is proportional to the square of the voltage, so going faster means having more heat to get rid
of. At 3.6 GHz, the Pentium 4 consumes 115 watts of power. That means it gets about as hot as
a 100-watt light bulb. Speeding up the clock makes the problem worse.
In November 2004, Intel cancelled the 4-GHz Pentium 4 due to problems dissipating the heat.
Large fans can help but the noise they make is not popular with users, and water cooling, while
used on large mainframes, is not an option for desktop machines (and even less so for notebook
computers). As a consequence, the once-relentless march of the clock may have ended, at least
until Intel’s engineers figure out an efficient way to get rid of all the heat generated. Instead,
Intel CPU designs now put two or more CPUs on a single chip, along with large shared cache.
Because of the way power consumption is related to voltage and clock speed, two CPUs on a
chip consume far less power than one CPU at twice the speed. As a consequence, the gain
offered by Moore’s law may be increasingly exploited in the future to include more cores and
larger on-chip caches, rather than higher and higher clock speeds. Taking advantage of these
multiprocessors poses great challenges to programmers, because unlike the sophisticated
uniprocessor microarchitectures of the past that could extract more performance from existing
programs, multiprocessors require the programmer to explicitly orchestrate parallel execution,
using threads, semaphores, shared memory and other headache- and bug-inducing
technologies.
Introduction to the ARM Architecture
In the early 80s, the U.K.-based company Acorn Computer, flush with the success of their 8-
bit BBC Micro personal computer, began working on a second machine with the hope of
competing with the recently released IBM PC. The BBC Micro was based on the 8-bit 6502
processor, and Steve Furber and his colleagues at Acorn felt that the 6502 did not have the
muscle to compete with the IBM PC’s 16-bit 8086 processor. They began looking at the options
in the marketplace, and decided that they were too limited. Inspired by the Berkeley RISC
project, in which a small team designed a remarkably fast processor (which eventually led to
the SPARC architecture), they decided to build their own CPU for the project. They called their
design the Acorn RISC Machine (or ARM, which would later be rechristened the Advanced
RISC machine when ARM eventually split from Acorn). The design was completed in 1985.
It included 32-bit instructions and data, and a 26-bit address space, and it was manufactured
by VLSI Technology. The first ARM architecture (called the ARM2) appeared in the Acorn
Archimedes personal computer. The Archimedes was a very fast and inexpensive machine for
its day, running up to 2 MIPS (millions of instructions per second) and costing only 899 British
pounds at launch. The machine became very popular in the UK, Ireland, Australia and New
Zealand, especially in schools.
Based on the success of the Archimedes, Apple approached Acorn to develop an ARM
processor for their upcoming Apple Newton project, the first palmtop computer. To better
focus on the project, the ARM architecture team left Acorn to create a new company called
Advanced RISC Machines (ARM). Their new processor was called the ARM 610, which
powered the Apple Newton when it was release in 1993. Unlike the original ARM design, this
new ARM processor incorporated a 4-KB cache that significantly improved the design’s
performance. Although the Apple Newton was not a great success, the ARM 610 did see other
successful applications including Acorn’s RISC PC computer. In the mid-1990s, ARM
collaborated with Digital Equipment Corporation to develop a high-speed, low-power
version of the ARM, intended for energy-frugal mobile applications such as PDAs. They
produced the StrongARM design, which from its first appearance sent waves through the
industry due to its high speed (233 MHz) and ultralow power demands (1 watt). It gained
efficiency through a simple, clean design that included two 16-KB caches for instructions and
data. The StrongARM and its successors at DEC were moderately successful in the
marketplace, finding their way into a number of PDAs, set-top boxes, media devices, and
routers.
Perhaps the most venerable of the ARM architectures is the ARM7 design, first released by
ARM in 1994 and still in wide use today. The design included separate instruction and data
caches, and it also incorporated the 16-bit Thumb instruction set. The Thumb instruction set is
a shorthand version of the full 32-bit ARM instruction set, allowing programmers to encode
many of the most common operations into smaller 16-bit instructions, significantly reducing
the amount of program memory needed. The processor has worked well for a wide range of
low to middle-end embedded applications such as toasters, engine control, and even the
Nintendo Gameboy Advance hand-held gaming console.
Unlike many computer companies, ARM does not manufacture any microprocessors. Instead,
it creates designs and ARM-based developer tools and libraries, and licenses them to system
designers and chip manufacturers. For example, the CPU used in the Samsung Galaxy Tab
Android-based tablet computer is an ARM based processor. The Galaxy Tab contains the Tegra
2 system-on-chip processor, which includes two ARM Cortex-A9 processors and an Nvidia
GeForce graphics processing unit. The Tegra 2 cores were designed by ARM, integrated into a
system-on-a-chip design by Nvidia, and manufactured by Taiwan Semiconductor
Manufacturing Company (TSMC). It’s an impressive collaboration by companies in different
countries in which all of the companies contributed value to the final design. The design
contains three ARM processors: two 1.2-GHz ARM Cortex-A9 cores plus an ARM7 core. The
Cortex-A9 cores are dual-issue out-of-order cores with a 1-MB L2 cache and support for
shared-memory multiprocessing. (That’s a lot of buzzwords that we will get into in later
chapters. For now, just know that these features make the design very fast!)
The ARM7 core is an older and smaller ARM core used for system configuration and
power management. The graphics core is a 333-MHz GeForce graphics processing unit
(GPU) design optimized for low-power operation. Also included on the Tegra 2 are a video
encoder/decoder, an audio processor and an HDMI video output interface. The ARM
architecture has found great success in the low-power, mobile and embedded markets. In
January 2011, ARM announced that it had sold 15 billion ARM processors since its inception,
and indicated that sales were continuing to grow. While tailored for lower-end markets, the
ARM architecture does have the computational capability to perform in any market, and there
are hints that it may be expanding its horizons.
Along with various additional peripherals, each AVR processor class includes some additional
memory resources. Microcontrollers typically have three types of memory on board: flash,
EEPROM, and RAM.
Brief history of the AVR microcontroller
The basic architecture of AVR was designed by two students of Norwegian Institute of
Technology (NTH), Alf-Egil Bogen and Vegard Wollan, and then was bought and developed
by Atmel in 1996. You may ask what AVR stands for, AVR can have different meanings for
different people! Atmel says that it is nothing more than a product name, but it might stand for
Advanced Virtual RISC, or Alf and Vegard RISC (the names of the AVR designers).
There are many kinds of AVR microcontroller with different properties. Except for AVR32,
which is a 32-bit microcontroller, AVRs are all 8-bit micro- processors, meaning that the
CPU can work on only 8 bits of data at a time. Data larger than 8 bits has to be broken into 8-
bit pieces to be processed by the CPU. One of the problems with the AVR microcontrollers is
that they are not all 100% compatible in terms of software when going from one family to
another family. To run programs written for the ATtiny25 on a ATmega64, we must recompile
the program and possibly change some register locations before loading it into the ATmega64.
AVRs are generally classified into four broad groups: Mega, Tiny, Special purpose, and
Classic. ATmega32 is powerful, widely available, and comes in DIP packages, which makes it
ideal for educational purposes. For those who have mastered the Mega family, understanding
the other families is very easy and straightforward. The following is a brief description of the
AVR microcontroller.
AVR features
The AVR is an 8-bit RISC single-chip microcontroller with Harvard architecture that comes
with some standard features such as on-chip program (code) ROM, data RAM, data EEPROM,
timers and I/O ports. See Figure 2. Most AVRs have some additional features like ADC, PWM,
and different kinds of serial interface such as USART, SPI, 12C (TWI), CAN, USB, and so on.
Every microprocessor must have memory space to store program (code) and data. While code
provides instructions to the CPU, the data provides the information to be processed. The CPU
uses buses (wire traces) to access the code ROM and data RAM memory spaces. The early
computers used the same bus for accessing both the code and data. Such an architecture is
commonly referred to as von Neumann (Princeton) architecture. That means for von Neumann
computers, the process of accessing the code or data could cause them to get in each other's
way and slow down the processing speed of the CPU, because each had to wait for the other
to finish fetching. To speed up the process of program execution, some CPUs use what is
called Harvard architecture. In Harvard architecture, we have separate buses for the code and
data memory. See Figure 0-20. That means that we need four sets of buses: (1) a set of data
buses for carrying data into and out of the CPU, (2) a set of address buses for accessing the
data, (3) a set of data buses for carrying code into the CPU, and (4) an address bus for accessing
the code. See Figure 0-20. This is easy to implement inside an IC chip such as a microcontroller
where both ROM code and data RAM are internal (on-chip) and distances are on the micron
and millimeter scale. But implementing Harvard architecture for systems such as x86 IBM
PC-type computers is very expensive because the RAM and ROM that hold code and data are
external to the CPU. Separate wire traces for data and code on the motherboard will make the
board large and expensive. For example, for a Pentium microprocessor with a 64-bit data bus
and a 32-bit address bus we will need about 100 wire traces on the motherboard if it is von
Neumann architecture (96 for address and data, plus a few others for control signals of read
and write and so on). But the number of wire traces will double to 200 if we use Harvard
architecture. Harvard architecture will also necessitate a large number of pins coming out of
the microprocessor itself. For this reason, you do not see Harvard architecture implemented in
the world of PCs and workstations. This is also the reason that microcontrollers such as AVR
use Harvard architecture internally, but they still use von Neumann architecture if they need
external memory for code and data space. The von Neumann architecture was developed at
Princeton University, while the Harvard architecture was the work of Harvard University.
The following table highlights the major differences between Von Neumann and Harvard
Architecture –
Because the memory and the Because the instruction memory and the
Internal programmes share the same space, data memory cannot share the same space,
memory there is no unused space in the internal some of Harvard's internal memory is going
memory. to waste somewhere.
The instructions for running can either Due to the fact that the input and the
be taken from the programme that has programme instructions that are stored in
Running
been stored or they can be given the programme are taken simultaneously,
Instructions
explicitly. As a result, the two cannot the running instructions are somewhat
be considered together. complicated and somewhat slow.
Instruction Execution
The CPU executes each instruction in a series of small steps. Roughly speaking, the steps are
as follows:
1. Fetch the next instruction from memory into the instruction register.
2. Change the program counter to point to the following instruction.
3. Determine the type of instruction just fetched.
4. If the instruction uses a word in memory, determine where it is.
5. Fetch the word, if needed, into a CPU register.
6. Execute the instruction.
7. Go to step 1 to begin executing the following instruction.
This sequence of steps is frequently referred to as the fetch-decode-execute cycle. It is central
to the operation of all computers.
Pipelining
It has been known for years that the actual fetching of instructions from memory is a major
bottleneck in instruction execution speed. To alleviate this problem, computers going back
at least as far as the IBM Stretch (1959) have had the ability to fetch instructions from memory
in advance, so they would be there when they were needed. These instructions were stored in
a special set of registers called the prefetch buffer. This way, when an instruction was needed,
it could usually be taken from the prefetch buffer rather than waiting for a memory read to
complete.
In effect, prefetching divides instruction execution into two parts: fetching and actual
execution.
The concept of a pipeline carries this strategy much further. Instead of being divided into only
two parts, instruction execution is often divided into many (often a dozen or more) parts, each
one handled by a dedicated piece of hardware, all of which can run in parallel. Figure 2-4(a)
illustrates a pipeline with five units, also called stages.
Stage 1 fetches the instruction from memory and places it in a buffer until it is needed. Stage
2 decodes the instruction, determining its type and what operands it needs. Stage 3 locates and
fetches the operands, either from registers or from memory. Stage 4 actually does the work of
carrying out the instruction, typically by running the operands through the data path of Fig. 2-
2. Finally, stage 5 writes the result back to the proper register.
In Fig. 2-4(b) we see how the pipeline operates as a function of time. During clock cycle 1,
stage S1 is working on instruction 1, fetching it from memory. During cycle 2, stage S2 decodes
instruction 1, while stage S1 fetches instruction 2. During cycle 3, stage S3 fetches the operands
for instruction 1, stage S2 decodes instruction 2, and stage S1 fetches the third instruction.
During cycle 4, stage S4 executes instruction 1, S3 fetches the operands for instruction 2, S2
decodes instruction 3, and S1 fetches instruction 4. Finally, in cycle 5, S5 writes the result of
instruction 1 back, while the other stages work on the following instructions.
Let us consider an analogy to clarify the concept of pipelining. Imagine a cake factory in which
the baking of the cakes and the packaging of the cakes for shipment are separated. Suppose
that the shipping department has a long conveyor belt with five workers (processing units) lined
up along it. Every 10 sec (the clock cycle), worker 1 places an empty cake box on the belt. The
box is carried down to worker 2, who places a cake in it. A little later, the box arrives at worker
3’s station, where it is closed and sealed. Then it continues to worker 4, who puts a label on the
box. Finally, worker 5 removes the box from the belt and puts it in a large container for later
shipment to a supermarket. Basically, this is the way computer pipelining works, too: each
instruction (cake) goes through several processing steps before emerging completed at the far
end.
Getting back to our pipeline of Fig. 2-4, suppose that the cycle time of this machine is 2 ns.
Then it takes 10 ns for an instruction to progress all the way through the five-stage pipeline. At
first glance, with an instruction taking 10 ns, it might appear that the machine can run at 100
MIPS, but in fact it does much better than this. At every clock cycle (2 ns), one new instruction
is completed, so the actual rate of processing is 500 MIPS, not 100 MIPS.
Pipelining allows a trade-off between latency (how long it takes to execute an instruction), and
processor bandwidth (how many MIPS the CPU has). With a cycle time of T nsec, and n stages
in the pipeline, the latency is nT ns because each instruction passes through n stages, each of
which takes T ns. Since one instruction completes every clock cycle and there are 109 /T clock
cycles/second, the number of instructions executed per second is 109 /T. For example, if T = 2
ns, 500 million instructions are executed each second. To get the number of MIPS, we have to
divide the instruction execution rate by 1 million to get (109 /T)/106 = 1000/T MIPS.
Theoretically, we could measure instruction execution rate in BIPS instead of MIPS, but
nobody does that, so we will not either.
PRIMARY MEMORY
The memory is that part of the computer where programs and data are stored. Some computer
scientists (especially British ones) use the term store or storage rather than memory, although
more and more, the term ‘‘storage’’ is used to refer to disk storage. Without a memory from
which the processors can read and write information, there would be no stored-program digital
computers.
Primary storage is a key component of a computer system that enables it to function. Primary
storage includes random access memory (RAM), read only memory (ROM), cache and flash
memory. Each of these have different uses within the computer.
Primary storage (also known as main memory) is the component of the computer that holds
data, programs and instructions that are currently in use.
Primary storage is located on the motherboard. As a result, data can be read from and written
to primary storage extremely quickly. This gives the processor fast access to the data and
instructions that the primary storage holds.
There are four types of primary storage:
• Read Only Memory (ROM)
• Random Access Memory (RAM)
• Flash Memory
• Cache Memory
The two main types of primary storage are ROM, which is non-volatile, and RAM, which is
volatile. Non-volatile memory keeps its contents even when the computer is switched off.
Volatile memory loses its contents when power is lost.
Primary storage is comparatively limited in size, especially when compared with secondary
storage. In a modern personal computer, primary storage is often around 4 GB in size.
Cache Memory
Cache Memory is a special very high-speed memory. It is used to speed up and synchronize
with high-speed CPU. Cache memory is costlier than main memory or disk memory but more
economical than CPU registers. Cache memory is an extremely fast memory type that acts as
a buffer between RAM and the CPU. It holds frequently requested data and instructions so that
they are immediately available to the CPU when needed. Cache memory is used to reduce the
average time to access data from the Main memory. The cache is a smaller and faster memory
that stores copies of the data from frequently used main memory locations. There are various
different independent caches in a CPU, which store instructions and data.
Levels of memory:
Level 1 or Register – It is a type of memory in which data is stored and accepted that are
immediately stored in CPU. Most commonly used register is accumulator, Program counter,
address register etc.
Level 2 or Cache memory – It is the fastest memory which has faster access time where data
is temporarily stored for faster access.
Level 3 or Main Memory – It is memory on which computer works currently. It is small in size
and once power is off data no longer stays in this memory.
Level 4 or Secondary Memory – It is external memory which is not as fast as main memory
but data stays permanently in this memory.
The performance of cache memory is frequently measured in terms of a quantity called Hit
ratio.
Hit ratio(H) = hit / (hit + miss) = no. of hits/total accesses
Miss ratio = miss / (hit + miss) = no. of miss/total accesses = 1 - hit ratio(H)
We can improve Cache performance using higher cache block size, and higher associativity,
reduce miss rate, reduce miss penalty, and reduce the time to hit in the cache.
Secondary memory
Secondary memory consists of all permanent or persistent storage devices, such as read-only
memory (ROM), flash drives, hard disk drives (HDD), magnetic tapes and other types of
internal/external storage media.
ROM (read-only memory)
ROM is a type of memory that does not lose its contents when the power is turned off. For this
reason, ROM is also called non- volatile memory. There are different types of read-only
memory, such as PROM, EPROM, EEPROM, Flash EPROM, and mask ROM. Each is
explained next.
Mask ROM
Mask ROM refers to a kind of ROM in which the contents are programmed by the IC
manufacturer. In other words, it is not a user-programmable ROM. The term mask is used in
IC fabrication. Since the process is costly, mask ROM is used when the needed volume is high
(hundreds of thousands) and it is absolutely certain that the contents will not change. It is
common practice to use UV-EPROM or Flash for the development phase of a project, and only
after the code/data have been finalized is the mask version of the product ordered. The main
advantage of mask ROM is its cost, since it is significantly cheaper than other kinds of
ROM, but if an error is found in the data/code, the entire batch must be thrown away. It
must be noted that all ROM memories have 8 bits for data pins; therefore, the organization is
x8.
RAM (random access memory)
RAM memory is called volatile memory since cutting off the power to the IC results in the loss
of data. Sometimes RAM is also referred to as RAWM (read and write memory), in contrast to
ROM, which cannot be written to.
There are three types of RAM:
• static RAM (SRAM).
• NV-RAM (non-volatile RAM), and
• dynamic RAM (DRAM).
SRAM (static RAM)
Storage cells in static RAM memory are made of flip-flops and therefore do not require
refreshing in order to keep their data. This is in contrast to DRAM, discussed below
The problem with the use of flip-flops for storage cells is that each cell requires at least 6
transistors to build, and the cell holds only 1 bit of data. In recent years, the cells have been
made of 4 transistors, which still is too many. The use of 4-transistor cells plus the use of CMOS
technology has given birth to a high-capacity SRAM, but its capacity is far below DRAM.
Figure 0-11 shows the pin diagram for an SRAM chip.
NV-RAM (nonvolatile RAM)
Whereas SRAM is volatile, there is a new type of non-volatile RAM called NV-RAM. Like
other RAMS, it allows the CPU to read and write to it, but when the power is turned off the
contents are not lost. NV-RAM combines the best of RAM and ROM: the read and write ability
of RAM, plus the nonvolatility of ROM.
To retain its contents, every NV-RAM chip internally is made of the following components:
1. It uses extremely power-efficient (very low-power consumption) SRAM cells built out of
CMOS.
2. It uses an internal lithium battery as a backup energy source.
3. It uses an intelligent control circuitry. The main job of this control circuitry is to monitor the
Voc pin constantly to detect loss of the external power supply. If the power to the Vcc pin falls
below out-of-tolerance conditions, the control circuitry switches automatically to its internal
power source, the lithium battery. The internal lithium power source is used to retain the NV-
RAM contents only when the external power source is off.
It must be emphasized that all three of the components above are incorporated into a single IC
chip, and for this reason non-volatile RAM is a very expensive type of RAM as far as cost per
bit is concerned. Offsetting the cost, however, is the fact that it can retain its contents up to ten
years after the power has been turned off and allows one to read and write in exactly the same
way as SRAM. Table 0-7 shows some examples of SRAM and NV-RAM parts.