- Slides: 24
Internal hardware and external components of a computer Three-box Model Bus Processor Main Memory Input/Output ØProcessor • The brain of the system • Executes programs • A big finite state machine • Typical processor contains 100, 000 transistors • Moore’s law – number of components integrated into a single chip doubles every 18 -24 months
Internal hardware and external components of a computer Ø Main Memory • Also known as ROM, RAM or IAS (Immediate access store) • Mainly used to store program instructions and data • Available in memory chips able to store 512 k. • Integrated onto bigger boards to store up to 4 gig in 32 bit computers • ROM – Read only memory • RAM – Random Access Memory • EEPROM – Electrically erasable programmable read only memory ØBus • The three areas are connected by a set of parallel wires • These wires pass signals between the components. • There are 3 types of bus • Data – a bidirectional bus, typically consisting of 32 wires used to transport data between components • Address – a unidirectional bus, typically consisting of 32 wires used to address memory and I/O locations. • Control – a bidirectional bus, typically consisting of 8 wires , used to transport control signals between the components.
Internal hardware and external components of a computer Ø Input / Output (I/O) • Commonly known as peripherals. Control Bus Processor Main memory Keyboard Input Controller VDU Output Controller (Disk) I/O Controller Secondary Store Data and Address Buses Visual Display Unit
Internal hardware and external components of a computer Ø Peripherals • A computer device that is not part of the CPU. • The system bus is not connected directly to I/O devices but via an I/O controller • The I/O controller is connected to the I/O device Ø I/O Controller • The controller is an electronic circuit consisting of three parts 1) Electronics that interface the controller to the system bus 2) A set of data, command status registers 3) Electronics appropriate for sending control signals to the device connected to the computer Ø Secondary Storage This is a permanent storage memory that is a peripheral to the CPU e. g. A hard disk.
Functional Characteristics of a processor. Ø A processor controls the system bus Ø Performs operations on data by executing program instructions Ø Program instructions are stored in main memory and are “Fetched” by the Processor Ø Only one operation can be carried out at one time for each processor. Ø A large part of the traffic on the system bus is addresses for memory locations. Addressable Memory ØMemory locations each have a unique address which the processor sends down the address bus. ØThe processor determines over the control bus whether it needs to read or write to that memory location. Ø The processor uses the data bus to then transfer any data back and fore.
Functional Characteristics of a processor. Stored program concept Ø Proposed by John von Neumann and Alan Turing Ø A program must be resident in main memory to be executed Ø machine code instructions are fetched, one after another, from main memory in sequence and are executed, one at a time in the processor. Von Neumann stored program computer Ø A serial machine Ø Instructions are fetched one after anaother Ø Single memory shared between program instructions and data. Ø Data and instructions travel along a shared data bus. Harvard stored program computer Ø Separate instruction and data memories Ø Separate instruction and data buses Ø Still functions as a serial computer Harvard Vs Von Neumann No sharing resources with accessing data and instructions so the performance speed of a Harvard infrastructure is better.
Functional Characteristics of a processor. Microcontroller ØA complete computer on a single chip. Processor, memory and I/O Ø Used for small devices where a cheap compact system is required, e. g. Mp 3 players Ø Often use the Harvard architecture.
Functional Characteristics of a processor. Structure and role of the processor A processor consists of the following components 1) Program Control Unit Fetches program instructions from memory, decodes them and executes them one a time 2) Arithmetic Logic Unit The ALU performs arithmetic and logical operations on data such as addition and subtraction, fixed point and floating point arithmetic, Boolean logic such as AND, OR< XOR and a range of shift operations. 3) Registers Fast memory locations inside the processor that may be dedicated or generalpurpose 4) Internal Clock Derived directly or indirectly from the system clock
Functional Characteristics of a processor. Structure and role of the processor A processor consists of the following components 5) Internal Buses Several internal buses link the control unit, the ALU and the registers 6) Logic gates Used for flow control
Functional Characteristics of a processor. General Purpose and dedicated registers General Purpose ØFast memory locations used to store data temporarily ØLabelled as R 1, R 2. . . Rn ØAccessed with instructions such as LOAD, STORE and ADD Dedicated Registers 1) Stack Pointer (SP) Points to a stack holding return addresses, procedure or functional parameters, and local variables. It is accessed when a procedure or function is called or an interrupt is serviced. 2) Program Counter (PC) Points to the next instruction to be fetched and executed
Functional Characteristics of a processor. General Purpose and dedicated registers Dedicated Registers 3) Status Register Holds condition codes to indicate the outcome of operations e. g. Positive, negative, zero, interrupts enabled or overflow. 4) Accumulator (ACC) The result of the current set of calculations 5) Current Instruction register (CIR) Holds the current instruction to be executed while it is decoded and executed 6) Memory Address Register (MAR) Holds the address of the memory location currently being accessed by the processor. 7) Memory Buffer Register (MBR) Holds the data item being transferred to or from the memory location currently being accessed by the processor. Sometimes called the MDR (Memory Data Register)
Functional Characteristics of a processor. System Clock and Clock Speed Ø Timing signals that are used to regulate the rate at which instructions are executed Ø Used to synchronise the operation of various computer components. Ø Measured in megahertz (MHz) or gigahertz (GHz) Ø This frequency is known as clock speed. Ø Instructions required a set amount of clock ticks to execute. Ø The frequency of these ticks can be increased by frequency multiplying circuits to the rate that is required by the processor. Ø Clock ticks are provide to regulate the transfer of data, addressed and control signals along the busses at a slower rate than the processor. Ø Clock speeds double every year. • Intel 8088 (1990 – 4. 77 MHz) • 486 DX 2 66 – 66 Mhz (1994 est) • Pentium – Up to 300 Mhz • Pentium 4 up to 3 -4 GHz • Dual Core – Up to 6 GHz • Quad Core
Functional Characteristics of a processor. Limits on Clock Speed A limit needs to be set on clock speed due to the heat being generated by the chip with higher frequencies. This is why modern computers have a fan directly on the chip itself. This causes a deviation from Moore’s law due to the level of heat and power consumption. To solve this problem multiple cores are now used with lower frequencies. Multicore Processors Ø More processors are put onto one microprocessor chip. Ø These processors are called cores Ø Operate at lower frequencies Ø Multiple tasks can be implemented and processes can be split.
Functional Characteristics of a processor. Word Length Computers works with binary words which are codes for instructions, memory addresses, characters, integer numbers, colours of pixels and digitised sound samples. The greater the word length the greater the instruction set, the larger the memory, the larger the numbers that can be used etc. . Increasing Word length Increasing this allows larger operands in instructions preventing the need to spend time breaking down the operands which affects performance. 32 bit computers can have more memory than 16 bits computer as more addresses accessable. Bus Width The number of wires on a bus. Each wire represent one bit of information. This affects the word length. Increasing the bus width will obviously affect the performance as more data and larger addresses can be accessed.
CPU WARS Episode 1 A day in the life of a CPU Fetch Decode Execute Cycle
The Players The Program Counter The Control Unit The Clock The Status Register The Current Instruction Register (CIR) The Memory Data Register (MDR) The Memory Address Register (MAR) The Arithmetic Logic Unit (ALU) The Accumulator The Interrupt Register
Scene 1 – The Fetch Hi PC. What is my next instruction? Hi CU. This is your next instruction and where in Memory you can find it.
Since this is an address the MAR needs to hold its location. F 124 AC 4 D
Scene 1 – The Fetch Address bus – I need you to go to the memory with this address for my next instruction Ah. This is the instruction from the Memory No problem sir!
Scene 1 – The Fetch There you go sir. Thankyou CIR 0110100101 I now need to pass this instruction onto the CIR Right. I can now increment to the next instruction
Scene 2 – The Decode Right. I have my instructions – now what Ah cool. According do they mean? to Instruction Set this. I better my instruction check myis “MOVE” set. 0000101010 – Add instruction 0110100101 – Move 001010 – Subtract 1110101100 – Multiply 1100000111 - Store
Scene 3 – The Execute Ok Guys. Thanks for all of you coming. Here is what I would like you to do…. .
The End…. Tick. .