L08 - CS61C Machine Structures Lecture 8 - Introduction to...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 61C L08 C Introduction to MIPS (1) Wawrzynek Fall 2007 © UCB 9/14/2007 John Wawrzynek (www.cs.berkeley.edu/~johnw) www-inst.eecs.berkeley.edu/~cs61c/ CS61C – Machine Structures Lecture 8 - Introduction to the MIPS Processor and Assembly Language CS 61C L08 C Introduction to MIPS (2) Wawrzynek Fall 2007 © UCB Anatomy: 5 components of any Computer Personal Computer Central Processing Unit (CPU) Computer Control Datapath Memory (where programs, data live when running) Devices Input Output
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 61C L08 C Introduction to MIPS (3) Wawrzynek Fall 2007 © UCB 61C Levels of Representation High Level Language Program (e.g., C) Assembly Language Program (e.g.,MIPS) Machine Language Program (MIPS) Hardware Architecture Description (e.g., Verilog Language) Compiler Assembler Machine Interpretation temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) 0000 1001 1100 0110 1010 1111 0101 1000 1010 1111 0101 1000 0000 1001 1100 0110 1100 0110 1010 1111 0101 1000 0000 1001 0101 1000 0000 1001 1100 0110 1010 1111 Logic Circuit Description (Verilog Language) Architecture Implementation wire [31:0] dataBus; regFile registers (databus); ALU ALUBlock (inA, inB, databus); wire w0; XOR (w0, a, b); AND (s, w0, a); CS 61C L08 C Introduction to MIPS (4) Wawrzynek Fall 2007 © UCB Assembly Language ° “Instructions” are the primitive operations that a CPU may execute. ° Different CPUs implement slightly different sets of instructions. The set of instructions a particular CPU implements is part of the Instruction Set Architecture ( ISA ). Examples: Intel 80x86 (Pentium 4), IBM/Motorola PowerPC (Old Macintosh), MIPS, Intel IA64, ARM, . .. ° Assembly language is a textual version of these instructions. ° Assembly language is used: As an output of the C compiler, or As a means to directly program the CPU. Why would anyone want to do this?!
Background image of page 2
CS 61C L08 C Introduction to MIPS (5) Wawrzynek Fall 2007 © UCB Book: Programming From the Ground Up “A new book was just released which is based on a new concept - teaching computer science through assembly language (Linux x86 assembly language, to be exact). This book teaches how the machine itself operates, rather than just the language. I've found that the key difference between mediocre and excellent programmers is whether or not they know assembly language. Those that do tend to understand computers themselves at a much deeper level. Although [almost!] unheard of today, this concept isn't really all that new -- there used to not be much choice in
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

L08 - CS61C Machine Structures Lecture 8 - Introduction to...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online