Computer Organization CSC 235 Computer Organization
Computer Organizaton Top_Level Structure The von-Neumann Machine Microprocessors Machine Architecture Types Stack Machine Accumulator Machine Load/Store Machine Register/Memory Machine Assemblers
Top Level Structure Input/Output Main Memory Central Processing Unit (CPU) System Interconnection (Bus)
Structure - Top Level Computer Peripherals Central Main Processing Unit Main Memory Computer Systems Interconnection Input Output Communication lines
Structure - The CPU CPU Arithmetic Computer and Registers Logic Unit I/O System Bus CPU Internal CPU Interconnection Memory Control Unit
von Neumann Machine
The von Neumann Machine Stored Program concept Main memory storing programs and data ALU operating on binary data Control unit interpreting instructions from memory and executing (asynchronous, no “clock”) Input and output equipment operated by control unit Princeton Institute for Advanced Studies IAS Completed 1952
Structure of von Neumann machine Arithmetic and Logic Unit Input Output Equipment Main Memory Program Control Unit
IAS - details 1000 x 40 bit words Binary number 2 x 20 bit instructions Set of registers (storage in CPU) Memory Buffer Register (general purpose data register) Memory Address Register Instruction Register (opcode) Instruction Buffer Register (next instruction) Program Counter Accumulator Multiplier Quotient
Structure of IAS - detail Central Processing Unit Arithmetic and Logic Unit Accumulator MQ Arithmetic & Logic Circuits Input Output Equipment MBR Instructions & Data Main Memory IBR PC MAR IR Control Circuits Address Program Control Unit
The execution cycle PC = 0; // program counter initialized Do { INSTRUCTION = MEMORY[PC]; PC++; DECODE(INSTRUCTION); FETCH(OPERANDS); EXECUTE; STORE(RESULTS); } WHILE (INSTRUCTION != HALT)
Microprocessors IAS machine Modern computers vacuum tubes Transistors (since the early 1970’s) VLSI (very large scale integration) Complexity increasing at a constant rate Moore’s Law
Intel 8008 (1971)
Intel 8008 Block Diagram 8 bits 3100 Transistors 1971
Microprocessor Evolution
Machine Architecture Types Stack Machine Accumulator Machine Load/Store Machine Register/Memory Machine
The Stack Machine Stack holds instruction operands All operations use the top of Stack. Operands are on top of stack Operation pops its operands from the top of stack. Operation is performed The result is pushed back on the top of stack (see next slide).
x = a + b; Push a; // fetch a from memory and push it onto stack Push b; // fetch b from memory and push it onto stack Add // pop top two values from top of stack, add them and push result onto stack Store x // pop top value off stack and put it in memory location for x
Accumulator Machines One operand is in the special register called the accumulator The other operand (if any) is found in memory The operation is performed and the result is left in the accumulator
x = a + b; Load a; // fetch a from memory and put in accumulator add b; // fetch b from memory and and add it to the accumulator leaving the answer in the accumulator Store x // copy accumulator to memory location for x
Load/Store Machines Each operand is in a register The operation is performed using the appropriate registers The result is put in a register Often used in RISC machines Reduced Instruction Set Computers
Load/Store Machines Power PC (Apple/IBM) ARM MIPS SPARC (Sun Microsystems)
Load/Store Example x = a + b move a, r0 // r0 = a move b, r1 // r1 = b add r0, r1 // r1 = r0 + r1 move r1, x // x = r1
Register/Memory Machine Operands may by in registers, in memory, or in a combination The result may be put in either a register or a memory location Often used in CISC machines Complex Instruction Set Computers
Register/Memory Machines IBM System/360 VAX Motorola 68000 Intel 80x86
Register/Memory Example x = a + b move r0, a // r0 = a add r0, b // r0= a + b move x, r0 // x= r0
Assemblers All code/data is in binary Hard for humans to understand Assemblers allow mnemonics to be used Assemblers allow names for memory locations Assemblers allow labels to used on instructions Different machines have different assemblers Single machine can have different assemblers This is the case for x86 on Windows and Unix!