Docsity

Understanding Memory Organization and Interfacing: Types and Systems, Slides of Computer Science

Partial preview of the text

Download Understanding Memory Organization and Interfacing: Types and Systems and more Slides Computer Science in PDF only on Docsity!

Contents

  • Review the operation of a computer at the functional level
  • Detail the organization of computer sub-systems
    • CPU
    • Memory Subsystem
    • I/O Subsystem

CPU organization

  • Special Registers:
    • PC (program counter) keeps the address of the next instruction
    • IR (instruction register) keeps the instruction being executedDocsity.com

RISC processor ALU example

  • //Code for a = b + c
  • load R3, b //copy value b from memory to R
  • load R4, c //copy value c from memory to R
  • add R3, R4 //sum placed in R
  • store R3, a //store the result into memory

R

R

…

General Registers^ Rn

…

Status Registers

Functional Unit

Right Operand

Left Operand

Result

Program Counter

  • As discussed earlier, the processor uses an internal counter to keep track of the instruction it is executing from the system memory. The contents of the counter is the location of where the instruction is found (its address number).
  • During the fetch cycle , the processor places the contents of this counter on the address bus. A read signal is issued on the control bus, then timing signals are generated to transfer (copy) the instruction from the memory location in system memory to an internal hold latch inside the processor (called the instruction register).
  • During the decode cycle , the instruction counter is adjusted to point to the next instruction to be executed from system memory (calculated from the current instruction).
  • The purpose of the program counter (instruction) pointer is to hold the address of the instruction the processor is about to execute from system memory.

Register Banks

  • To provide for the temporary storage of variables or results, most (if not all) processors provide a number of internal hold latches called registers.
  • The number of registers can range from 1 to several hundred, depending upon the architecture of the processor (CISC or RISC).
  • The reason why internal register banks (a group of registers) are used is speed. Data inside the processor is manipulated significantly faster than data external to the processor (ie, located in system memory). This is because of the time required to fetch the data from system memory and transfer it into an internal hold latch before it can be manipulated.
  • For instance, to multiply the contents of a memory location by 2, the processor needs to first read the memory location value to an internal register (transfer it to the accumulator – up to the architecture), multiply it by 2, then write the ALU contents back to the memory location. The two memory cycles consume time.
  • In contrast, to multiply an internal register by 2 requires no external system memory access, and the lack of this overhead means that instructions of this type execute faster than those which make external references to system memory.
  • The purpose of internal processor register banks is to provide temporary storage for variables and calculations.

RISC Control Unit example

  • The control unit controls the execution of the

instructions stored in the main memory (retrieve and

execute them)

load R4, c add R3, R store R3, a

Primary Memory

load R3, b (^3046) 3050 3054 3058 . . .

. . Fetch Unit.

Decode Unit

Execute Unit

3050

load R3, b

PC

IR

Control Unit

Memory subsystem organization and

interfacing

  • Review of different types of memory
  • Internal organization of the memory
  • Construction of memory subsystems

Memory

  • Two main memory classes:
    • ROM ( R ead O nly M emory) (a)
    • RAM ( R andom A ccess M emory) (b)

ROM

  • Data is programmed into the chip using an external ROM programmer
  • The programmed chip is used as a component into the circuit
  • The circuit doesn’t change the content of the ROM
  • Can be used as lookup tables to implement various functions
  • Used by PCs to store the instructions that form their B asic I nput/ O utput S ystem (BIOS)
  • When power is removed from a ROM chip, the information is not lost, so it is a nonvolatile type of memory
  • It has a OE (Output Enable) specific control pin. Both OE and CE must be enabled in order for the ROM to output data; otherwise its data output is tri-stated.

ROM Types

  • Masked ROM – programmed with its data when the chip is fabricated
  • PROM – programmable ROM, by the user using a standard PROM programmer, by burning some special type of fuses. Once programmed will not be possible to program it again
  • EPROM – erasable ROM; the chip can be erased and chip reprogrammed; programming process consists in charging some internal capacitors; the UV light (method of erase) makes those capacitors to leak their charge, thus resetting the chip
  • EEPROM – Electrically Erasable PROM; it is possible to modify individual locations of the memory, leaving others unchanged; one common use of the EEPROM is in BIOS of personal computers.

RAM Types

  • Dynamic RAM (DRAM) – are like leaky capacitors;

initially data is stored in the DRAM chip, charging its memory cells to maximum values. The charge slowly leaks out and eventually would go to low to represent valid data; before this happens, a refresh circuitry reads the contents of the DRAM and rewrites the data to its original locations, thus restoring the memory cells to their maximum charges

  • Static RAM (SRAM) – is more like a register; once the data

has been written, it will stay valid, it doesn’t have to be refreshed. Static RAM is faster than DRAM, also more expensive. Cache memory in PCs is constructed from SRAM memory.

Internal linear organization

  • 8X2 ROM chip
  • As the number of locations increases, the size of the address decoder needed, becomes very large
  • Multiple dimensions of decoding can be used to overcome this problem

Memory systems organization

  • Two or more memory chips can be combined to create more

locations (two 8X2 chips can create 16X2 memory)

Secondary Memory

  • Disk Storage
    • HDD (P-ATA, S-ATA, SCSI)
    • RAID Systems
    • Floppy
  • Optical Storage
    • CDROM/DVD
  • Tape Storage