Cs Syllables
Cs Syllables
Data
Control signals
Include enable (chip select)
, read/write
0000
Self-test
Memory capacity No. of address lines
128K ?
16M ?
14M ?
Introduction
• For the 8086 microprocessor, there are two modes:
minimum and maximum
• Under different modes, the memory interface is
not the same
• In the minimum mode, 8086 processor is
connected to the external memory block directly
• In the maximum mode, a Bus controller is needed
• The bus controller will issue the required control
signal to drive the memory block
Minimum Mode
ALE
/BHE
/RD
/WR
M/IO
DT//R memory
8086 /DEN
A16-A19
AD0-AD15
Address space and data organization
• Memory is organized as 8-bit bytes (byte as the
basic unit)
• To address a word then 2 consecutive bytes are
used, lower addressed byte is the LSB (Least
Significant Byte) and the higher-addressed byte is
the MSB (Most Significant Byte)
• Words of data can be stored at even, or odd
address boundaries
16-bit
MSB LSB
Memory addressing
• The address bit A0 of the LSB can be used
to determine the address boundary. If A0 is
0 then we have an even address, or aligned
• If A0 is odd then we have odd-boundary
• Example: 0001H is an odd-boundary
address
Example
• A0 = 1 example
– A 16-bit data store at 01FFFH (then it is not
aligned) and will occupy 01FFFH and 02000H
(Odd boundary)
• A0 = 0 example
– A 16-bit data store at 02002H (then it is
aligned) and will occupy 02002H and 02003H
(even boundary)
Question
• If you are asked to implement the memory
system for a 8086 microprocessor, what
memory configuration will you use?
A) One 1M Bytes chip
B) Two 512KBytes chips
C) One 1M Word chip
Address Space
• Even-boundary data can be accessed in one
bus cycle
• Odd-boundary word must be accessed in
two bus cycle
• In 8086, user’s data usually is in 8-bit or 16-
bit format
• For the system, instructions are always
accessed as words (16-bit)
• There is also double word format (32-bit)
Data type
• Double word (32-bit) will be stored in 4
consecutive locations
• When double word is used?
– Double word can be used as a pointer that is used to
address data or code outside the current segment
– For a double word, the higher WORD stores the
segment address, the lower WORD stores the offset
Memory organization
1M bytes memory using 2 512K byte chips
Odd boundary
Address requires
2 cycles
One direction
Bi-direction
Charges in the
floating gate
represent the data
http://www.siliconfareast.com/flash-memory.htm
FLASH EEPROM
• http://electronics.howstuffworks.com/flash-
memory.htm
Random access memory (RAM)
• Data can be read as well as written into the
memory chip
• Static ram (SRAM) – data remains valid as
long as the power is ON
• Dynamic RAM (DRAM) – needs to
periodically restore (recharge) the data in
each storage location by addressing them
• If storage nodes are not recharged at regular
intervals of time, data would be lost. This
process is called refreshing
SRAM circuit
To control
RAM:
CE – chip enable
OE – output enable
(for read operation)
WE – write enable
(for write operation)
From
decoding
logic
Write-cycle for SRAM
• To write, we must produce the signal in proper
order
• Minimum duration of a write cycle is tWC (write
cycle time )
• Address must remain stable during the whole
cycle
• Chip enable (CE) signal becomes active
• The Write Enable (WE) will be active after the
address setup time tAS elapses
RAM write operation
• Data should now ready and must be valid
for tDW (data valid to end of write)
• Data should remain valid (tDH) after the
write
• A short recovery period (tWR) takes place
after /WE returns to 1 before the write cycle
is complete (address is removed)
Write cycle
Timing parameters for a write cycle
Parameter Time (ns)
Tc (rd) read cycle time 120
TWC (wr) write cycle time 120
TWP write pulse width 60
Tsu (A) address set up time 20
Tsu (S) chip select setup time 60
Tsu (D) data setup time 50
Th address hold time 0
Th (D) data hold time 5
Read Cycle
• Read cycle for RAM is similar to the ROM
• Minimum duration of a read cycle is tRC (read
cycle time)
• Address must remain stable during the whole
cycle
• Chip enable becomes active
• The Enable(s) (CE) will be active after the address
is stable
• Data should now ready
• Data should remain valid after the OE and CE
have been removed
CO – time between
Read Cycle
Valid data and chip enable
OE – time between
Valid data and output enable
DRAM
• DRAM has a higher density
• Cost less
• Consume less power
• Take up less space
• We can get 64Mx1, 128Mx1 modules
DRAM
So the 4 memory chips will be divided into Even and Odd group
(two chips per group)
Only consider the even group, since the chip is only 256K so the
Memory locations stored by one chip is from 00000 to 7FFFF (with
only the even locations)
The other chip holds 80000 to FFFFF (only the even locations)
Example
Odd Even
Address
80000 to FFFFF
Address
00000 to 7FFFF
Memories
Address
Used for
Decoder
Selecting
The memory Memories
block
Inputs Outputs
Decoder
/CE of 80000H – FFFFFH
A19
What is this?
Address Decoding Techniques
• An address decoder is a circuit that examines the
address lines and enables the memory (producing
the /CE signals) for a specified range of addresses.
This is vital in any memory design because one
block of memory must not be allowed to overlap
another.
• Logic Gate Decoders (ANDS, ORS, NANDS,
AND NORS).
Address Decoder circuits
• A digital decoder is a circuit that recognizes
a particular binary pattern on its input lines
and produces an active output indication.
Address
Lines will
Connect
To A, B and C
64KByte Memory Bank Circuit
BE – Bank Enable
There are 4 banks to support data in byte, word and double word
How to design a decoding system
Design a memory system for a 8086 based computer
Using 64K byte memory chips.
To design the memory system, we must first identify the followings: