Big Picture (and Review)

Size: px
Start display at page:

Download "Big Picture (and Review)"

Transcription

1 Instruction Set Architecture (ISA) CSE 560 Computer Systems Architecture Instruction Set Architecture Application OS Compiler Firmware CPU I/O Memory Digital Circuits Gates & Transistors What is an ISA? A functional contract All ISAs similar at a high level Design choices in the details 2 philosophies : CISC/RISC Difference is blurring Good ISA Enables high performance Not a major PITA Importance of Compatibility Tricks: binary translation, μisas 2 ISWhat? Question: How have I lived such a productive geek life without getting my hands on an ISA? Likely Answer: Because you are young/started late enough not to have suffered through pre-compiler days. Snarky Answer: Maybe you weren t as productive as you think you were. ;) How far are you willing to go for good performance? Ideally: programmers need only write good programs In reality: programmers want to see/consider the assembly to improve performance (compiler choices, etc.) In some realities: designers consider ISA alterations to improve performance further Big Picture (and Review) 3 4 Code int sum(int x, int y) { int t = x+y; return t; } Program Compilation compiler Assembly _sum: pushl %ebp movl %esp,%ebp movl 12(%ebp),%eax addl 8(%ebp),%eax movl %ebp,%esp popl %ebp ret Program written in high-level programming language (C, C++, Java, C#) Hierarchical, structured control: loops, functions, conditionals Hierarchical, structured data: scalars, arrays, pointers, structures Assembly language Human-readable representation Machine language Machine-readable representation 1s and 0s (often displayed in hex) Machine Code 0x <sum>: 0x55 0x89 0xe5 0x8b 0x45... assembler Code Review Which of the following statements is false? A. A compiler needs to be written with both the programming language and the target ISA in mind. B. You can determine the number of static instructions in a program by looking at the assembly code. C. A compiler can take assembled code for one ISA and prepare efficient object/machine code for a different ISA. D. It s easier to convert assembled code into object/machine code than it is to convert C code into assembly code. E. Compiler optimizations usually take place before the assembly code is produced. 5 6

2 Reasoning About Performance How long does it take for a program to execute? Three factors 1. How many instructions must execute to complete program 2. How fast is a single cycle 3. How many cycles does each instruction take to execute Execution Time = instructions seconds cycles program x cycle x instruction Maximizing Performance Execution Time = instructions seconds cycles program x cycle x instruction Instructions per program: Determined by program, compiler, instruction set architecture (ISA) Seconds per cycle: clock period Typical range today: 2ns to 0.25ns Reciprocal is frequency: 0.5 GHz to 4 GHz (1 Hz = 1 cycle per sec) Determined by micro-architecture, technology parameters Cycles per Instruction: CPI Typical range today: 2 to 0.5 Determined by program, compiler, ISA, micro-architecture Minimum execution time minimize each term Difficult: often pull against one another 8 9 What is an ISA? What Is An ISA? ISA (instruction set architecture) A well-defined hardware/software interface The contract between software and hardware Functional definition of operations, modes, and storage locations supported by hardware Precise description of how to invoke, access them Included in ISA: Actual machine instructions (instruction set) Storage interface (registers and memory) Operating modes (user mode vs. supervisor mode) What Is Not In The ISA? Not in the contract : non-functional aspects How operations are implemented Which operations are fast, which are slow and when Which operations take more/less power How memory is implemented Whether or not there is a cache Gardener Example ISA as Contract (1) Which of the following is considered part of an ISA? A. Whether a multiply can operate on data still in memory. B. Whether branch prediction is used. C. The number of cycles it takes to execute a multiply. D. The number of physical registers the machine has. E. Whether instructions can be executed out of order

3 ISA Design Goals What Makes a Good ISA? 1. Programmability Easy to express programs efficiently? 2. Implementability Easy to design high-performance implementations? More recently: low-power, high-reliability, low-cost 3. Compatibility Easy to maintain programmability as languages and programs evolve? x86 (IA32) generations: 8086, 286, 386, 486, Pentium, PentiumII, PentiumIII, Pentium4, Core Programmability Easy to express programs efficiently? For whom? Before 1985: human Compilers were terrible, often code hand-assembled Want high-level coarse-grain instructions As similar to high-level language as possible After 1985: compiler Optimizing compilers generate better code than we do Want low-level fine-grain instructions Compiler can t tell if two high-level idioms match exactly Human Programmability What makes an ISA easy for a human to program in? Proximity to a high-level language (HLL) Closing the semantic gap Semantically heavy (CISC-like) insns that capture complete idioms Access array element, loop, procedure call Example: SPARC save/restore Bad example: x86 rep movsb (copy string) Ridiculous example: VAX insque (insert-into-queue) Semantic clash : what if you have many high-level languages? Stranger than fiction People once thought computers would execute language directly Fortunately, never materialized (but keeps coming back around) Today s Semantic Gap Today s ISAs are actually targeted to one language Just so happens that this language is very low level The C programming language Will ISAs be different when Java/C# become dominant? Object-oriented? Probably not Support for garbage collection? Maybe Support for bounds-checking? Maybe Why? Smart compilers transform HLL to simple instructions Any benefit of tailored ISA is likely small Compiler Optimizations (1) Compilers do two things Code generation Translate HLL to machine insns, 1 statement at a time Optimization Preserve meaning but improve performance Active research area, but some standard optimizations Register allocation, common sub-expression elimination, loop-invariant code motion, loop unrolling, function inlining, code scheduling (to increase insn-level parallelism), etc

4 Compiler Optimizations (2) Reduce dynamic insn count primarily Redundant computation, more things in registers + Registers are faster, fewer loads/stores ISA can make this difficult by having too few registers Also reduce: Branches and jumps Cache misses Dependences between nearby insns (for parallelism) ISA can make this difficult by having implicit dependences How effective are these? + Can give 4X performance over unoptimized code Collective wisdom of 40 years ( Proebsting s Law : Compiler Advances Double Computing Power Every 18 Years) Funny but don t laugh at 4X performance ISA as Contract (2) Which of the following is not considered part of an ISA? A. The number of architected registers a machine has. B. Whether the compiler can inject prefetch instructions. C. Whether the machine has a vector unit. D. Whether a data is stored in the cache after it is fetched from memory. E. The number of bits it takes to encode each instruction Implementability Every ISA can be implemented Not every ISA can be implemented efficiently Classic high-performance implementation techniques Pipelining, parallel execution, out-of-order execution Certain ISA features make these difficult Variable instruction lengths/formats: complicate decoding Implicit state: complicates dynamic scheduling Variable latencies: complicates scheduling Difficult to interrupt instructions: complicate many things Example: memory copy instruction 3. Compatibility In many domains, ISA must remain compatible IBM s 360/370 (the first ISA family ) Another example: Intel s x86 and Microsoft Windows x86 one of the worst designed ISAs EVER, but survives Backward compatibility New processors supporting old programs Can t drop features (cumbersome) Or, update software/os to emulate dropped features (slow) Forward (upward) compatibility Old processors supporting new programs Include a CPU ID so the software can test of features Add ISA hints by overloading no-ops (example: x86 s PAUSE) New firmware/software on old processors to emulate new insn The Compatibility Trap Easy compatibility requires forethought Temptation: some ISA extension gives 5% perf. gain Often: gain diminishes, disappears, or turns to loss Must continue to support gadget for eternity Example: register windows (SPARC) makes OoO difficult Compatibility trap door How to rid yourself of some ISA mistake in the past? Make old insns an illegal insn on new machine OS handles exception, emulates instruction, returns Slow unless extremely uncommon Aspects of ISAs 26 27

5 Aspects of ISAs Begin with VonNeumann model Implicit structure of all modern ISAs CPU + memory (data & insns) Sequential instructions Format Length and encoding Operand model Where (other than memory) are operands stored? Datatypes and operations Control Fetch PC Decode Read Inputs Execute Write Output Next PC The Sequential Model Implicit model of all modern ISAs Basic feature: the program counter (PC) Defines total order on dynamic instruction Next PC is PC++ (except for ctrl insns) Order + named storage define computation Value flows from X to Y via storage A iff: insn X insn Y A A output A input A Processor logically executes loop at left Instruction execution assumed atomic Instruction X finishes before insn X+1 starts More parallel alternatives have been proposed Fetch[PC] Decode Read Inputs Execute Write Output Next PC Instruction Length and Format Length Fixed length Most common is 32 bits + Simple implementation (next PC often just PC+4) Code density: 32 bits to increment a register by 1 Variable length +Code density + x86 can do increment in one 8-bit instruction Complex fetch (where does next instruction begin?) Compromise: two lengths E.g., MIPS16 or ARM s Thumb Encoding A few simple encodings simplify decoder x86 decoder one nasty piece of logic 30 Example Instruction Encodings MIPS Fixed length 32-bits, 3 formats, simple encoding x86 Variable length encoding (1 to 16 bytes) Prefix*(1-4) R-type I-type J-type Op(6) Rs(5) Rt(5) Rd(5) Sh(5) Func(6) Op(6) Rs(5) Rt(5) Immed(16) Op(6) Target(26) Op OpExt* ModRM* SIB* Disp*(1-4) Imm*(1-4) 31 Fetch Decode Read Inputs Execute Write Output Next Insn Operations and Datatypes Datatypes S/W: attribute of data H/W: attribute of operation, data is just 0/1 s All processors support 2 s comp. integer arithmetic/logic (8/16/32/64-bit) IEEE754 floating-point arithmetic (32/64 bit) Intel has 80-bit floating-point Most processors now support Packed-integer insns, e.g., MMX Packed-fp insns, e.g., SSE/SSE2 For multimedia, more about these later Processors no longer (??) support Decimal, other fixed-point arithmetic Binary-coded decimal (BCD) 32 Fetch Decode Read Inputs Execute Write Output Next Insn Where Does Data Live? Memory Fundamental storage space Registers Faster than memory, quite handy Most processors have these too Immediates Values spelled out as bits in instructions Input only 33

6 How Much Memory? Address Size What does 64-bit in a 64-bit ISA mean? Support memory size of 2 64 Alternative (wrong) definition: width of calculation operations Virtual address size Determines size of addressable (usable) memory x86 evolution: 4-bit (4004), 8-bit (8008), 16-bit (8086), 24-bit (80286), 32-bit + protected memory (80386) 64-bit (AMD s Opteron & Intel s EM64T Pentium4) Most ISAs moving to 64 bits (if not already there) How Many Registers? Registers faster than memory, have as many as possible? No One reason registers are faster: there are fewer of them Small is fast (hardware truism) Another: they are directly addressed (no address calc) More of them, means larger specifiers Fewer registers per instruction or indirect addressing Not everything can be put in registers Structures, arrays, anything pointed-to More registers more saving/restoring Trend: more registers: 8 (x86) 32 (MIPS) 128 (IA64) 64-bit x86 has bit integer and bit FP registers How Are Memory Locations Specified? Registers are specified directly Register names are short, encoded in instructions Some instructions implicitly read/write certain registers How are addresses specified? Addresses are long (64-bit) Addressing mode: how are insn bits converted to addresses? Memory Addressing Addressing mode: way of specifying address Used in mem-mem or load/store instructions in register ISA Examples Register-Indirect: R1=mem[R2] Displacement: R1=mem[R2+immed] Index-base: R1=mem[R2+R3] Memory-indirect: R1=mem[mem[R2]] Auto-increment: R1=mem[R2], R2= R2+1 Auto-indexing: R1=mem[R2+immed], R2=R2+immed Scaled: R1=mem[R2+R3*immed1+immed2] PC-relative: R1=mem[PC+imm] What high-level program idioms are these used for? What implementation impact? What impact on insn count? Addressing Modes Examples MIPS Displacement: R1+offset (16-bit) Experiments showed this covered 80% of accesses on VAX x86 (MOV instructions) Absolute: zero + offset (8/16/32-bit) Register indirect: R1 Indexed: R1+R2 Displacement: R1+offset (8/16/32-bit) Scaled: R1 + (R2*Scale) + offset(8/16/32-bit) Scale = 1, 2, 4, 8 2 more issues: alignment & endianness 38 How Many Explicit Operands / ALU Insn? Operand model: how many explicit operands / ALU insn? 3: general-purpose add R1,R2,R3 means [R1] = [R2] + [R3] (MIPS) 2: multiple explicit accumulators (output also input) add R1,R2 means [R2] = [R2] + [R1] (x86) 1: one implicit accumulator add R1 means ACC = ACC + [R1] 0: hardware stack add means STK[TOS++] = STK[--TOS] + STK[--TOS] 4+: useful only in special situations Examples show register operands but operands can be memory addresses, or mixed register/memory ISA w/register-only ALU insns are = load-store architecture 39

7 Operand Model Pros and Cons Metric I: static code size Want: many implicit operands (stack), high level insns Metric II: data memory traffic Want: many long-lived operands on-chip (load-store) Metric III: CPI Want: short latencies, little variability (load-store) CPI and data memory traffic more important these days Trend: most new ISAs are load-store ISAs or hybrids Fetch Decode Read Inputs Execute Write Output Next Insn Control Transfers Default next-pc is PC + sizeof(current insn) Note: PC called IR (instruction register) in x86 Branches and jumps can change that Otherwise dynamic program == static program Not useful Computing targets: where to jump to For all branches and jumps Absolute / PC-relative / indirect Testing conditions: whether to jump at all For (conditional) branches only Compare-branch / condition-codes / condition registers Control Transfers I: Computing Targets The issues How far (statically) do you need to jump? (w/in fn vs outside) Do you need to jump to a different place each time? How many bits do you need to encode the target? PC-relative Position-independent within procedure Used for branches and jumps within a procedure Absolute Position independent outside procedure Used for procedure calls Indirect (target found in register) Needed for jumping to dynamic targets For returns, dynamic procedure calls, switch statements Control Transfers II: Testing Conditions Compare and branch insns branch-less-than R1,10,target +Simple Two ALUs (for condition & target address) Extra latency Implicit condition codes (x86) cmp R1,10 // sets negative CC/flag branch-neg target + More room for target, condition codes set for free + Branch insn simple and fast Implicit dependence is tricky Conditions in regs, separate branch (MIPS) set-less-than R2,R1,10 branch-not-equal-zero R2,target Additional insns + one ALU per insn, explicit dependence > 80% of branches are (in)equalities/comparisons to ISAs Also Include Support For Operating systems & memory protection Privileged mode System call (TRAP) Exceptions & interrupts Interacting with I/O devices Multiprocessor support Atomic operations for synchronization Data-level parallelism Pack many values into a wide register Intel s SSE2: 4x32-bit float-point values in 128-bit register Define parallel operations (four adds in one cycle) The RISC vs. CISC Debate 44 45

8 RISC and CISC RISC: reduced-instruction set computer Coined by Patterson in early 80 s Berkeley RISC-I (Patterson), Stanford MIPS (Hennessy), IBM 801 (Cocke), PowerPC, ARM, SPARC, Alpha, PA-RISC CISC: complex-instruction set computer Term didn t exist before RISC x86, VAX, Motorola 68000, etc. Philosophical war (one of several) started in mid 1980 s RISC won the technology battles CISC won the high-end commercial war (1990s to today) Compatibility a stronger force than anyone (but Intel) thought RISC won the embedded computing war The Setup Pre 1980 Bad compilers (so assembly written by hand) Complex, high-level ISAs (easier to write assembly) Around 1982 Moore s Law makes fast single-chip microprocessor possible but only for small, simple ISAs Performance advantage of integration was compelling Compilers had to get involved in a big way RISC manifesto: create ISAs that Simplify single-chip implementation Facilitate optimizing compilation The RISC Tenets Single-cycle execution CISC: many multicycle operations Hardwired control CISC: microcoded multi-cycle operations Load/store architecture CISC: register-memory and memory-memory Few memory addressing modes CISC: many modes Fixed-length instruction format CISC: many formats and lengths Reliance on compiler optimizations CISC: hand assemble to get good performance Many registers (compilers are better at using them) CISC: few registers CISCs and RISCs The CISCs: x86, VAX (Virtual Address extension to PDP-11) Variable length instructions: bytes!!! 14 GPRs + PC + stack-pointer + condition codes Data sizes: 8, 16, 32, 64, 128 bit, decimal, string Memory-memory instructions for all data sizes Special insns: crc, insque, polyf, and a cast of hundreds x86: Difficult to explain and impossible to love The RISCs: MIPS, PA-RISC, SPARC, PowerPC, Alpha, ARM 32-bit instructions 32 integer registers, 32 floating point registers, load-store 64-bit virtual address space Few addressing modes (Alpha has 1, SPARC/PowerPC more) Why so many? Everyone wanted their own The Debate RISC argument CISC is fundamentally handicapped by complexity For a given technology, RISC will be better (faster) Current technology enables single-chip RISC When it enables single-chip CISC, RISC will be pipelined When it enables pipelined CISC, RISC will have caches When it enables CISC with caches, RISC will have next thing... CISC rebuttal CISC flaws not fundamental, fixable with more transistors Moore s Law will narrow the RISC/CISC gap (true) Good pipeline: RISC = 100K transistors, CISC = 300K By 1995: 2M+ transistors had evened playing field Software costs dominate, compatibility is paramount Current Winner (Volume): RISC ARM (Acorn RISC Machine Advanced RISC Machine) First ARM chip in mid-1980s (from Acorn Computer Ltd). 1.2 billion units sold in 2004 (>50% of all 32/64-bit CPUs) Low-power and embedded devices (ipod, for example) Significance of embedded? ISA compatibility less powerful force 32-bit RISC ISA 16 registers, PC is one of them Many addressing modes, e.g., auto increment Condition codes, each instruction can be conditional Multiple implementations X-scale (design was DEC s, bought by Intel, sold to Marvel) Others: Freescale (was Motorola), Texas Instruments, STMicroelectronics, Samsung, Sharp, Philips, etc

9 Current Winner (Revenue): CISC x86 was first 16-bit microprocessor by ~2 years IBM put it into its PCs because there was no competing choice Rest is historical inertia and financial feedback x86 is most difficult ISA to implement and do it fast but Because Intel sells the most non-embedded processors It has the most money Which it uses to hire more and better engineers Which it uses to maintain competitive performance And given competitive performance, compatibility wins So Intel sells the most non-embedded processors AMD as a competitor keeps pressure on x86 performance Moore s law has helped Intel in a big way Most engineering problems can be solved with more transistors Intel s Compatibility Trick: RISC Inside 1993: Intel wanted out-of-order execution in Pentium Pro Hard to do with a coarse grain ISA like x86 Solution? Translate x86 to RISC ops in hardware push $eax becomes (we think, uops are proprietary) store $eax [$esp-4] addi $esp,$esp,-4 + Processor maintains x86 ISA externally for compatibility + But executes RISC ISA internally for implementability Given translator, x86 almost as easy to implement as RISC Intel implemented out-of-order before any RISC company Also, OoO also benefits x86 more (because ISA limits compiler) Idea co-opted by other x86 companies: AMD and Transmeta Enter Micro-Ops (1) Most instructions are a single micro-op, uop Add, xor, compare, branch, etc. Loads example: mov -4(%rax), %ebx Stores example: mov %ebx, -4(%rax) Each operation on a memory location micro-ops++ addl -4(%rax), %ebx = 2 uops (load, add) addl %ebx, -4(%rax) = 3 uops (load, add, store) What about address generation? Simple address generation: single micro-op Complicated (scaled addressing) & sometimes store addresses: calculated separately Enter Micro-Ops (2) Function call (CALL) 4 uops Get program counter, store program counter to stack, adjust stack pointer, unconditional jump to function start Return from function (RET) 3 uops Adjust stack pointer, load return address from stack, jump to return address Other operations String manipulations instructions For example STOS is around six micro-ops, etc. Micro-ops: part of the microarchitecture, not the architecture Cracking Macro-ops into Micro-ops Two forms of μop cracking Hard-coded logic: fast, but expensive (for insn in few μops) Simple Decoder: 1 1 Complex Decoder: x in size Table Lookup: slow, but off to the side (not shown) doesn t complicate rest of machine Handles really complicated instructions add Fetched Instructions stos cmp ret sub Simple Decoder Complex ret Decoder Big Table (far away) stos stos stos stos Decoded/Cracked Instructions 56 Micro-Op changes over time x86 code is becoming more RISC-like. IA32 x86-64: 1. Double number of registers 2. Better function calling conventions Result? Fewer pushes, pops, and complicated instructions ~1.6 μops / macro-op ~1.1 μops / macro-op Fusion: Intel s newest processors fuse certain instruction pairs Macro-op fusion: fuses compare and branch instructions 2 macro-ops 1 simple micro-op (uses simple decoder) Micro-op fusion: fuses ld/add pairs, fuses store addr & data 1 complex macro-op 1 simple macro-op (uses simple decoder) 57

10 Ultimate Compatibility Trick Support old ISA with a simple processor for that ISA in the system How first Itanium supported x86 code x86 processor (comparable to Pentium) on chip How PlayStation2 supported PlayStation games Used PlayStation processor for I/O chip & emulation Translation and Virtual ISAs New compatibility interface: ISA + translation software Binary-translation: transform static image, run native Emulation: unmodified image, interpret each dynamic insn, optimize on-the-fly Examples: FX!32 (x86 on Alpha), Rosetta (PowerPC on x86) Virtual ISAs: designed for translation, not direct execution Target for high-level compiler (one per language) Source for low-level translator (one per ISA) Examples: Java Bytecodes, C# CLR (Common Language Runtime) Transmeta s Code morphing: x86 translation in software Only code morphing translation software written in native ISA Native ISA is invisible to applications and even OS Guess who owns this technology now? RISC & CISC for Performance Recall performance equation: seconds instructions cycles seconds program = x x program instruction cycle CISC (Complex Instruction Set Computing) RISC (Reduced Instruction Set Computing) RISC & CISC for Performance Recall performance equation: seconds instructions cycles seconds program = x x program instruction cycle CISC (Complex Instruction Set Computing) RISC (Reduced Instruction Set Computing) insns program cycles insn seconds cycle other insns program cycles insn seconds cycle other CISC CISC + Easy for assemblylevel programmers + good code density RISC RISC hopefully not too much if designed aggressively + smart compilers can help with insns/program RISC & CISC for Performance Recall performance equation: seconds instructions cycles seconds program = x x program instruction cycle CISC (Complex Instruction Set Computing) RISC (Reduced Instruction Set Computing) CISC RISC insns program hopefully not too much cycles insn seconds cycle if designed aggressively other + Easy for assemblylevel programmers + good code density + smart compilers can help with insns/program 62

Big Picture (and Review)

Big Picture (and Review) Instruction Set Architecture (ISA) CSE 560 Computer Systems Architecture Instruction Set Architecture Application OS Compiler Firmware CPU I/O Memory Digital Circuits Gates & Transistors What is an ISA?

More information

Aspects of ISAs. Aspects of ISAs. Instruction Length and Format. The Sequential Model. Operations and Datatypes. Example Instruction Encodings

Aspects of ISAs. Aspects of ISAs. Instruction Length and Format. The Sequential Model. Operations and Datatypes. Example Instruction Encodings Aspects of ISAs Begin with VonNeumann model Implicit structure of all modern ISAs CPU + memory (data & insns) Sequential instructions Aspects of ISAs Format Length and encoding Operand model Where (other

More information

CIS 371 Computer Organization and Design

CIS 371 Computer Organization and Design CIS 371 Computer Organization and Design Unit 14: Instruction Set Architectures CIS 371: Comp. Org. Prof. Milo Martin Instruction Sets 1 Instruction Set Architecture (ISA) Application OS Compiler Firmware

More information

Unit 2: Instruction Set Architectures

Unit 2: Instruction Set Architectures Computer Architecture Unit 2: Instruction Set Architectures Slides'developed'by'Milo'Mar0n'&'Amir'Roth'at'the'University'of'Pennsylvania' with'sources'that'included'university'of'wisconsin'slides' by'mark'hill,'guri'sohi,'jim'smith,'and'david'wood'

More information

Outline. What Makes a Good ISA? Programmability. Implementability. Programmability Easy to express programs efficiently?

Outline. What Makes a Good ISA? Programmability. Implementability. Programmability Easy to express programs efficiently? Outline Instruction Sets in General MIPS Assembly Programming Other Instruction Sets Goals of ISA Design RISC vs. CISC Intel x86 (IA-32) What Makes a Good ISA? Programmability Easy to express programs

More information

Outline. What Makes a Good ISA? Programmability. Implementability

Outline. What Makes a Good ISA? Programmability. Implementability Outline Instruction Sets in General MIPS Assembly Programming Other Instruction Sets Goals of ISA Design RISC vs. CISC Intel x86 (IA-32) What Makes a Good ISA? Programmability Easy to express programs

More information

ISA Design Goals. Instruction Set Architecture (ISA) CIS 501 Computer Architecture. Readings. What is a good ISA? Aspects of ISAs RISC vs.

ISA Design Goals. Instruction Set Architecture (ISA) CIS 501 Computer Architecture. Readings. What is a good ISA? Aspects of ISAs RISC vs. Instruction Set Architecture (ISA) CIS 501 Computer Architecture Unit 3: Instruction Set Architecture Application OS Compiler Firmware CPU I/O Memory Digital Circuits Gates & Transistors What is a good

More information

What is an ISA? Instruction Set Architecture (ISA) CIS 501 Computer Architecture. Readings. What is an ISA? What is a good ISA? A bit on RISC vs.

What is an ISA? Instruction Set Architecture (ISA) CIS 501 Computer Architecture. Readings. What is an ISA? What is a good ISA? A bit on RISC vs. Instruction Set Architecture (ISA) CIS 501 Computer Architecture Unit 1: Instruction Set Architecture Application OS Compiler Firmware CPU I/O Memory Digital Circuits Gates & Transistors What is an ISA?

More information

Unit 2: Instruction Set Architectures. Execution Model. Instruction Set Architecture (ISA) CIS 501: Computer Architecture.

Unit 2: Instruction Set Architectures. Execution Model. Instruction Set Architecture (ISA) CIS 501: Computer Architecture. Instruction Set Architecture (ISA) CIS 501: Computer Architecture Unit 2: Instruction Set Architectures Slides'developed'by'Milo'Mar0n'&'Amir'Roth'at'the'University'of'Pennsylvania' with'sources'that'included'university'of'wisconsin'slides'

More information

Recall from CIS240. Instruction Set Architecture (ISA) CIS 371 Computer Organization and Design. Readings. What is an ISA? A functional contract

Recall from CIS240. Instruction Set Architecture (ISA) CIS 371 Computer Organization and Design. Readings. What is an ISA? A functional contract Instruction Set Architecture (ISA) CIS 371 Computer Organization and Design Unit 1: Instruction Set Architectures Slides developed by Milo Martin & Amir Roth at the University of Pennsylvania with sources

More information

Big Picture (and Review)

Big Picture (and Review) Instruction Set Architecture (ISA) CIS 501 Computer Architecture Unit 1: Instruction Set Architecture Slides developed by Milo Martin & Amir Roth at the University of Pennsylvania with sources that included

More information

What Is An ISA? U. Wisconsin CS/ECE 752 Advanced Computer Architecture I. RISC vs CISC Foreshadowing. A Language Analogy for ISAs.

What Is An ISA? U. Wisconsin CS/ECE 752 Advanced Computer Architecture I. RISC vs CISC Foreshadowing. A Language Analogy for ISAs. U. Wisconsin CS/ECE 752 Advanced Computer Architecture I Prof. David A. Wood Unit 2: Instruction Set Architecture Slides developed by Amir Roth of University of Pennsylvania with sources that included

More information

Computer Systems Architecture I. CSE 560M Lecture 3 Prof. Patrick Crowley

Computer Systems Architecture I. CSE 560M Lecture 3 Prof. Patrick Crowley Computer Systems Architecture I CSE 560M Lecture 3 Prof. Patrick Crowley Plan for Today Announcements Readings are extremely important! No class meeting next Monday Questions Commentaries A few remaining

More information

RISC, CISC, and ISA Variations

RISC, CISC, and ISA Variations RISC, CISC, and ISA Variations CS 3410 Computer System Organization & Programming These slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. iclicker

More information

ISA and RISCV. CASS 2018 Lavanya Ramapantulu

ISA and RISCV. CASS 2018 Lavanya Ramapantulu ISA and RISCV CASS 2018 Lavanya Ramapantulu Program Program =?? Algorithm + Data Structures Niklaus Wirth Program (Abstraction) of processor/hardware that executes 3-Jul-18 CASS18 - ISA and RISCV 2 Program

More information

Typical Processor Execution Cycle

Typical Processor Execution Cycle Typical Processor Execution Cycle Instruction Fetch Obtain instruction from program storage Instruction Decode Determine required actions and instruction size Operand Fetch Locate and obtain operand data

More information

Review: Procedure Call and Return

Review: Procedure Call and Return Review: Procedure Call and Return int equal(int a1, int a2) { int tsame; tsame = 0; if (a1 == a2) tsame = 1; return(tsame); } main() { int x,y,same; x = 43; y = 2; same = equal(x,y); // other computation

More information

Lecture 4: Instruction Set Architecture

Lecture 4: Instruction Set Architecture Lecture 4: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation Reading: Textbook (5 th edition) Appendix A Appendix B (4 th edition)

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, McKee, and Sirer. Prelim today Starts

More information

Computer Systems Laboratory Sungkyunkwan University

Computer Systems Laboratory Sungkyunkwan University ARM & IA-32 Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ARM (1) ARM & MIPS similarities ARM: the most popular embedded core Similar basic set

More information

Instruction Set Design

Instruction Set Design Instruction Set Design software instruction set hardware CPE442 Lec 3 ISA.1 Instruction Set Architecture Programmer's View ADD SUBTRACT AND OR COMPARE... 01010 01110 10011 10001 11010... CPU Memory I/O

More information

EC 413 Computer Organization

EC 413 Computer Organization EC 413 Computer Organization Review I Prof. Michel A. Kinsy Computing: The Art of Abstraction Application Algorithm Programming Language Operating System/Virtual Machine Instruction Set Architecture (ISA)

More information

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces Lecture 3 Machine Language Speaking computer before voice recognition interfaces 1 Instructions: Language of the Machine More primitive than higher level languages e.g., no sophisticated control flow Very

More information

RISC Principles. Introduction

RISC Principles. Introduction 3 RISC Principles In the last chapter, we presented many details on the processor design space as well as the CISC and RISC architectures. It is time we consolidated our discussion to give details of RISC

More information

Instruction Set Architecture. "Speaking with the computer"

Instruction Set Architecture. Speaking with the computer Instruction Set Architecture "Speaking with the computer" The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture Digital Design

More information

Instruction Set Principles and Examples. Appendix B

Instruction Set Principles and Examples. Appendix B Instruction Set Principles and Examples Appendix B Outline What is Instruction Set Architecture? Classifying ISA Elements of ISA Programming Registers Type and Size of Operands Addressing Modes Types of

More information

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Instruction Set Principles The Role of Compilers MIPS 2 Main Content Computer

More information

Page 1. Structure of von Nuemann machine. Instruction Set - the type of Instructions

Page 1. Structure of von Nuemann machine. Instruction Set - the type of Instructions Structure of von Nuemann machine Arithmetic and Logic Unit Input Output Equipment Main Memory Program Control Unit 1 1 Instruction Set - the type of Instructions Arithmetic + Logical (ADD, SUB, MULT, DIV,

More information

Virtual Machines and Dynamic Translation: Implementing ISAs in Software

Virtual Machines and Dynamic Translation: Implementing ISAs in Software Virtual Machines and Dynamic Translation: Implementing ISAs in Software Krste Asanovic Laboratory for Computer Science Massachusetts Institute of Technology Software Applications How is a software application

More information

Instruction Set Principles. (Appendix B)

Instruction Set Principles. (Appendix B) Instruction Set Principles (Appendix B) Outline Introduction Classification of Instruction Set Architectures Addressing Modes Instruction Set Operations Type & Size of Operands Instruction Set Encoding

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA)... the attributes of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data

More information

Systems Architecture I

Systems Architecture I Systems Architecture I Topics Assemblers, Linkers, and Loaders * Alternative Instruction Sets ** *This lecture was derived from material in the text (sec. 3.8-3.9). **This lecture was derived from material

More information

Real instruction set architectures. Part 2: a representative sample

Real instruction set architectures. Part 2: a representative sample Real instruction set architectures Part 2: a representative sample Some historical architectures VAX: Digital s line of midsize computers, dominant in academia in the 70s and 80s Characteristics: Variable-length

More information

Review of instruction set architectures

Review of instruction set architectures Review of instruction set architectures Outline ISA and Assembly Language RISC vs. CISC Instruction Set Definition (MIPS) 2 ISA and assembly language Assembly language ISA Machine language 3 Assembly language

More information

Evolution of ISAs. Instruction set architectures have changed over computer generations with changes in the

Evolution of ISAs. Instruction set architectures have changed over computer generations with changes in the Evolution of ISAs Instruction set architectures have changed over computer generations with changes in the cost of the hardware density of the hardware design philosophy potential performance gains One

More information

General Purpose Processors

General Purpose Processors Calcolatori Elettronici e Sistemi Operativi Specifications Device that executes a program General Purpose Processors Program list of instructions Instructions are stored in an external memory Stored program

More information

Computer Architecture

Computer Architecture Computer Architecture Lecture 3: ISA Tradeoffs Dr. Ahmed Sallam Suez Canal University Based on original slides by Prof. Onur Mutlu Application Space Dream, and they will appear 2 Design Point A set of

More information

Instruction Set Architecture

Instruction Set Architecture Instruction Set Architecture Instructor: Preetam Ghosh Preetam.ghosh@usm.edu CSC 626/726 Preetam Ghosh Language HLL : High Level Language Program written by Programming language like C, C++, Java. Sentence

More information

Instruction Set Architectures

Instruction Set Architectures Instruction Set Architectures ISAs Brief history of processors and architectures C, assembly, machine code Assembly basics: registers, operands, move instructions 1 What should the HW/SW interface contain?

More information

ECE 486/586. Computer Architecture. Lecture # 8

ECE 486/586. Computer Architecture. Lecture # 8 ECE 486/586 Computer Architecture Lecture # 8 Spring 2015 Portland State University Lecture Topics Instruction Set Principles MIPS Control flow instructions Dealing with constants IA-32 Fallacies and Pitfalls

More information

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements CSE141: Introduction to Computer Architecture CSE 141 Computer Architecture Spring 2005 Lecture 3 Instruction Set Architecute Pramod V. Argade April 4, 2005 Instructor: TAs: Pramod V. Argade (p2argade@cs.ucsd.edu)

More information

Chapter 13 Reduced Instruction Set Computers

Chapter 13 Reduced Instruction Set Computers Chapter 13 Reduced Instruction Set Computers Contents Instruction execution characteristics Use of a large register file Compiler-based register optimization Reduced instruction set architecture RISC pipelining

More information

Computer Architecture

Computer Architecture Computer Architecture Lecture 3: ISA Tradeoffs Dr. Ahmed Sallam Suez Canal University Spring 2015 Based on original slides by Prof. Onur Mutlu Design Point A set of design considerations and their importance

More information

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles. ECE 486/586 Computer Architecture Lecture # 8 Spring 2015 Portland State University Instruction Set Principles MIPS Control flow instructions Dealing with constants IA-32 Fallacies and Pitfalls Reference:

More information

55:132/22C:160, HPCA Spring 2011

55:132/22C:160, HPCA Spring 2011 55:132/22C:160, HPCA Spring 2011 Second Lecture Slide Set Instruction Set Architecture Instruction Set Architecture ISA, the boundary between software and hardware Specifies the logical machine that is

More information

Reminder: tutorials start next week!

Reminder: tutorials start next week! Previous lecture recap! Metrics of computer architecture! Fundamental ways of improving performance: parallelism, locality, focus on the common case! Amdahl s Law: speedup proportional only to the affected

More information

administrivia final hour exam next Wednesday covers assembly language like hw and worksheets

administrivia final hour exam next Wednesday covers assembly language like hw and worksheets administrivia final hour exam next Wednesday covers assembly language like hw and worksheets today last worksheet start looking at more details on hardware not covered on ANY exam probably won t finish

More information

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture

EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture EITF20: Computer Architecture Part2.1.1: Instruction Set Architecture Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Instruction Set Principles The Role of Compilers MIPS 2 Main Content Computer

More information

Instruction Set Architectures

Instruction Set Architectures Instruction Set Architectures! ISAs! Brief history of processors and architectures! C, assembly, machine code! Assembly basics: registers, operands, move instructions 1 What should the HW/SW interface

More information

CS 31: Intro to Systems ISAs and Assembly. Martin Gagné Swarthmore College February 7, 2017

CS 31: Intro to Systems ISAs and Assembly. Martin Gagné Swarthmore College February 7, 2017 CS 31: Intro to Systems ISAs and Assembly Martin Gagné Swarthmore College February 7, 2017 ANNOUNCEMENT All labs will meet in SCI 252 (the robot lab) tomorrow. Overview How to directly interact with hardware

More information

ECE 486/586. Computer Architecture. Lecture # 7

ECE 486/586. Computer Architecture. Lecture # 7 ECE 486/586 Computer Architecture Lecture # 7 Spring 2015 Portland State University Lecture Topics Instruction Set Principles Instruction Encoding Role of Compilers The MIPS Architecture Reference: Appendix

More information

Lecture 4: Instruction Set Design/Pipelining

Lecture 4: Instruction Set Design/Pipelining Lecture 4: Instruction Set Design/Pipelining Instruction set design (Sections 2.9-2.12) control instructions instruction encoding Basic pipelining implementation (Section A.1) 1 Control Transfer Instructions

More information

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro 1 Levels of Representation/Interpretation Machine Interpretation High Level Language Program (e.g., C) Compiler Assembly

More information

Practical Malware Analysis

Practical Malware Analysis Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the

More information

Slides for Lecture 6

Slides for Lecture 6 Slides for Lecture 6 ENCM 501: Principles of Computer Architecture Winter 2014 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 28 January,

More information

CHAPTER 5 A Closer Look at Instruction Set Architectures

CHAPTER 5 A Closer Look at Instruction Set Architectures CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 293 5.2 Instruction Formats 293 5.2.1 Design Decisions for Instruction Sets 294 5.2.2 Little versus Big Endian 295 5.2.3 Internal

More information

History of the Intel 80x86

History of the Intel 80x86 Intel s IA-32 Architecture Cptr280 Dr Curtis Nelson History of the Intel 80x86 1971 - Intel invents the microprocessor, the 4004 1975-8080 introduced 8-bit microprocessor 1978-8086 introduced 16 bit microprocessor

More information

Instruction Set Architectures. Part 1

Instruction Set Architectures. Part 1 Instruction Set Architectures Part 1 Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture Digital Design Circuit Design 1/9/02 Some ancient history Earliest (1940

More information

Processor Architecture

Processor Architecture Processor Architecture Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE2030: Introduction to Computer Systems, Spring 2018, Jinkyu Jeong (jinkyu@skku.edu)

More information

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA) COMP2121: Microprocessors and Interfacing Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Contents Memory models Registers Data types Instructions

More information

Processor Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Processor Architecture. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Processor Architecture Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Moore s Law Gordon Moore @ Intel (1965) 2 Computer Architecture Trends (1)

More information

Chapter 2. Instruction Set Design. Computer Architectures. software. hardware. Which is easier to change/design??? Tien-Fu Chen

Chapter 2. Instruction Set Design. Computer Architectures. software. hardware. Which is easier to change/design??? Tien-Fu Chen Computer Architectures Chapter 2 Tien-Fu Chen National Chung Cheng Univ. chap2-0 Instruction Set Design software instruction set hardware Which is easier to change/design??? chap2-1 Instruction Set Architecture:

More information

Lecture 4: RISC Computers

Lecture 4: RISC Computers Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 1 Introduction Reduced Instruction Set Computer (RISC) represents an important

More information

COS 140: Foundations of Computer Science

COS 140: Foundations of Computer Science COS 140: Foundations of Computer Science CPU Organization and Assembly Language Fall 2018 CPU 3 Components of the CPU..................................................... 4 Registers................................................................

More information

Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University. See P&H Appendix , and 2.21

Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University. See P&H Appendix , and 2.21 Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See P&H Appendix 2.16 2.18, and 2.21 There is a Lab Section this week, C Lab2 Project1 (PA1) is due next Monday, March

More information

Chapter 2: Instructions How we talk to the computer

Chapter 2: Instructions How we talk to the computer Chapter 2: Instructions How we talk to the computer 1 The Instruction Set Architecture that part of the architecture that is visible to the programmer - instruction formats - opcodes (available instructions)

More information

Advanced Computer Architecture

Advanced Computer Architecture ECE 563 Advanced Computer Architecture Fall 2007 Lecture 14: Virtual Machines 563 L14.1 Fall 2009 Outline Types of Virtual Machine User-level (or Process VMs) System-level Techniques for implementing all

More information

Processing Unit CS206T

Processing Unit CS206T Processing Unit CS206T Microprocessors The density of elements on processor chips continued to rise More and more elements were placed on each chip so that fewer and fewer chips were needed to construct

More information

CHAPTER 5 A Closer Look at Instruction Set Architectures

CHAPTER 5 A Closer Look at Instruction Set Architectures CHAPTER 5 A Closer Look at Instruction Set Architectures 5.1 Introduction 199 5.2 Instruction Formats 199 5.2.1 Design Decisions for Instruction Sets 200 5.2.2 Little versus Big Endian 201 5.2.3 Internal

More information

2.7 Supporting Procedures in hardware. Why procedures or functions? Procedure calls

2.7 Supporting Procedures in hardware. Why procedures or functions? Procedure calls 2.7 Supporting Procedures in hardware Why procedures or functions? Procedure calls Caller: Callee: Proc save registers save more registers set up parameters do function call procedure set up results get

More information

Instruction Set Architecture ISA ISA

Instruction Set Architecture ISA ISA Instruction Set Architecture ISA Today s topics: Note: desperate attempt to get back on schedule we won t cover all of these slides use for reference Risk vs. CISC x86 does both ISA influence on performance

More information

Computer Architecture Lecture 3: ISA Tradeoffs. Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/17/2014

Computer Architecture Lecture 3: ISA Tradeoffs. Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/17/2014 18-447 Computer Architecture Lecture 3: ISA Tradeoffs Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/17/2014 Design Point A set of design considerations and their importance leads to tradeoffs

More information

EC-801 Advanced Computer Architecture

EC-801 Advanced Computer Architecture EC-801 Advanced Computer Architecture Lecture 5 Instruction Set Architecture I Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC University Taxila!1 Instruction Set Architecture

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Warren Hunt, Jr. and Bill Young Department of Computer Sciences University of Texas at Austin Last updated: October 1, 2014 at 12:03 CS429 Slideset 6: 1 Topics

More information

Chapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1

Chapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1 Chapter 2 1 MIPS Instructions Instruction Meaning add $s1,$s2,$s3 $s1 = $s2 + $s3 sub $s1,$s2,$s3 $s1 = $s2 $s3 addi $s1,$s2,4 $s1 = $s2 + 4 ori $s1,$s2,4 $s2 = $s2 4 lw $s1,100($s2) $s1 = Memory[$s2+100]

More information

administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions?

administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions? administrivia today start assembly probably won t finish all these slides Assignment 4 due tomorrow any questions? exam on Wednesday today s material not on the exam 1 Assembly Assembly is programming

More information

Lecture 4: RISC Computers

Lecture 4: RISC Computers Lecture 4: RISC Computers Introduction Program execution features RISC characteristics RISC vs. CICS Zebo Peng, IDA, LiTH 1 Introduction Reduced Instruction Set Computer (RISC) is an important innovation

More information

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/sp16 1 Machine Interpretation

More information

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA? COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs3221 Lecturer: Hui Wu Session 2, 2005 Instruction Set Architecture (ISA) ISA is

More information

CISC Attributes. E.g. Pentium is considered a modern CISC processor

CISC Attributes. E.g. Pentium is considered a modern CISC processor What is CISC? CISC means Complex Instruction Set Computer chips that are easy to program and which make efficient use of memory. Since the earliest machines were programmed in assembly language and memory

More information

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture. Idea:

More information

CSCE 5610: Computer Architecture

CSCE 5610: Computer Architecture HW #1 1.3, 1.5, 1.9, 1.12 Due: Sept 12, 2018 Review: Execution time of a program Arithmetic Average, Weighted Arithmetic Average Geometric Mean Benchmarks, kernels and synthetic benchmarks Computing CPI

More information

CMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago

CMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago CMSC 22200 Computer Architecture Lecture 2: ISA Prof. Yanjing Li Department of Computer Science University of Chicago Administrative Stuff! Lab1 is out! " Due next Thursday (10/6)! Lab2 " Out next Thursday

More information

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1...

Instruction-set Design Issues: what is the ML instruction format(s) ML instruction Opcode Dest. Operand Source Operand 1... Instruction-set Design Issues: what is the format(s) Opcode Dest. Operand Source Operand 1... 1) Which instructions to include: How many? Complexity - simple ADD R1, R2, R3 complex e.g., VAX MATCHC substrlength,

More information

Understand the factors involved in instruction set

Understand the factors involved in instruction set A Closer Look at Instruction Set Architectures Objectives Understand the factors involved in instruction set architecture design. Look at different instruction formats, operand types, and memory access

More information

Computer Architecture. MIPS Instruction Set Architecture

Computer Architecture. MIPS Instruction Set Architecture Computer Architecture MIPS Instruction Set Architecture Instruction Set Architecture An Abstract Data Type Objects Registers & Memory Operations Instructions Goal of Instruction Set Architecture Design

More information

ENGN1640: Design of Computing Systems Topic 06: Advanced Processor Design

ENGN1640: Design of Computing Systems Topic 06: Advanced Processor Design ENGN1640: Design of Computing Systems Topic 06: Advanced Processor Design Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown University

More information

COSC 6385 Computer Architecture. Instruction Set Architectures

COSC 6385 Computer Architecture. Instruction Set Architectures COSC 6385 Computer Architecture Instruction Set Architectures Spring 2012 Instruction Set Architecture (ISA) Definition on Wikipedia: Part of the Computer Architecture related to programming Defines set

More information

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI

CSCI 402: Computer Architectures. Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI To study Chapter 2: CSCI 402: Computer Architectures Instructions: Language of the Computer (1) Fengguang Song Department of Computer & Information Science IUPUI Contents 2.1-2.3 Introduction to what is

More information

Systems I. Machine-Level Programming I: Introduction

Systems I. Machine-Level Programming I: Introduction Systems I Machine-Level Programming I: Introduction Topics Assembly Programmerʼs Execution Model Accessing Information Registers IA32 Processors Totally Dominate General Purpose CPU Market Evolutionary

More information

Chapter 2A Instructions: Language of the Computer

Chapter 2A Instructions: Language of the Computer Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction

More information

CS 31: Intro to Systems ISAs and Assembly. Kevin Webb Swarthmore College September 25, 2018

CS 31: Intro to Systems ISAs and Assembly. Kevin Webb Swarthmore College September 25, 2018 CS 31: Intro to Systems ISAs and Assembly Kevin Webb Swarthmore College September 25, 2018 Overview How to directly interact with hardware Instruction set architecture (ISA) Interface between programmer

More information

Computer Architecture, RISC vs. CISC, and MIPS Processor

Computer Architecture, RISC vs. CISC, and MIPS Processor CSE 2421: Systems I Low-Level Programming and Computer Organization Computer Architecture, RISC vs. CISC, and MIPS Processor Gojko Babić 1-1-217 Computer Architecture A modern meaning of the term computer

More information

CS/ECE/752 Chapter 2 Instruction Sets Instructor: Prof. Wood

CS/ECE/752 Chapter 2 Instruction Sets Instructor: Prof. Wood CS/ECE/752 Chapter 2 Instruction Sets Instructor: Prof. Wood Computer Sciences Department University of Wisconsin Slides developed by Profs. Falsafi,, Hill, Smith, Sohi,, and Vijaykumar of Carnegie Mellon

More information

Overview. EE 4504 Computer Organization. Much of the computer s architecture / organization is hidden from a HLL programmer

Overview. EE 4504 Computer Organization. Much of the computer s architecture / organization is hidden from a HLL programmer Overview EE 4504 Computer Organization Section 7 The Instruction Set Much of the computer s architecture / organization is hidden from a HLL programmer In the abstract sense, the programmer should not

More information

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls Announcements HW1 is due on this Friday (Sept 12 th ) Appendix A is very helpful to HW1. Check out system calls on Page A-48. Ask TA (Liquan chen: liquan@ece.rutgers.edu) about homework related questions.

More information

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter IT 3123 Hardware and Software Concepts Notice: This session is being recorded. CPU and Memory June 11 Copyright 2005 by Bob Brown Latches Can store one bit of data Can be ganged together to store more

More information

Instruction Set Architectures

Instruction Set Architectures Instruction Set Architectures Computer Systems: Section 4.1 Suppose you built a computer What Building Blocks would you use? Arithmetic Logic Unit (ALU) OP1 OP2 OPERATION ALU RES ALU + Registers R0: 0x0000

More information

Machine-level Representation of Programs. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Machine-level Representation of Programs. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Machine-level Representation of Programs Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Program? 짬뽕라면 준비시간 :10 분, 조리시간 :10 분 재료라면 1개, 스프 1봉지, 오징어

More information

CS 31: Intro to Systems ISAs and Assembly. Kevin Webb Swarthmore College February 9, 2016

CS 31: Intro to Systems ISAs and Assembly. Kevin Webb Swarthmore College February 9, 2016 CS 31: Intro to Systems ISAs and Assembly Kevin Webb Swarthmore College February 9, 2016 Reading Quiz Overview How to directly interact with hardware Instruction set architecture (ISA) Interface between

More information