The main memory of a computer system should be fast enough to not degrade the performance of the system. To achieve this, the semiconductor type memories are used as main memory.
Here we will investigate the three common types of memory:
In fact all of these devices are random access memories. I.e. each byte or word has an address and can be accessed randomly. The following is a pseudo memory component showing the address, data and control connections.
For ROM and SRAM, the above device has nxm bits. Today the capacity of one chip SRAM memories are less than 1MB, however, there are 128Mbits DRAM memories.
In most of the RAM devices, the same pins are used for both read and write data. So at one time only a read or write operation is possible. Some other devices (e.g. some DRAM devices) has seperate data pins for input and output, but still they can do only read or write at one time.
Most of the memory devices produced has an input-sometimes more than one-that selects or enables the memory device. It is most often calles a chip select(CS'), chip enable(CE) or simply select(S) input. The other input(s) are used to retrieve or store data.
An example function table:
| CS' | OE' | WE' | D0-Dm |
| 1 | x | x | Z(high impedance) |
| 0 | x | 0 | Data in |
| 0 | 0 | 1 | Data out |
| 0 | 1 | 1 | Z(high impedance) |
The following figure illustrates the read and write timing for a typical memory device.
General block diagram.
The following circuit diagram shows the 41256 DRAM pins and an address
multiplexer for this type of chips. The propagation delay of the multiplexers
must be greater than
in
order to work.
The following figures illustrates the desired memory module and the available memory device.
The addressing of the memory module can be established by means of a table that specifies the memory address assigned to each chip.
As seen the first chip and second chip must be activated when the address is between 00000h-3ffffh. The following table illustrates this.
| Address | values of A19-A0 | Chip activated | |
| 0h-3ffffh | 00xx xxxx xxxx xxxx xxxx | MD0,MD1 | |
| 40000h-7ffffh | 01xx xxxx xxxx xxxx xxxx | MD2,MD3 | |
| 80000h-bffffh | 10xx xxxx xxxx xxxx xxxx | MD4,MD5 | |
| c0000-fffffh | 11xx xxxx xxxx xxxx xxxx | MD6,MD7 |
The following is function table of the address decoding circuitry.
| A18 | A17 | CS0,CS1 | CS2,CS3 | CS4,CS5 | CS6,CS7 |
| 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 | 0 |
When the 8086/8088 CPU is reset, it starts from the location FFFF0h. So there must be a program there and this must be a nonvolatile memory. The following illustrates a memory system for a 8088 CPU where each of SRAM IC and ROM IC are shown below.
The unique problem with 16 bit data bus is that the 8086 must be able to write data to any 16 bit location-or any 8-bit location. This means that the 16 bit data bus must be divided into two seperate sections(banks) that are 8-bit wide and the microprocessor can access to either half at seperate times(8-bit operation) or at the same time(16 bit operation).
The 8086,80186,80286 and 80386SX use
signal(Bus high enable) to access the high bank
and A0 signal to access the low bank. The following table illustrates the
function of these pins.
| BHE' | A0 | Function |
| 0 | 0 | Both banks are enabled for a 16-bit transfer |
| 0 | 1 | High bank enabled for an 8-bit transfer |
| 1 | 0 | low bank enabled for an 8-bit transfer |
| 1 | 1 | No banks enabled |
Example: Design a module providing 128Kx16 bits using 62256 32Kx8 SRAM. The following figure illustrates the desired module and the 62256 SRAM
The following is the memory map of the module.
In the module we prefer to use MBHE' and MA0 to determine the 8-bit and 16-bit transfer as mentioned before. While writing to such a module, i.e. while MWR'=0, the function table is as follows:
| MWR'=0 | |||
| MRD' | MBHE' | MA16-MA0 | The chip to be active |
| 0 | x | x xxxx xxxx xxxx xxxx | No chip |
| 1 | 0 | 0 xxxx xxxx xxxx xxx0 | SR0,SR1 |
| 1 | 0 | 0 xxxx xxxx xxxx xxx1 | SR1 |
| 1 | 0 | 1 xxxx xxxx xxxx xxx0 | SR2,SR3 |
| 1 | 0 | 1 xxxx xxxx xxxx xxx1 | SR3 |
| 1 | 1 | 0 xxxx xxxx xxxx xxx0 | SR0 |
| 1 | 1 | 0 xxxx xxxx xxxx xxx1 | No chip |
| 1 | 1 | 1 xxxx xxxx xxxx xxx0 | SR2 |
| 1 | 1 | 1 xxxx xxxx xxxx xxx1 | No chip |
While reading there may be two approaches:
| MRD' | MWR' | BHE' | MA16-MA0 | The chip to be active |
| 0 | 0 | x | x xxxx xxxx xxxx xxxx | No chip |
| 0 | 1 | x | 0 xxxx xxxx xxxx xxx0 | SR0,SR1 |
| 0 | 1 | x | 0 xxxx xxxx xxxx xxx1 | SR0,SR1 |
| 0 | 1 | x | 1 xxxx xxxx xxxx xxx0 | SR2,SR3 |
| 0 | 1 | x | 1 xxxx xxxx xxxx xxx1 | SR2,SR3 |
If we prefer to use the last approach the full function table would be as follows:
| MWR' | MRD' | MBHE' | MA16-MA0 | chip to be active |
| 0 | 0 | x | x xxxx xxxx xxxx xxxx | No chip |
| 0 | 1 | 0 | 0 xxxx xxxx xxxx xxx0 | SR0,SR1 |
| 0 | 1 | 0 | 0 xxxx xxxx xxxx xxx1 | SR1 |
| 0 | 1 | 0 | 1 xxxx xxxx xxxx xxx0 | SR2,SR3 |
| 0 | 1 | 0 | 1 xxxx xxxx xxxx xxx1 | SR3 |
| 0 | 1 | 1 | 0 xxxx xxxx xxxx xxx0 | SR0 |
| 0 | 1 | 1 | 0 xxxx xxxx xxxx xxx1 | No chip |
| 0 | 1 | 1 | 1 xxxx xxxx xxxx xxx0 | SR2 |
| 0 | 1 | 1 | 1 xxxx xxxx xxxx xxx1 | No chip |
| 1 | 0 | x | 0 xxxx xxxx xxxx xxxx | SR0,SR1 |
| 1 | 0 | x | 1 xxxx xxxx xxxx xxxx | SR2,SR3 |
| 1 | 1 | x | x xxxx xxxx xxxx xxxx | No chip |
The activation of chips can be done in various ways. For example to activate a chip while writing the WE' and CS' signals must be activated. I.e. to deactive a chip deactivating only one of these signals are enough. The following is a realization of the above function table.
The data in each cell of a dynamic RAM is held only for 2-8ms. For the
51100x, the
parameter(=8ms) specifies the maximum time period during which all the cells
must be refreshed at least once.
A RAS' refresh cycle begins with the assertion of the RAS' input. The CAS'
input is held high. The WE' input may be low or high. The
inputs are set to the row address. This causes all words(or cells) in
that row to be refreshed. A refresh cycle can be initiated once every
time units. Thus to refresh all the cells in the 51100x,
a total of 512 refresh cycles are needed. This would require a total of about
to
refresh all the cells in a chip.
The hidden refresh cycles are performed during a normal read cycle. Once the
row and column strobes have been asserted, and the desired location addressed,
RAS' is negated, the row address supplied and RAS' is asserted again. This
starts the refresh of all the cells within the selected row. However, during
refresh, the data read from the cell selected just prior to the refresh, remains
valid on the
line.
Multiple hidden refresh cycles can be executed one after another. However, this is limited by the maximum width of the CAS' pulse.
Another way to refresh the memory is by using distributed refresh. In this
case, the refresh control circuit performs one refresh cycle in
time period. However, the refresh cycles are distributed over time as
shown in the figure.
Pseudo static RAMs(PSRAMs) are dynamic RAMs with built in refresh logic. An example is shown.
In DRAM interface there are two things that is different from a SRAM interface.
The first problem can be solved in many ways. However, usually the DRAM interface has a new signal REFRESH whixh is driven by an refresh circuitry. The following diagram illustrates the connection of a 1Mx8 DRAM module to the common bus.