1 / 21

CSC 235

CSC 235. Computer Organization. Computer Organizaton. Top_Level Structure The von-Neumann Machine Stack Machine Accumulator Machine Load/Store Machine Assemblers. Top Level Structure. Input/Output Main Memory Central Processing Unit (CPU) System Interconnection (Bus).

ira-hooper
Download Presentation

CSC 235

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC 235 Computer Organization

  2. Computer Organizaton • Top_Level Structure • The von-Neumann Machine • Stack Machine • Accumulator Machine • Load/Store Machine • Assemblers

  3. Top Level Structure • Input/Output • Main Memory • Central Processing Unit (CPU) • System Interconnection (Bus)

  4. Structure - Top Level Computer Peripherals Central Processing Unit Main Memory Computer Systems Interconnection Input Output Communication lines

  5. Structure - The CPU CPU Arithmetic and Login Unit Computer Registers I/O System Bus CPU Internal CPU Interconnection Memory Control Unit

  6. 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 • Input and output equipment operated by control unit • Princeton Institute for Advanced Studies • IAS • Completed 1952

  7. Structure of von Neumann machine Arithmetic and Logic Unit Input Output Equipment Main Memory Program Control Unit

  8. IAS - details • 1000 x 40 bit words • Binary number • 2 x 20 bit instructions • Set of registers (storage in CPU) • Memory Buffer Register • Memory Address Register • Instruction Register • Instruction Buffer Register • Program Counter • Accumulator • Multiplier Quotient

  9. Structure of IAS - detail Central Processing Unit Arithmetic and Logic Unit Accumulator MQ Arithmetic & Logic Circuits MBR Input Output Equipment Instructions & Data Main Memory PC IBR MAR IR Control Circuits Address Program Control Unit

  10. The execution cycle • PC = 0; // program counter initialized • Do • { INSTRUCTION = MEMORY[PC]; PC++; DECODE(INSTRUCTION); FETCH(OPERANDS); EXECUTE; STORE(RESULTS); } WHILE (INSTRUCTION != HALT)

  11. The Stack Machine • 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 figure 1.3 of text (next slide).

  12. 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 of x

  13. 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

  14. 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 of x

  15. Load/Store Machines • Each operand is in a register • The operation is performed using the appropriate registers • The result is put in a register

  16. Load/Store Variations • PDP-11 • VAX 11 • Motorola 68000 • Intel 80x86 • Sun Microsystems SPARC computers

  17. PDP, VAX, Motorolax = a + b • move a, r0 // r0 = a • move b, r1 // r1 = b • add r0, r1 // r1 = r0 + r1 • move r1, x // x = r1

  18. 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 • Same machines can have different assemblers

  19. Setting Up for sa • Make the directory bin in your home directory. Use emacs to add $home/bin to your path variable in your .login file. • Make sure the directory /usr/ccs/bin is in your path variable in your .login file. If not, put it there, then save .login. • Copy the program sa from the public directory /export/home/public/spiegel/csc235 to your bin directory. • Give the command source .login to make the changes effective.

  20. Testing sa • Make a directory csc235 in your home directory. • Copy the file addxy.m from the public directory to the csc235 directory. • Give the command saaddxy to test the setup of sa. If it does not compile and run correctly, re-check the previous steps. If it still does not work, see a GA or your professor.

More Related