1 / 30

Let’s make a Computer

Let’s make a Computer. Let’s make a CPU. Pentium. Input A. Input B. 3. 3. 2. 2. add. sub. 5. 1. Output. Arithmetic Logic Unit. ALU. Integer Execution Unit. Input A. Input B. ALU. Output. Multimedia MMX. ALU. 0. 1. 2. 3. 3. 2. 3. 2. 4. add. 5. 5.

kamali
Download Presentation

Let’s make a Computer

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. Let’s make a Computer Comp 1017 Digital Technologies

  2. Let’s make a CPU Comp 1017 Digital Technologies

  3. Pentium Comp 1017 Digital Technologies

  4. Input A Input B 3 3 2 2 add sub 5 1 Output Arithmetic Logic Unit ALU Integer Execution Unit Comp 1017 Digital Technologies

  5. Input A Input B ALU Output Multimedia MMX ALU Comp 1017 Digital Technologies

  6. 0 1 2 3 3 2 3 2 4 add 5 5 Processing Idea Nr. 1 Move data in and out of data memory 1. Move data from memory Data Memory 2. 3. Move data into memory Comp 1017 Digital Technologies

  7. IP 0 1 2 3 3 2 3 2 4 add 5 5 Processing Idea Nr.2 Move instructions into CPU from code memory Instruction Memory (Code Memory) Program Comp 1017 Digital Technologies

  8. Registers-1 AX BX 0 6 6 8 1 8 4 Comp 1017 Digital Technologies

  9. 0 6 6 8 1 8 4 4 Registers-2 AX BX MAR Comp 1017 Digital Technologies

  10. 0 1 Instruction Memory Data Memory mar 4 Our CPU so far … ip Comp 1017 Digital Technologies

  11. SAM-2 Comp 1017 Digital Technologies

  12. Hierarchy of Programming 1. Application mov ax,[x] mov bx,[y] add ax, bx mov [w],ax 2. Written in HLL (C) w = x + y ; 3. CPU executes machine code Comp 1017 Digital Technologies

  13. 0 1 2 mar 3 Instruction Memory 4 Moving data into Registers For example … mov ax , [1] AX BX mov bx , [2] mov ax , [1] 5 mov bx , [2] 7 8 8 7 6 1 Comp 1017 Digital Technologies

  14. 0 1 2 mar 3 Instruction Memory 4 Moving data into Memory For example … mov [3] , ax mov [0], bx AX BX mov [3] , ax 5 7 mov [0] , bx 7 8 8 7 6 8 1 Comp 1017 Digital Technologies

  15. 0 1 2 mar 3 Instruction Memory 4 Adding Numbers For example … add ax , bx AX BX Add ax,bx 5 7 8 8 7 8 7 15 6 1 Comp 1017 Digital Technologies

  16. I’ve never wrestled with such a complex problem before It must take a lot of organization and control ! Comp 1017 Digital Technologies

  17. Pentium Organization and control Comp 1017 Digital Technologies

  18. Fetch-Execute Cycle 1. Fetch instruction from memory 5. Write back results to registers ax <- ALU add ax , bx 4. Do any Memory Access 2. Decode the instruction and read any registers (Data cache) None needed ALU <- ax ALU <- bx 3. Do any ALU operations (execute units) ax + bx Comp 1017 Digital Technologies

  19. 0 1 2 3 4 Fetch-Exec : State 1 Instruction Fetch add ax , bx ax bx add AX BX 3 add ax,bx 3 1 8 7 1 9 Comp 1017 Digital Technologies

  20. 0 1 2 3 4 Fetch-Exec : State 2 Decode, Register Operations add ax , bx ax bx add AX BX 3 add ax,bx 3 1 8 7 1 3 1 9 Comp 1017 Digital Technologies

  21. 0 1 2 3 4 Fetch-Exec : State 3 ALU Operation add ax , bx ax bx add AX BX 3 add ax,bx 8 7 1 3 1 4 9 Comp 1017 Digital Technologies

  22. 0 1 2 3 4 Fetch-Exec : State 4 Memory Access add ax , bx ax bx add AX BX 3 add ax,bx 8 7 1 3 1 4 9 Comp 1017 Digital Technologies

  23. 0 1 2 3 4 Fetch-Exec : State 5 Register Write add ax , bx ax bx add BX 3 add ax,bx 4 8 7 1 3 1 4 9 Comp 1017 Digital Technologies

  24. Fetch-Execute Cycle (Organization and Control) 1. Fetch instruction from memory 5. Write back results to registers Data into ax mov ax , [1] 4. Do any Memory Access 2. Decode the instruction and read any registers Read memory at addr ‘1’ Read the ‘1’ 3. Do any ALU operations (execute units) Put ‘1’ into MAR Comp 1017 Digital Technologies

  25. 0 1 2 3 4 Fetch-Exec : State 1 Instruction Fetch mov ax , [1] mov ax 1 mov ax , [1] 3 8 7 1 9 Comp 1017 Digital Technologies

  26. 0 1 2 3 4 Fetch-Exec : State 2 Decode, Register Operations mov ax , [1] mov ax 1 mov ax , [1] 3 8 7 1 9 Comp 1017 Digital Technologies

  27. 0 1 2 3 4 Fetch-Exec : State 3 ALU Operation mov ax , [1] mov ax 1 mov ax , [1] 3 8 7 1 1 9 Comp 1017 Digital Technologies

  28. 0 1 2 3 4 Fetch-Exec : State 4 Memory Access mov ax , [1] mov ax 1 mov ax , [1] 3 8 8 7 1 1 9 Comp 1017 Digital Technologies

  29. 0 1 2 3 4 Fetch-Exec : State 5 Register Write mov ax , [1] mov ax 1 mov ax , [1] 3 8 8 8 7 1 1 9 Comp 1017 Digital Technologies

  30. 1 Pentium 2 • Fetch • Decode • ALU • Mem Ops • Reg Write 3 4 5 Comp 1017 Digital Technologies

More Related