Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 235 Computer Organization. Computer Organizaton ä Top_Level Structure ä The von-Neumann Machine ä Stack Machine ä Accumulator Machine ä Load/Store.

Similar presentations


Presentation on theme: "CSC 235 Computer Organization. Computer Organizaton ä Top_Level Structure ä The von-Neumann Machine ä Stack Machine ä Accumulator Machine ä Load/Store."— 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 Main Memory Input Output Systems Interconnection Peripherals Communication lines Central Processing Unit Computer

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

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 Main Memory Arithmetic and Logic Unit Program Control Unit Input Output Equipment

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 Main Memory Arithmetic and Logic Unit Program Control Unit Input Output Equipment MBR Arithmetic & Logic Circuits MQAccumulator MAR Control Circuits IBR IR PC Address Instructions & Data Central Processing Unit

10 The execution cycle ä PC = 0; // program counter initialized ä Do ä { INSTRUCTION = MEMORY[PC]; 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

13 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 top of stack, add them and push result onto stack push result onto stack ä Store x// pop top value off stack and put it in memory location of x

14 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

15 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

16 Load/Store Machines ä Each operand is in a register ä The operation is performed using the appropriate registers ä The result is put in a register

17 Load/Store Variations ä PDP-11 ä VAX 11 ä Motorola 68000 ä Intel 80x86 ä Sun Microsystems SPARC computers

18 PDP, VAX, Motorola x = a + b ä move a, r0// r0 = a ä move b, r1// r1 = b ä add r0, r1// r1 = r0 + r1 ä move r1, x// x = r1

19 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

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

21 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 sa addxy 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.


Download ppt "CSC 235 Computer Organization. Computer Organizaton ä Top_Level Structure ä The von-Neumann Machine ä Stack Machine ä Accumulator Machine ä Load/Store."

Similar presentations


Ads by Google