Computer Systems: Hardware (Book No. 1 Chapter 2)
Computer Systems: Hardware (Book No. 1 Chapter 2)
HARDWARE
2.1 Information element 2.2 Processor architecture 2.3 Memory architecture 2.4 Auxiliary storage devices 2.5 Input/output architecture and devices
Introduction
Functions of hardware in a computer can be divided into five main units
4. Control Unit
Controls all other units
Peripheral Units
1. Input Unit
Inputs data and programs for processing.
5. Output Unit
Output results in a format understood by humans.
2. Storage Unit
Stores the input data and program
Output Unit
Control Unit
Arithmetic Unit
Processor (CPU)
Semiconductor Memory
Different types of RAM Different types of ROM
IC
Sometimes called a chip or microchip, is a semiconductor wafer on which thousands or millions of tiny resistors, capacitors, and transistors are fabricated
An IC can function as an amplifier, oscillator, timer, counter, computer memory, or microprocessor
Integrated Circuit
Bipolar IC
Speed and power requirement as well as costs are high. Used as a logic element. In digital transmission, an electrical line signalling method where the mark value alternates between positive and negative polarities. Used in logical operations
IC Classification
IC
SSI (Small Scale Integration)
Integration Level
101 102
102 103
103 104
> 105
Transistors Per IC
Semiconductor Memory
RAM (Random Access Memory)
DRAM (Dynamic RAM) SDRAM (Synchronous DRAM) SRAM (Static RAM)
RAM
A semiconductor memory where all read and write functions are performed. It is a volatile memory which needs constant supply of power to store data. All data will be lost when power is turned off. Random Access Memory
Can access any memory cell directly
RAM
Different types of RAM
SRAM DRAM SDRAM RDRAM VRAM Others
SRAM
Static RAM
Uses multiple transistors, typically four to six, for each memory cell (a bit) Used primarily for cache, registers in main storage units and processors Created with a circuit called flip-flop which preserves status of data inside the circuit. Data is not lost therefore refresh is unnecessary resulting in higher processing speed. Cost is high because the circuits are complicated and memory capacity is smaller than DRAM
RDRAM
Rambus dynamic random access memory
A radical departure from the previous DRAM architecture Uses a Rambus in-line memory module (RIMM) Use of a special high-speed data bus called the Rambus channel RDRAM memory chips work in parallel to achieve a data rate of 800 MHz
VRAM
Video RAM
Also known as Multiport dynamic random access memory (MPDRAM) Used specifically for video adapters or 3-D accelerators
Data stored in such chip is non-volatile Data stored in these chips is either unchangeable or requires a special operation to change
ROM
Also known as mask ROM
Firmware a program used to start a computer, etc User cannot add any programs or data Used in memories of games, software etc.
PROM
Has a grid of columns and rows just as ordinary ROM Every intersection of a column and row has a fuse connecting them The higher voltage breaks the connection between the column and row by burning out the fuse
PROM
Programmable read-only memory can only be programmed once Inexpensive Great for prototyping the data for a ROM before committing to the costly ROM fabrication process
EPROM
Erasable programmable read-only memory Can be rewritten many times Similar to PROM, except that the intersection can be charged to create barrier for signal transmission Incremental changes cannot be done Ultraviolet light is used to erase the chip
EEPROM
Electrically erasable programmable read-only memory Incremental changes can be done Electric field is used to alter the data Slow as only one byte can be changed each time
Flash Memory
Similar to EEPROM Uses in-circuit wiring to erase by applying an electrical field to the entire chip or to predetermined sections of the chip called blocks Chunk of 512 bytes data can be altered each time
Processor Architecture
Processor Structure Control Unit Arithmetic Unit (ALU)
Processor Operation Principles Instruction readout and decoding Instruction execution
Processor Structure
The CPU is the backbone of the computer, often compared to the human brain. It consists of the control unit and the arithmetic unit.
Processor Structure
Control Unit
Controls all operations of the computer
Retrieves instruction stored in main storage unit Decodes retrieved instruction using the instruction decoder Executes and transmits instructions to each unit.
The control unit controls each unit and implements the function of each of the units as a computer system. The system by which instructions are executed in this way, sequentially, is called sequential control system, which is based on the concept of John Von Neumann.
Clock Speed
Processor Structure
Arithmetic Unit or officially the Arithmetic Logic Unit (ALU)
Performs calculations, comparison, branch and other processes.
Depending on the representation method of data assigned subject to operations, ALU has functions performing fixed point operation, floating point operation and decimal
A number representation consisting of a mantissa, M, an exponent, E, and an (assumed) radix (or "base") . The number represented is M*R^E where R is the radix - usually ten but sometimes 2.
ALU
Instruction execution
Storing retrieved data Instruction execution Processing subsequent to the instruction execution Flow of instruction from decoding to execution and hardware structure Various registers
Processor Insight
Data bus
GR 0 GR 1 GR 2
IR
Operation
Address
Instruction 1 Instruction 2
Address decoder
GR n
ALU
Arithmetic unit
Control unit
Processor
Executing Program
Processor's four operating stages
1.
Fetch a program's instructions and any needed data into the processor Decode determines the purpose of the instruction and passes it to the appropriate hardware element
2.
Executing Program
Processor's four operating stages
3. 4.
Execute carries out the instruction Retire takes the results of the execution stage and places them into other processor registers or the computer's main memory
Clock
An important part of a microprocessor is its built-in clock, which determines the maximum speed at which other units can operate and helps synchronize related operations 2 GHz 2 billion clock cycles per second
Silicon Structure
L2 cache Memory Management Unit Branch Processing Unit
FETCH
DECODE
Decode/dispatch
EXECUTE
RETIRE
Two-address format
Specifies two addresses and uses the address data specified on the main Instruction Address Address e.g. MOV GR1, X storage unit.
Three-address format
Specifies two addresses to be used for the operation, and the address where the operation result is to be stored
Instruction
Address
Address
Address
Instruction Readout
Instruction Decoding
Content of instruction part of instruction register is transferred to a decoder. Decoder decodes the instruction and sends signals for the execution of the operation to each unit Content of the address part is transferred to the address bus
Instruction Decoding
Instruction Decoding
Instruction Execution
Once the instruction content and address of the data are obtained, the instruction is executed.
Instruction Execution
Storing retrieved data
If, as a result of decoding the instruction part and the address part using the instruction decoder, the instruction is found to say "Retrieve and transfer to the processor the contents of address 100 of the main storage unit," a place to store the retrieved contents will be needed. Therefore, a general-purpose register is set in the arithmetic unit of the processor in order to store the retrieved data. In this example, it is assumed that there are five registers, and, for convenience, the numbers 0 to 4 will be assigned to them. Then, using the initials of each of the general-purpose registers, they will be represented as GR0, GR1, GR2, GR3 and GR4.
Instruction Execution
General-purpose registers
Instruction Execution
Contents of address 100 of the main storage unit (RAM) passes through the data bus to be stored in general-purpose register GR1
Instruction Execution
If, as a result of decoding the instruction, it is found to say Add the contents of address 100 of RAM to the GR1 contents and store result in GR1 The unit that performs this kind of addition and subtraction of numeric values is the ALU (Arithmetic and Logic Unit)
Fixed point operation mechanism to perform operations of integer data (for scientific and engineering calculations) Floating point operation mechanism to perform operations of floating point data (for scientific and engineering calculations) Decimal operation mechanism to perform operations of binary-coded decimals in packet format (For commercial data processing) Logical operations, logical sums, bit shifts
Instruction Execution
Storage of process result
Instruction Execution
Hardware structure
Registers
Types of registers
Program counter Accumulator Index register Base address register PSW (Program Status Word) Flag register Complement register
When computer boots up, the content of the program counter is immediately read and the address of the main storage unit to be accessed is verified. Load instruction A stored in address 101 of the RAM into the processor
Register
Accumulator
Used to exclusively store operation results and values There are cases where the general-purpose register is used as a substitute for the accumulator
Accumulator mode: When the accumulator is used. General purpose mode: When a general purpose register is used as a substitute for the accumulator
Register
Index Register
Performs address modification
Changes address part of the instruction when an address in the main storage unit is specified.
Register
Base register
Stores the program top address
Register
Flag register
Stores information related to operation result to the existence of carry, overflow, etc
Register
Register
Complement Register
Generates integer complements in order to perform operations in the addition circuit
Immediate Specification
Data is contained in the address part, can be executed immediately
E-Cycle
Sequential processing
Pipeline processing
Instruction Set
Complex Instruction Set Computer (CISC) Variation in the instruction size and length of execution Complex, high level type instructions Instructions are executed by the mico-program Reduced Instruction Set Computer (RISC) About the same in the instruction size and length of execution Basic instructions Instructions are executed by the hardware
Parallel method
Using multiple processors simultaneously to execute a program Speeds execution Requires special system software
Parallel method
Multi-processor
Designed to improve performance and reliability of the system Multiple processors in parallel with each processor having a dedicated function Fault-tolerance Resource-sharing
Parallel Processing
Super scalar architecture
Instruction 1 F D Instruction 2 F D Instruction 3 F Instruction 4 F Instruction 5 Instruction 6 E E D D F F R R E E D D R R E E
R R
R" R'
R"
Multi-processor
Symmetric Multi-processor
memory is shared among all the processors executing the same OS. Competition for the use of memory limits number of processors that can be connected.
Array processor
High speed scientific computing using pipeline processing Large scale or dedicated mathematical processors Deploy pipeline processing principle Each unit (i.e. processor) is in a queue passing its completed result to the next unit Also known as vector processing
Parallel Processing
Multiple processors cooperate with multiple tasks being performed to execute one job. SISD (Single Instruction Single Data Stream)
One instruction stream operating on a single data element and is not parallel
Parallel SIMD
The same instruction is executed by all processors operating on different sets of data.
Processor Performance
Performance
E.g. 500MHz = 500,000,000 pulses per sec Clock frequency = 1/500MHz = 2ns per pulse
Digital IC
Logic Gates Digital IC
Half-adder NOT gate
AND gate
OR gate
Transistors
Capacitors Diodes
Full-adder
Flip-flop
'NOT' Gate
A 0 NOT A 1
A
'AND' Gate
A 0 0 1 1 B 0 1 0 1 A AND B 0 0 0 1
A B
'OR' Gate
A 0 0 1 1 B 0 1 0 1 A OR B 0 1 1 1
A B
'XOR' Gate
A 0 B 0 A XOR B 0
0 1 1
1 0 1
1 1 0
A B
'NAND' Gate
A 0 B 0 A NAND B 1
0 1 1
1 0 1
1 1 0
A B
'NOR' Gate
A 0 B 0 A NOR B 1
0 1 1
1 0 1
0 0 0
A B
Exercise 1
Construct the truth table for the following circuit
A
A B 0 1 0 1 C 1 0 0 1
0 0 1 1
Exercise 2
Construct the truth table for the following circuit
a1
a0 a1 0 0 a0 0 1 L1 0 0 L2 0 0 L3 0 1 L4 1 0
1 1
L1 L2 L3 L4
0 1
0 1
1 0
0 0
0 0
Exercise 3
Construct the truth table for the following circuit
A C S B
A
0 0 0 0 1 1 1 1
B
0 0 1 1 0 0 1 1
S
0 1 0 1 0 1 0 1
C
0 0 0 1 1 0 1 1
Hardware
Storage
Memory Architecture
Storage function
Main Storage Unit (RAM) volatile Auxiliary Storage Devices non-volatile
Hard disks Magnetic tape Floppy disk Magneto-optical disk
3. Cycle Time
* Refresh interval
Memory Capacity
Time elapsed from when the processor sends the read/write instruction to the storage unit until the data delivery/acceptance is completed. For the processor to access the main storage unit data, the following three stages are necessary:
1. 2.
3.
The time during which the processor requests the data readout The time during which the processor selects the main storage unit address with the address bus The time during which the data of the selected address is transferred through the data bus.
In other words, ++ represent the time elapsed from when the data access request is sent until the data transfer is completed. This lapse of time is called the access time.
Cycle Time
Memory Configuration
Memory used in the computer can be classified into hierarchies. To provide for the occurrence of malfunctions or failures, these devices are equipped with data error detection and error correction functions. Implemented by several Error Correcting Codes (ECC).
Magnetic tape
1 byte data in transverse direction Parity check system detecting odd number of bit errors appends vertical parity bits CRC code used to detect burst errors
ECC
Main Memory
Hamming code used to detect single-bit and double-bit errors.
Data (RW) Instructions (E) When violated, interrupt occurs and control passes to OS Boundary register system (a dedicated register specifies the addressable domain for each program)