Professional Documents
Culture Documents
03/01/2018
Some pre-requisites
• UG courses on
– Programming in C/C++, Python, Java
• No TAs for the course
– You should take initiative to solve problems on
your own
L01
03/01/2018
Assessment
• 20% Class Tests/Assignments
• 60% Exams: (1 midterm 25% and end semester
35%)
• 20% Lab Exams: (Two graded evaluations for 50
points to be held in last tutorial class before mid-
semester and end-semester)
• ?% Class Participation: Participation (i.e. not just
attendance) classroom discussions and online
forum for course
L01
03/01/2018
Academic Integrity
• Be careful about:
– Verbatim reproduction from external resources
– Paraphrasing from earlier work
– Disrupting classroom activity
– Cheat, copy, and collaborate on assignments
• Participate in discussions
– There are no “stupid” questions
– Be considerate of your fellow classmates
L01
03/01/2018
Welcome
To the path of understanding the engineering in
Computer Science Engineering.
To the art of hardware design.
To the art of abstractions.
To the world of systems.
L01
03/01/2018
Pervasive Idea
Abstraction: only way of dealing with complex systems
Divide world into objects, each with an…
Interface: knobs, behaviors, knobs → behaviors
interface
Example: car, only mechanics know how implementation works
helps)
L01
03/01/2018
Pervasive Idea
Inertia: a dark side of layering
What is a Computer ?
• Components:
– input (mouse, keyboard, camera, microphone...)
– output (display, printer, speakers....)
– memory (caches, DRAM, SRAM, hard disk drives, Flash....)
– network (both input and output)
• Our primary focus: the processor (datapath and control)
– implemented using billions of transistors
– Impossible to understand by looking at each transistor
– We need...abstraction!
• Notice how abstraction hides the detail of lower levels, yet gives a
useful view for a given purpose
L01
03/01/2018
Computer Architecture
Application
Operating
System
Compiler Firmware
software
instruction set
hardware
L01
03/01/2018
• ISA Includes
– Organization of storage
– Data types
– Encoding and representing instructions
– Instruction Set (or opcodes)
– Modes of addressing data items/instructions
– Program visible exception handling
• Specifies requirements for binary compatibility across
implementations (ABI)
L01
03/01/2018
OP rs rt immediate
OP jump target
L01
03/01/2018
Execution Cycle
Instruction
Fetch Obtain instruction from program storage
Instruction
Determine required actions and instruction size
Decode
Result
Deposit results in storage for later use
Store
Next
Instruction Determine successor instruction
L01
03/01/2018
Levels of Representation
High Level Language temp = v[k];
Program v[k] = v[k+1];
v[k+1] = temp;
Compiler
lw $15, 0($2)
Assembly Language lw $16, 4($2)
Program sw $16, 0($2)
sw $15, 4($2)
Assembler
Advantage of HLLs
• Higher-level languages (HLLs)
Allow the programmer to think in a more natural language and
for their intended use (Fortran for scientific computation,
Cobol for business programming, Lisp for symbol
manipulation, Java for web programming, …)
Improve programmer productivity – more understandable
code that is easier to debug and validate
Improve program maintainability
Allow programs to be independent of the computer on which
they are developed (compilers and assemblers can translate
high-level language programs to the binary instructions of any
machine)
Emergence of optimizing compilers that produce very efficient
assembly code optimized for the target machine
• Compilers convert source code to object code
• Libraries simplify common tasks
L01
03/01/2018
Functional View
L01
03/01/2018
Data Movement
L01
03/01/2018