4. MIPS Instruction Set2

이세진·2022년 4월 3일
0

Computer Science

목록 보기
49/74

생성일: 2021년 9월 21일 오후 5:42

A Basic MIPS Instruction

  1. C Code : a=b+c;
  2. Assembly code : (human-friendly machine instructions)
    add a, b, c # a is the sum of b and c
  3. Machine code : (hardware-friendly machine instructions)
    00000010001100100100000000100000

ISA

Instruction Set Architecture

  • A well-define hardware/software interface
  • The "Contract" between software and hardware

A Language Analogy(유사점) for ISAs

  • ISA is analogous to a human language
    • Allows communication (hardware to software)
    • Need to speak the same language
  • Key differences : ISAs must be unambiguous

RISC vs CISC Foreshadowing(예고)

  • Recall performance equation
    • (instructions/program) (cycles/instruction) (seconds/cycle)
  • CISC (Complex Instruction Set Computing)
    • Improve “instructions/program” with “complex” instructions
    • Easy for assembly-level programmers, good code density
  • RISC (Reduced Instruction Set Computing)
    • Improve “cycles/instruction” with many single-cycle instructions
    • Increases “instruction/program” , but hopefully not as much
    • Perhaps improve clock cycle time (seconds/cycle)

Good ISA

  • Programmability
  • Implement-ability
  • Compatibility

Assembly Language vs. Machine Language

  • Assembly provides convenient symbolic representation
  • Machine language is the underlying reality
  • Assembly can provide 'Pseudoinstructions'

MIPS Instruction Formats

  • 32 bits wide
  • very structured, no unnecessary baggage
  • three instruction formats

profile
나중은 결코 오지 않는다.

0개의 댓글