Docsity

Embedded Systems Programming: Memory Decoding in Embedded Systems - Prof. Stephen Kuyath, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Embedded Systems Programming: Memory Decoding in Embedded Systems - Prof. Stephen Kuyath and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Embedded Systems Programming

ETEE 3285

Topic 12: Partial and Full Memory Decoding

Agenda

 To become familiar with the concepts of memory

expansion, the data, the address bus, and

control signals

 To design embedded systems expanded

memory systems using:

 Full decoding  Partial decoding

Binary Address

 The beginning and ending address for each RAM

chip of Example 1 is shown below

 Notice that A 0 – A 9 may take on any value (a 1 or a 0)  A 10 – A 15 remain unchanged for that RAM chip

Full Decoding

 Notice that A 10 and/or A 11 change states when selecting one of the four RAM chips  A 12 – A 15 are always low  Every address line is used in decoding these addresses  Each RAM chip responds to only one range of addresses

Partial Decoding

If the enable input to the decoder was grounded then the decoder would always be enabled.

If A 10 and A 11 are both low, RAM0 would respond no matter the state of A 12 – A 15

In this table, the x’s under A 0 – A 9 mean that these address lines are directly connected to the RAM IC and have no effect on selecting the IC

Partial Decoding

Partial Decoding

This is OK, as long as RAM0 is the only memory IC (or memory bank) that responds to these addresses.

Bus Contention

 It is very important that only one bank of memory respond to any address

 If the circuit is incorrectly designed and more than one memory bank responds to an address, we have bus contention

 Bus contention is a condition in which more than one memory device is attempting to interact with the data bus  This condition will cause:  Overloading of the data bus  Incorrect data being read or written  (Bus contention is BAD)

Solution (pg 1)

 RAM 4k x 8  log 2 4096 = 12  A 0 – A 11 would, therefore, be directly connected to each RAM chip  8 data lines

Solution (pg 2)

 ROM 2k x 8  log 2 2048 = 11  A 0 – A 10 would, therefore, be directly connected to the ROM chip  8 data lines

Solution (pg 4)

 RAM: we have 4 RAM ICs – we need 2 bits (A 12 & A 13 ) to choose between 4 RAM ICs  Count from 0 to 3 (RAM0 to RAM3) on A 12 & A 13  Use all 0s for A 14 & A 15 for full decoding  RAM start address was $

Solution (pg 4)

 ROM was to start at $  2k x 8: needs 11 address lines  Others should ensure we are addressing $

Solution (pg 6)

 The RAM can be decoded with a 2-to-4 decoder A 12 – A 15 can be used for decoding the RAM chips. A 14 and A 15 are always low so they will be used to enable the decoder. A 12 and A 13 count the four banks of memory, so they will be used as the inputs to the decoder

The outputs will be connected to the enable pins on the RAM ICs

Address Strobe

So, what is this AS signal?