1 / 30

Instruction Sets Address Modes and Formats Week 11

Instruction Sets Address Modes and Formats Week 11. Computer Architecture. Review Keywords & Concepts. English words & ideas you must know: MMX Saturation Arithmetic Stack Call / Return Instructions. What we will learn today. Review last class

konane
Download Presentation

Instruction Sets Address Modes and Formats Week 11

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. Instruction SetsAddress Modes and Formats Week 11 Computer Architecture Computer Architecture

  2. Review Keywords & Concepts • English words & ideas you must know: • MMX • Saturation Arithmetic • Stack • Call / Return Instructions Computer Architecture

  3. What we will learn today • Review last class • Instruction Sets: Addressing Modes & Formats • Addressing • Instruction Formats • QUIZ Computer Architecture

  4. Types of Operations • Data Transfer • Arithmetic • Logical • Conversion • I/O • System Control • Transfer of Control Computer Architecture

  5. Data Transfer • Move – transfer from source to destination • Store – CPU to memory • Load (fetch) – memory to CPU • Exchange – swap contents of src & dest • Clear (reset) – set to all zero’s • Set – set to all one’s • Push – push onto a stack • Pop – pop off a stack Computer Architecture

  6. Transfer of Control • Branch Instruction • Basically sets PC (Program counter) • Jump or ‘goto’ statement • Also, conditional branch (test instructions) • Skip Instructions • ex: ISZ – Increment-and-skip-if-zero • Procedure calls Computer Architecture

  7. Procedure Call Instructions • Stacks • Call - Save State (push onto stack) • Save return address • Save registers • Return – Restore State (pop off stack) • Restore registers • Jump to return address Computer Architecture

  8. Pentium & PowerPC Operation Types • MMX • Designed for Multi-media tasks • SIMD (single-instruction, multiple-data) • Parallel processing feature • Focused on video & audio data Computer Architecture

  9. Byte order • Little-Endian vs. Big-Endian (pages 376-380) • Hexadecimal – 12345678 • Little-Endian • 78563412 • Big-Endian • 12345678 Computer Architecture

  10. Addressing Modes • Immediate • Direct • Indirect • Register • Register Indirect • Displacement • Stack Computer Architecture

  11. Immediate Addressing • Immediate • Operand is actually present in the instruction • Advantage – no memory reference • Disadvantage – limited magnitude opcode, operand operand IS the data Computer Architecture

  12. Direct Addressing • Direct • The address of the data is located in the operand • Advantage – Simple • Disadvantage – Limited Address Space opcode, address operand contains address in main memory • Issue – how many bits available for address? Computer Architecture

  13. Indirect Addressing • Indirect • Operand is an address in memory which contains the ACTUAL address of the real operand • Advantage – large address space • Disadvantage – multiple memory references opcode, address-of-address operand contains the address of the operand • Issue – multiple memory references / clock cycles Computer Architecture

  14. Register Addressing • Register • Operand field refers to a register • Advantage – No memory reference • Disadvantage – Limited address space opcode, register the data for the instruction is stored in a register Computer Architecture

  15. Register Indirect Addressing • Register Indirect • Register contains address of operand • Advantage – Large address space • Disadvantage – Extra memory reference opcode, register register contains address of operand Computer Architecture

  16. Displacement Addressing • Displacement – 3 kinds • Relative addressing • Base-register addressing • Indexing • Combines direct addressing with register indirect addressing • Operand address is determined by adding a direct address to an address in a register Computer Architecture

  17. Displacement – Relative Addressing • Relative Addressing • Direct address is assumed to be PC • Register contains off-set (2’s compliment) • Advantage – flexibility • Disadvantage – complexity opcode, register address in register is added to (or subtracted from) Program Counter Computer Architecture

  18. Displacement – Base-Register • Base-Register • Offset address is in operand • Base register contains ‘base’ address • Final address is direct address PLUS address in base register • Advantage – very flexible • Disadvantage – complex opcode, register, address Computer Architecture

  19. Displacement - Indexing • Indexing • Base address is in operand • Displacement address is in register • Final address is base address PLUS displacement in displacement register • Advantage – very flexible • Disadvantage – complex opcode, register, address Computer Architecture

  20. Displacement - Indexing • Autoindexing • Displacement register is automatically updated (incremented) after each reference Effective Address = Address + (Register) (Register) = (Register + 1) • Can have postindexing & preindexing Computer Architecture

  21. Stack Addressing • Stack • All data is on a stack • Advantage – no memory reference • Disadvantage – limited applicability Computer Architecture

  22. Instruction Formats • Instruction Length • Memory size • Memory organization • Bus structure • CPU complexity • CPU speed Computer Architecture

  23. Instruction Formats • Allocation of Bits • Opcode • Addressing modes • Register versus memory • Number of registers • Address range Computer Architecture

  24. Instruction format – PDP-8 • PDP-8 • 12 bit instructions (12 bit word size) • 3 bit Opcode • 1 bit Direct or Indirect • 1 bit Page 0 or current page • 7 bits Displacement (2 * 128 words) • http://www.faqs.org/faqs/dec-faq/pdp8/section-3.html Computer Architecture

  25. Instruction Formats – PDP-10 • PDP-10 • 36 bit instructions (36 bit word) • 9 bits Opcode • 4 bits Register • 1 bit Indirection • 4 bits Index register • 18 bits address (262,144 words) • http://www.inwap.com/pdp10/opcodes.html Computer Architecture

  26. Instruction Formats • Variable-Length Instructions • PDP-11 • 16 bit minicomputer • 13 different instruction formats • 16 bits to 48 bits per instruction • http://www.village.org/pdp11/faq.pages/PDPinst.html • VAX • 1 or 2 byte opcode • 0 to 6 operands • 1 byte to 37 byte instruction size Computer Architecture

  27. Instruction Formats • Pentium • 0 to 4 byte Prefixes • 1 or 2 byte Opcode • 0 or 1 or 2 byte Optional address specifier • 0,1,2, 4 byte - Optional displacement • 0,1,2,4 byte - Optional immediate field • http://www.laynetworks.com/Pentium_Instruction%20formats.htm Computer Architecture

  28. What you know now • Instructions Sets – Addressing Modes & Formats • Addressing • Immediate • Direct • Indirect • Register • Register Indirect • Displacement • Stack • Pentium & PowerPC Addressing Modes • Instruction Formats • Pentium & PowerPC Instruction Formats Computer Architecture

  29. Reading • Look at the various web pages presented in the slides. Get an idea of various architectures. Next Lecture • CPU Structure & Function Computer Architecture

  30. HomeworkWeek 11 Available on the web page! Computer Architecture

More Related