Processors Fundamentals: CPU Architecture - Computer Science PDF

Summary

This document provides an overview of CPU architecture and its fundamentals. The document explains different components such as the ALU, control unit, registers, and memory. The document also covers concepts like system clock, buses, and factors affecting computer performance, designed for computer science students.

Full Transcript

UNIT 4: Processors Fundamentals **Central processing unit (CPU) architecture** **Von Neumann architecture** -- computer architecture which introduced the concept of the stored program in the 1940s. **Arithmetic logic unit (ALU)** -- component in the processor which carries out all arithmetic and...

UNIT 4: Processors Fundamentals **Central processing unit (CPU) architecture** **Von Neumann architecture** -- computer architecture which introduced the concept of the stored program in the 1940s. **Arithmetic logic unit (ALU)** -- component in the processor which carries out all arithmetic and logical operations. **Control unit** -- ensures synchronisation of data flow and programs throughout the computer by sending out control signals along the control bus. **System clock** -- produces timing signals on the control bus to ensure synchronisation takes place. **Immediate access store (IAS)** -- holds all data and programs needed to be accessed by the control unit. **Accumulator** -- temporary general purpose register which stores numerical values at any part of a given operation. **Register** -- temporary component in the processor which can be general or specific in its use that holds data or instructions as part of the fetch-execute cycle. **Status register** -- used when an instruction requires some form of arithmetic or logical processing. **Flag** -- indicates the status of a bit in the status register, for example, N = 1 indicates the result of an addition gives a negative value. **Address bus** -- carries the addresses throughout the computer system. **Data bus** -- allows data to be carried from processor to memory (and vice versa) or to and from input/output devices. **Control bus** -- carries signals from control unit to all other computer components. **Unidirectional** -- used to describe a bus in which bits can travel in one direction only. **Bidirectional** -- used to describe a bus in which bits can travel in both directions. **Word** -- group of bits used by a computer to represent a single unit. **Clock cycle** -- clock speeds are measured in terms of GHz; this is the vibrational frequency of the clock which sends out pulses along the control bus -- a 3.5GHZ clock cycle means 3.5 billion clock cycles a second. **Overclocking** -- changing the clock speed of a system clock to a value higher than the factory/recommended setting. **BIOS** -- basic input/output system. **Cache memory** -- a high speed auxiliary memory which permits high speed data transfer and retrieval. **Core** -- a unit made up of ALU, control unit and registers which is part of a CPU. A CPU may contain a number of cores. **Dual core** -- a CPU containing two cores. **Quad-core** -- a CPU containing four cores. **Port** -- external connection to a computer which allows it to communicate with various peripheral devices. A number of different port technologies exist. **Universal Serial Bus (USB)** -- a type of port connecting devices to a computer. **Asynchronous serial data transmission** -- serial refers to a single wire being used to transmit bits of data one after the other. Asynchronous refers to a sender using its own clock/timer device rather sharing the same clock/timer with the recipient device. **High-definition multimedia interface (HDMI)** -- type of port connecting devices to a computer. **Video Graphics Array (VGA)** -- type of port connecting devices to a computer. High-bandwidth digital copy protection (HDCP) is part of HDMI technology, which reduces the risk of software and multimedia piracy. **Fetch-execute cycle** -- a cycle in which instructions and data are fetched from memory and then decoded and finally executed. **Program counter (PC)** -- a computer\'s register to store the instruction\'s address currently being executed. **Current instruction register** -- a register used to contain the instruction which is currently being executed or decoded. **Register Transfer Notation (RTN)** -- short hand notation to show movement of data and instructions in a processor, can be used to represent the operation of the fetch-execute cycle. **Interrupt** -- signal sent from a device or software to a processor requesting its attention; the processor suspends all operations until the interrupt has been serviced. **Interrupt priority** -- all interrupts are given a priority so that the processor knows which need to be serviced first and which interrupts are to be dealt with quickly. **Interrupt service routine (ISR) or interrupt handler** -- software which handles interrupt requests (such as 'printer out of paper') and sends the request to the CPU for processing. **[Von Neumann architecture]** **Control Unit** - - - - - **Arithmetic Logic Unit** - - - - **OPERAND:** part of the computer instruction which specifies which data is to be processed **OPCODE:** instruction executed by the CPU **Registers** - - - **GENERAL PURPOSE REGISTER:** hold the temporary data whilst carrying out different operations **SPECIAL PURPOSE REGISTER:** hold s the status of the program 1. 2. 3. 4. 5. 6. 7. **System Clock** - - - **Buses** **Address Bus:** - - - **Control Bus:** - - **Data Bus:** - - - **Factors that affect computer performances** **Data Bus Width:** - - - **Clock speed:** - - - - **Cache memory:** Cache uses SRAM so they have faster access time as there's no need to keep refreshing. Cache memory stores frequently used instructions and data that need to be accessed faster, this improves processor performance. **Number of cores:** - - - **Ports** Act as an interface b/w computers and other peripheral devices **USB:** has the following benefits: - - - - **HDMI:** Advantages Disadvantages ------------------------------------------------------------- ------------------------------ Current standard for modern TVs and monitors Not a very robust connection Very fast data transfer rate Limited cable length Improved security, helps prevent piracy by the help of HDCP Supports modern digital systems **Video Graphics Array (VGA)** Advantages Disadvantages ----------------------------------------------------------------------------- ----------------------------------------------------------------- Simpler technology Doesn't support audio Only one standard is available Outdated as modern laptops and computers rarely have a VGA port It is easy to split the signals and connect several devices from one source Easy to bend the pins when making connections The connection is very secure Supports a higher refresh rate **Fetch-Execute Cycle** - - - - - **Interrupts** It's a signal from a source/device that tells the processor that its attention is needed **Hardware interrupt**: ex. *Printer out of paper, no CD in drive* **Software interrupt:** ex. *Run-time errors, a running program needs input* **How processors handle interrupts:** 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. **Assembly Language** Assembly language is a low-level language. It is a type of programming language which we can use to directly manipulate hardware, such as reading/writing to specific memory address. It is one step above machine code, which is a series of binary numbers. (0s and 1s) **Addressing Modes** Methods of accessing memory are known as addressing modes: - OPCODE OPERAND ACC -------- --------- ----- LDM \#100 100 - OPCODE OPERAND ACC -------- --------- ----- LDD 17 19 - ![](media/image2.png) OPCODE OPERAND ACC -------- --------- ----- LDI 17 30 - ---- --- IX 9 ---- --- OPCODE OPERAND ACC -------- --------- ----- LDI 10 30 - **Assembler** Before a ptogram written in assembly language can be executed, it needs to be translated into machine code. The translation is performed by a program called an assembler. An assembler translates each assembly language instruction into a machine code instruction. **Two types:** Pass 1: - - - - - - Pass 2: - - -

Use Quizgecko on...
Browser
Browser