Memories and Microprocessors
Introduction
torage and recall of information fundamental to sequential circuits
We have already looked at basic circuits to accomplish this flip-flops latches
We shall now study how to build and access large memory systems Microprocessors and microcontrollers developed to fully
exploitthe potential of large memory systems
Objectives
To study how simple memory devices can be constructed into largememory systems
To understand the strengths and weaknesses of different types ofmemory: specifically Static RAM, Dynamic RAM, Programmable ROMErasable PROM and Mask-programmed ROM
To illustrate the range of activities a simple microprocessor can carry out
To illustrate the benefits of a software solution to circuit design
Combining registers
Example: store four 8-bit binary numbers in four 8-bit registers Solution 1: Four mutually exclusive clock pulses
Sourceof
8-bitwords
8-bitregist
er
8-bitregist
er
8-bitregist
er
8-bitregist
er
8 8 8 8
8 8 8 8
clk1 clk2 clk3 clk4
Four clock signals mutually exclusive
Writing to the memory
The data bus sets the 8 data input lines to the required values
On the clock/control pulse the output from the address decoder selects which register to address.
The others don’t get the clock pulse
Combining registers
8-bit data words
2-bit addresses
addressdecoder
register register register register
8
2
control line(clock pulse)
8 8 8 8
buses
11
00
Combining registers Solution 2Data source
specifies which register
Source of8-bit words
and 2-bit addresses
8-bitregist
er
8-bitregist
er
8-bitregist
er
8-bitregist
er
8 8 8 8
8 8 8 8
C C C C
address decoder
Q3 Q2 Q1 Q0
2
controlsignal C
Inputs Outputs
A1 A0 Q3 Q2 Q1 Q0
0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0
Decode Control AND gate output signal output
0 0 0
0 1 0
1 0 0
1 1 1
Reading and writing
Similar circuits can be set up for reading from the memory
Memory thus consists of registers and buses that allow the storage functions to be carried out
Addressable Memory
Address Data
0 0 0 x x x x
0 0 1 x x x x
0 1 0 x x x x
0 1 1 x x x x
1 0 0 x x x x
1 0 1 x x x x
1 1 0 x x x x
1 1 1 x x x x
deco
der
3
2
data bus4 lines
control busread/writeenable
address bus3 lines
4
Memory can be organized in different ways:
8 x 1 byteor8 x 8 bit
16 x 4 bit
64 x 1 bit
capacity of all these is 64 bits
Combining addressable memories
Eight 32K by 8 memory devices forming a 256K byte memory
32K by 8RAM
32K by 8RAM
32K by 8RAM
32K by 8RAM
32K by 8RAM
32K by 8RAM
32K by 8RAM
32K by 8RAM
addresses224K to (256K-1)
addresses192K to (224K-1)
addresses160K to (192K-1)
addresses128K to (160K-1)
addresses96K to (128K-1)
addresses64K to (96K-1)
addresses32K to (64K-1)
addresses0K to (32K-1)
32K by 8 RAM
32K by 8 RAM
32K by 8 RAM
32K by 8 RAM
32K by 8 RAM
32K by 8 RAM
32K by 8 RAM
32K by 8 RAM
source and receiver
8
8
8
8
8
8
8
8
15
15
15
15
15
15
15
15
addressdecoder
15
3 18
address bus
Combining addressable memories
Eight 256K by 1 memory devices forming a 256K byte memory
256Kby 1RAM
256Kby 1RAM
256Kby 1RAM
256Kby 1RAM
256Kby 1RAM
256Kby 1RAM
256Kby 1RAM
256Kby 1RAM
8 7 6 5 4 3 2 1
address bus
data bus
18 18 18 18 18 18 18 18
source andreceiver
18
Major Types of Memory
RAM all addresses accessible in equal time selected in any order for read/write read leaves data intact, write overwrites volatile
ROM permanent or semi-permanent storage non-volatile
RAM types
SRAM DRAM
static RAM
flip flop based
• synchronous burst (SB SRAM)
• asynchronous (ASRAM)
dynamic RAM
capacitor based
• fast page mode (FPM DRAM)
• extended data out (EDO DRAM)
• Burst EDO (BEDO DRAM)
• Synchronous (SDRAM)
see, for example:http://www.tomshardware.com
Summary
Random Access Memory (RAM) Static RAM (SRAM)
based on flip-flops requires several transistors fast access time
Dynamic RAM (DRAM) stores charge requires one capacitor and one transistor But needs refresh every few milliseconds slower access time
Even with additional circuitry for refresh operation, DRAM has a higher density of storage-bits per unit area
ROM
Contains permanent or semi-permanent stored data.
Can be read but not changed (or not without specialized equipment).
Types: Generic (mask) ROM Programmable ROM (PROM) Erasable PROM (EPROM)
Mask ROM
Mask-programmed ROM generic ROM Chip manufacturer designs final photographic
mask to customer’s requirements as final stage Only cost-effective for volume production (tens
of thousand)
Programmable ROM
A B
address 0
address 1
address 2
address3
programmable OR array
initially all zeros or one one-time programmable
uses fusible linksyou remember
EPROM’s
Erasable programmable ROM’s
Two types, depending on erasure method: Ultraviolet erasable (UV EPROM) Electrically erasable (EEPROM)
Use of PROM/EPROM
For smaller volume designs for which mask ROM is not economic.
EPROM’s can be used for testing & debugging.
PROM can be used for final system.
Flash memory
high density read/write non volatile – data stored indefinitely without
power
Combine best characteristics of traditional RAM/ROM.
Microprocessors
A VLSI Device
Carries out a range of instructions on data transferred from a register array
Includes timing and control functions
ALU
control unit
registerarray
Microprocessor functionality
A microprocessor: Retrieves data from
memory Manipulates data Stores data in memory
Simple in concept, but powerful in application
Provides elegant solutions to a large number of electronic circuit problems.
A Dcontrolsignals
Memory
Microprocessor
buses
Microprocessor Functionality
Microprocessor behaviour determined by list of instructions in memory a program
But memory can only hold binary patterns Use encoding scheme for instructions, eg
binary code mnemonic meaning
10110110 11000110 LDA Load the accumulator (register) with the contents of memory location A6
Instruction mnemonics
Code Mnemonic Description......181 LDX Load register X182 LDA Load accumulator183 STA Store accumulator184 STX Store register X185 INX Increase the value in register X by 1186 SBA Subtract from accumulator187 ADA Add to accumulator188 JMP Jump to a different part of the program189 BNE If last test not equal, branch to .....190 CMP Compare accumulator......
Microprocessor Functionality
Each instruction carries out an operation Some instructions use specially named
registers the accumulator register X
Instructions are specific to the type of microprocessor (language not portable)
Instructions and operands
Some instructions require an operand Possible operands:
a number LDA #42
a memory location STA &42
an indirect memory location STA &(42)
A simple programAddress Contents Interpretation(denary) (denary) 70 153 ? 71 197 ? 72 182 1: load accumulator with contents of 73 80 memory location 80 74 187 2: add contents of 75 81 memory location 81 to accumulator 76 183 3: store content of accumulator in 77 82 memory location 82 78 188 ? 79 40 ? 80 121 81 35 data 82 15 83 78
Accumulator: 255
Structure of microprocessor
ALUIR X MDR MAR PC
8 8-bit data bus
MemorySR
Control bus instructions
All instructions start with an instruction fetch:1. MAR <- PC, memory read enable PC, load MAR2. Inc PC inc PC3. IR <- MDR enable MDR, load IR
The next step depends on what is in IR, e.g. absolute load:
4. MAR <- PC, memory read enable PC, load MAR5. Inc PC inc PC6. Acc <- MDR enable MDR, load Acc7. Reset reset uPC
Notation called register transfer notation
Structure of microprocessor
clock
Control logic
(combinational logic)
counter
4reset
instruction stepcounter
8
SRIR
register controlALU operationmemory readmemory write
Different microprocessors
Parameters that can vary: width of buses (4-bit, 8-bit, 16-bit, 32-bit etc.) number of registers operations of ALU speed of clock ordering of micro-instructions (simple, pipelined etc.) fabrication technology (silicon, gallium arsenide) and many more
Two main design philosophies: reduced instruction set (RISC) complex instruction set (CISC)
Summary
Microprocessor is a general purpose, programmable integrated circuit.
When connected to memory used to store both programs and data it becomes a computer.
Top Related