computer systems 1 fundamentals of computing von neumann & fetch execute cycle

Download Computer Systems 1 Fundamentals of Computing Von Neumann & Fetch Execute Cycle

Post on 27-Dec-2015

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Computer Systems 1Fundamentals of ComputingVon Neumann & Fetch Execute Cycle

    Computer Systems 1 (2004 - 2005)

  • Von-Neumann & Fetch ExecuteVon-Neumann ModelFetch Execute CycleGet ItDo ItFollow these instructions.Von-Neumann BottleneckProblemsRAM attempts to save the world!VRAMClean the Windows

    Computer Systems 1 (2004 - 2005)

  • Von Neumann ModelLogical Structure of the computer systemRoutes of data transfer during processing

    Computer Systems 1 (2004 - 2005)

  • Fetch Execute CycleDefines how instructionsare retrieved and carried out inside the processor (CPU)

    Sometimes called the Instruction Cycle orAutomatic Sequence Control

    Computer Systems 1 (2004 - 2005)

  • Fetch Execute CycleFetch StageCopy contents of PC into MARValue of PC presented via the address busIncrement PC (point to next instruction)

    Copy instruction from MBR into CIR via data busInstruction retrieved from memoryPlaced in CIR

    Computer Systems 1 (2004 - 2005)

  • Fetch!

    Computer Systems 1 (2004 - 2005)

  • Fetch Execute CycleExecute StageDecode instruction from CIR

    Run instruction in CIRMay require getting data from memory

    Unless current instruction is STOP, repeat cycle

    Computer Systems 1 (2004 - 2005)

  • Execute...

    Computer Systems 1 (2004 - 2005)

  • MIPS & HertzMIPS = Millions of Instructions per SecondHow many instructions a processor can carry out each secondOld form of measurementInaccurateSome instructions take longer than othersHz = number of complete cycles per secondMHz = Millions of cycles per secondIn a processor a cycle is when the state of the control lines are changed

    Computer Systems 1 (2004 - 2005)

  • CPU InstructionsInstruction SetThe types of instruction that a particular machine can executeThe instructions that are carried out during the Fetch Execute CycleTypes of instruction:Arithmetic and logical calculations on dataInput and output of dataChanging the sequence of program executionTransferring data between memory and CPU registersTransferring data between CPU registers

    Computer Systems 1 (2004 - 2005)

  • CPU InstructionsInstructions are split into two parts:Opcode (Operation Code)- the operation to be carried outOperand- The data upon which the operation should be performedDifferent manufacturers - different instruction setsCan vary in architectureFunctions will often be the same or similar but may vary in nameMore advanced functions may be presentLikely to vary between manufacturerse.g.- Intel instruction set Vs. AMD instruction set

    Computer Systems 1 (2004 - 2005)

  • Assembly LanguageIs at a level below programming languagesEg.- C++, Java, PascalAssembly language is converted into machine codeMachine code is raw data that would take ages for a human to decipherThis is the data and instructions which is used by the Fetch Execute Cycle

    Computer Systems 1 (2004 - 2005)

  • Assembly LanguagePrograms or sequences can be written in assembly languageWhich is what is effectively done when we compile a C++ programWhy write in assembly language?Faster (direct) access to CPUSome programs need to be written to operate at a lower levelE.g.- Device Drivers

    Computer Systems 1 (2004 - 2005)

  • A simple Assembly program (Honest!)org 100h mov dx,msg mov ah,9 int 21h mov ah,4Ch int 21h msg db 'Hello, World!',0Dh,0Ah,'$'

    Computer Systems 1 (2004 - 2005)

  • A simple Assembly program (Honest!)org 100h mov dx,msg mov ah,9

    int 21h Tells the compiler (NASM) the program will be loaded at memory address 100hMoves the address of our message (msg) into a register which is known as the DX Register (Data Register)Moves the value 9 into a register called the AH Registerint calls an ISR (interrupt service routine) DOS Services this is combined with contents of AH (9) to determine that we want to output a message contents of DX (msg)

    Computer Systems 1 (2004 - 2005)

  • A simple Assembly program (Honest!)mov ah,4Chint 21h

    msg db 'Hello, World!',0Dh,0Ah,'$'Effectively tells the processor to stop (combines int 21h with contents of AH ). Otherwise it will try to fetch and execute the next instructions it comes tomsg is a variable name (the name of out message string)db is an instruction to the compiler to use the information the follows as dataThen out message Hello, World! (note: marks)0Dh, 0Ah performs carriage return and line feed$ terminate string output (int 21h & 9 in ah requirement)

    Computer Systems 1 (2004 - 2005)

  • A simple Assembly program (Honest!)OK, so what does it actually do?Output Hello, World! to the screenHow?Type the program into a text document and call it hello.asmUse the NASM programThis is used to compile assembly language programsRename the produced file as type COMren hello hello.comRun the programhello

    Computer Systems 1 (2004 - 2005)

  • A simple Assembly program (Honest!)

    Computer Systems 1 (2004 - 2005)

  • Von-Neumann BottleneckOriginally CPU & RAM ran at similar speedsCPU development began to increase faster than RAMFundamental problem:CPU is faster than RAM Attempt to solve the problem:Sophisticated RAM technologieswww.knozall.com/squeezingthroughthevonneuman.htm

    Computer Systems 1 (2004 - 2005)

  • Memory (RAM)Many different types of RAMSDRAMSynchronous Dynamic RAMSynchronises with processor busesMax. approx 133 MHzContemporary DDR SDRAMDouble Data Rate SDRAMTransfers data on both sides of the clock cycleEffectively doubles transmission rate

    Computer Systems 1 (2004 - 2005)

  • Memory (RAM)Older methods: EDO DRAMExtended Data Out DRAMGets the next block of memory while current block is being sent to the processor

    BEDO DRAMBurst EDO RAMOnly synchronise with CPU for short time (bursts)Processes four memory addresses in one goOnly supports max. 66MHz processor buses

    Computer Systems 1 (2004 - 2005)

  • Memory (RAM)FPRAMFast Page RAMPage Mode MemoryDynamic RAMAllows faster access to adjacent memory locationsDoes not always store complete addressesNVRAMNon Volatile RAMRetains its contents when power is switched offPowered by a batteryOr uses an EEPROM chipElectrically Erasable Programmable ROMCombination of SRAM and EEPROM chipsSRAM is an NVRAM derivative

    Computer Systems 1 (2004 - 2005)

  • Video Memory (VRAM)WRAMWindows RAMWindows are large blocks of memorySupports two paths to transport dataSends data for display as new information is being sent to the graphic adapters memorySame principle as standard VRAMFaster than ordinary VRAM because of WindowingSGRAMSynchronous Graphic RAMDynamic RAMSynchronise with processor buses up to 100 MHzCapable of opening two memory pages at onceSimulates dual data transmission of VRAM and WRAMBetter than standard VRAM

    Computer Systems 1 (2004 - 2005)

  • CS1: Week 8What you know now:Von-Neumann & Fetch Execute CylcleStages of the F/E CycleRetrievalExecutionPerformance measurementInstruction setsBottleneck remediesTypes of RAMTypes of VRAM

    Computer Systems 1 (2004 - 2005)

Recommended

View more >