1 / 82

The Instruction Set Architecture Level

The Instruction Set Architecture Level. Chapter 5. Tradeoffs. Hardware wants simple clean from point of view of components Software wants complex, fast, extended instructions Sales (customers) want backward compatibility. Good ISA. Implement efficiently in current and future technology

Antony
Download Presentation

The Instruction Set Architecture Level

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. The Instruction SetArchitecture Level Chapter 5

  2. Tradeoffs • Hardware wants simple clean from point of view of components • Software wants complex, fast, extended instructions • Sales (customers) want backward compatibility

  3. Good ISA • Implement efficiently in current and future technology • Good target for compiled code

  4. Properities of ISA level • Memory model • Registers • Data Types • Instructions • Security In Addition • Pipeline • Superscalar • Etc. Some officially documented (SPARC)

  5. ISA Level The ISA level is the interface between the compilers and the hardware.

  6. Memory Models An 8-byte word in a little-endian memory. (a) Aligned. (b) Not aligned. Some machines require that words in memory be aligned.

  7. Memory Model • Alignment • Legacy • Cache logic • Synchronization • Serialized • other • Legacy • Split memory data/instructions • Linear • Access modes

  8. Registers • ISA always visible to micro architecture • Micro level some visible to ISA • Register types • General • Specific • Mixed (EDX) • Flag Register – PSW • N negative • Z Zero • V oVerflow • C Carry • A Auxilary cary • P Parity

  9. ISA Modes • Pentium modes • Real mode 8088 compatibility • Virtual 8086 mode – run multiple 8088 protected • Protected mode – all features on • Memory 16K different 4 GB address spaces • Limited by OS

  10. Overview of the Pentium 4 ISA Level The Pentium 4’s primary registers.

  11. UltraSparc III ISA • 64 bit machine • 264 linear memory – larger than needed • Register windows – emulate call stack in registers • Load/store architecture

  12. Overview of the UltraSPARC III ISA Level (1) The UltraSPARC III’s general registers.

  13. Overview of the UltraSPARC III ISA Level (2) Operation of the UltraSPARC III register windows.

  14. 8051 Architecture • 64K for program • 64K for data • Split for ROM/RAM combination • 4 sets of registers ( 8 registers per set) • Allows for quick interrupt • No built in security • Bit Addressable memory • Registers and IO use memory space • Some registers general and some dedicated

  15. Overview of the 8051 ISA Level (a) On-chip memory organization for the 8051. (b) Major 8051 registers.

  16. Data Types on the Pentium 4 The Pentium 4 numeric data types. Supported types are marked with ×.

  17. Data Types on the UltraSPARC III The UltraSPARC III numeric data types. Supported types are marked with ×.

  18. Data Types on the 8051 The 8051 numeric data types. Supported types are marked with ×.

  19. Instruction Formats (1) Four common instruction formats: (a) Zero-address instruction. (b) One-address instruction (c) Two-address instruction. (d) Three-address instruction.

  20. Instruction Formats (2) Some possible relationships between instruction and word length.

  21. Instruction Design Criteria • Stack based vs. many registers • Now vs. the future • Short are better than long (within limits) • Leave room for expansion • Upper limit = (cache band width)/instruction length • Bits in address field

  22. Expanding Opcodes (1) An instruction with a 4-bit opcode and three 4-bit address fields.

  23. Expanding Opcodes (2) An expanding opcode allowing 15 three-address instructions, 14 two-address instructions, 31 one-address instructions, and 16 zero-address instructions. The fields marked xxxx, yyyy, and zzzz are 4-bit address fields.

  24. Pentium opcodes • Highly complex and irregular • 6 variable length fields, 5 are optional • Only one operand in memory

  25. The Pentium 4 Instruction Formats The Pentium 4 instruction formats.

  26. UltraSPARC instruction format • All 32 bit • Aligned in memory • Up to 3 operands in instruction

  27. The UltraSPARC III Instruction Formats The original SPARC instruction formats.

  28. 8051 Instruction format • 6 formats • 1,2 or 3 bytes long • Original 8088 compare to Pentium structure

  29. The 8051 Instruction Formats The 8051 instruction formats.

  30. Address modes • Immediate - embedded constant • Direct – full address in instruction • Register Addressing – refers to register instead of memory • Register Indirect addressing – address in register • Indexed Addressing – memory iindexed by register • Based-Index Addressing – add 2 register plus an optional offset • Stack Addressing – • Index mode – branch +- offset

  31. Addressing An immediate instruction for loading 4 into register 1. Register Indirect Addressing: a generic assembly program for computing the sum of the elements of an array.

  32. Indexed Addressing (1) A generic assembly program for computing the OR of Ai AND Bi for two 1024-element arrays.

  33. Indexed Addressing (2) A possible representation of MOV R4,A(R2).

  34. Reverse Polish Notation (1) Each railroad car represents one symbol in the formula to be converted from infix to reverse Polish notation.

  35. Reverse Polish Notation (2) Decision table used by the infix-to-reverse Polish notation algorithm

  36. Reverse Polish Notation (3) Some examples of infix expressions and their reverse Polish notation equivalents.

  37. Evaluation of Reverse Polish notation Formulas Use of a stack to evaluate a reverse Polish notation formula.

  38. Orthogonality of Opcodes and Addressing Modes (1) A simple design for the instruction formats of a three-address machine.

  39. Orthogonality of Opcodes and Addressing Modes (2) A simple design for the instruction formats of a two-address machine.

  40. The Pentium 4 Addressing Modes (1) The Pentium 4 32-bit addressing modes. M[x] is the memory word at x.

  41. The Pentium 4 Addressing Modes (2) Access to a[i].

  42. Discussion of Addressing Modes A comparison of addressing modes.

  43. Instruction types • Data movement instructions • Dyadic Operations add, sub, mul, div, and • Monadic Operations one operand and one result (shift) • Comparison and Conditional branch • Procedure calls • Loop Control • Input/Output

  44. Loop Control (a) Test-at-the-end loop. (b) Test-at-the-beginning loop.

  45. Input/Output (1) Device registers for a simple terminal.

  46. Input/Output (2) An example of programmed I/O.

  47. Input/Output (3) A system with a DMA controller.

  48. The Pentium 4 Instructions (1) A selection of the Pentium 4 integer instructions.

  49. The Pentium 4 Instructions (2) A selection of the Pentium 4 integer instructions.

  50. The Pentium 4 Instructions (3) A selection of the Pentium 4 integer instructions.

More Related