Benha University
Benha Faculty of Engineering
Electrical Engineering Department
ELE 242 Computer Organization
2nd
Communication
&
Computer
By
Dr. Hatem M. ZAKARIA
This Lecture
01
Course Administration
02
Course Goals and Prerequisite
03
Grading Information and Policies
04
Introduction
Course Administration
• Instr : Hatem M. ZAKARIA (hatem.radwan@bhit.bu.edu.eg)
• Office: Main Building (4th floor)
• OH’s: According to indicated on the site.
• TA:
Eng. Shaimaa Hassan
Eng. Mohamed Salah
• Office: Main Building (2nd floor)
Eng. Mohamed Wael
• Lab:
•
Main Building (2nd floor)
• Text:
• Computer Organization and Design, 5th edition, David Patterson and John
Hennessy
• Computer Organization and Architecture 8th edition , William Stallings
Course Resources
Lectures
Sections
Labs
Exams
Project
Site
OH
Text Book
Course Goals
Understand the major components of a Computer System
• How they function together in executing a program.
• How they are designed.
• How to measure its performance.
Prerequisite:
• Digital logic design.
• Computer Architecture
• Computer Programming
What You Should Already Know
Signed Numbers
RepresentationCombinational ,
Sequential Circuits
Design – Write VHDL
Codes, Run Simulation
How to write,
compile and run
programs in a highlevel language (C,
C++, .. etc).
Computer Components - Instruction
Cycle - Writing MIPS Codes Designing Systems using VHDL
Logic Design
Computer Architecture
Computer Programming
Architecture & Organization 1
Architecture is those attributes visible to the programmer
• Instruction set, number of bits used for data representation, I/O mechanisms,
addressing techniques.
• e.g. Is there a multiply instruction?
Organization is how features are implemented
• Control signals, interfaces, memory technology.
• e.g. Is there a hardware multiply unit or is it done by repeated addition?
Architecture & Organization 2
Family of a computer models may:
• Have the same architecture
• The architecture may span over years
• But the organization change between the models
• Performance difference
• Cost difference
What You Will Learn
Performance
Pipelining
What determines the
program performance
and how it can be
improved
Pipeline Concept
Pipeline Hazards
ISA
Memory Hierarchy
The hardware/software
interface
Cache Memory
Mapping Techniques
Performance
Practical Work Include
SPIM or MARS
MIPS Assembler Simulators
EDUMIPS or WinMIPS
Pipelining Simulators
CAMERA & SMPCache
Memory Simulation
VHDL
Processor Design and Simulation
spim Assembler and Simulator
spim is a simulator that runs MIPS32 assembly
language programs
• It provides a simple assembler, debugger
and a simple set of operating system
services
• It implements both a simple, terminal-style
interface (spim) and a visual windowing
interface (xspim and PCSpim)
available as
• xspim (or spim) for unix, linux, and Mac OS
X
• PCSpim (or spim) for Windows (NT, 2000,
XP)
• QtSpim for all operating systems (last
maintained version)
MARS (MIPS Assembler and
Runtime Simulator)
MARS is a lightweight interactive development
environment (IDE) for programming in MIPS
assembly language, intended for educationallevel
MARS Features
• GUI with point-and-click control and
integrated editor
• Easily editable register and memory values,
similar to a spreadsheet
• Display values in hexadecimal or decimal
We use
this one
EDUMIPS64 Simulator
EduMIPS64 is a MIPS64 Instruction Set
Architecture (ISA) simulator.
It is designed to be used to execute small
programs that use the subset of the MIPS64
ISA implemented by the simulator, allowing the
user to see how instructions behave in the
pipeline, how stalls are handled by the CPU,
the status of registers and memory and much
more.
It is both a simulator and a visual debugger.
CAMERA Simulator
CAMERA, a memory tutorial software package
that includes tutorials for direct mapped cache,
fully associative cache, and set associative
cache.
The package also provides a tutorial on virtual
memory and paging, including use of page
tables and a TLB.
Grading Policy
Grade determinates
• Final Exam
• Practical and oral
• Project
• Practical & Lab
40
20
10
10
• Midterm
• Semester Work
• Quizzes
• Assignments
30
10
5
5
Working in Groups
A group of 5 students will work together in:
• Assignment
• Project
Project discussion is graded individually
One of the group will be asked to represent the assignment to all students in
the lecture time.
Lab work and practical Exam are graded individually
Grading Policies
Assignments will be submitted and must be submitted on the due date.
- No late assignments will be accepted.
Duplicate assignments will receive duplicate grades of zero. Second offenses
will result in a final assignment grade of zero.
• See TA about questions on the assignments; see instructors about grading
questions on the exams
Must submit email request for change of grade after discussions with the TA
or instructor
Assignments
You will be asked to do search and some reading on special topics related
to the work (about 5 assignments)
You will write report about you have read
• Report must be written and formatted in formal
You are asked to prepare a PowerPoint presentation for your report
You will present your report to all the students in the lecture time
Project
You will build a Pipelined MIPS processor with reduced instruction set.
First build a single cycle MIPS processor step by step then convert it to a
pipelined one.
Pipeline Hazards must be avoided in the project.
Single Cycle MIPS Processor
Chapter 1
Computer Abstraction and Technology
Classes of Computers
Personal Computers
Server Computers
Supercomputers
Embedded Computers
Classes of Computers (2)
Personal computers
• Computers designed for use by an individual
• General purpose, variety of software
• Subject to cost/performance trade-off
Server computers
• Computers used for running larger programs for multiple users, often
simultaneously
• Network based
• High capacity, performance, reliability
• Range from small servers to building sized
Classes of Computers (3)
Supercomputers
• Consist thousands of processors and many terabytes of memory
• High-level scientific and engineering calculations
• Highest capability and cost but represent a small fraction of the computer market
Embedded computers
• Hidden as components of systems
• Largest class of computers and span the widest range of applications
• Strict power/performance/cost limitations
Bell’s Law
Bell's Law for the birth and death of computer classes:
Bell's law of computer classes formulated by Gordon Bell in 1972 describes
how computing systems (computer classes) form, evolve and may eventually
die out.
Roughly every decade a new, lower priced computer class forms based on a
new programming platform, network, and interface resulting in new industry.
In 1951, men could walk inside a computer and now, computers are beginning to
“walk” inside of us
Bell’s Law
The PostPC Era
Personal Mobile Device (PMD) !
• Battery operated !
• Connects to the Internet !
• Hundreds of dollars !
• Smart phones, tablets, electronic glasses !
Cloud computing !
• Warehouse Scale Computers (WSC) !
• Software as a Service (SaaS) !
• Portion of software run on a PMD and a portion run in the Cloud !
• Amazon (AWS) and Google
Eight Great Ideas of Design
Moore’s Law
Moore’s Law states that integrated circuit resources double every 18–24
months.
Moore’s Law resulted from a 1965 prediction of such growth in IC capacity
made by Gordon Moore, one of the founders of Intel.
Moore’s Law graph to represent designing for rapid change
Transistor Level
CMOS NAND Gate
CMOS Full Adder
Technology Trends
Electronics technology continues to evolve
• Increased capacity and performance
• Reduced cost
Vacuum Tube (1947)
IC with two JK F.Fs
(1958)
Intel Core i7
mprocessor
2.3 billion transistors
What is a Computer?
Components:
• Processor (datapath, control)
• Input (mouse, keyboard)
• Output (display, printer)
• Memory (cache (SRAM), main memory (DRAM), disk drive, CD/DVD)
• Network adapters
Our primary focus: the processor (datapath and control)
• Implemented using millions of transistors
• Impossible to understand by looking at each transistor
• We need abstraction!
Opening the Box
Major Components of a Computer
Below Your Program
Application software
• Written in high-level language
System software
• Compiler: translates HLL code to machine code
• Operating System:
• Handling input/output
• Managing memory and storage
• Scheduling tasks & sharing resources
Hardware
• Processor, memory, I/O controllers
Below the Program
High-level language program (in C)
swap (int v[], int k)
(int temp;
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;)
C compiler
Assembly language program (for MIPS)
swap: sll
add
lw
lw
sw
sw
jr
$2, $5, 2
$2, $4, $2
$15, 0($2)
$16, 4($2)
$16, 0($2)
$15, 4($2)
$31
Machine (object) code (for MIPS)
000000 00000 00101 0001000010000000
000000 00100 00010 0001000000100000
. . .
assembler
Semiconductor Technology
Silicon: Semiconductors
Add materials to transform properties:
• Conductors
• adding copper or aluminium wire
• Insulators
• like plastic or glass
• Switches (transistors)
• conduct or insulate under special conditions
Processor IC inside the A5
package
Manufacturing ICs
Assignment 1
X means the die is
bad
300mm wafer,
117 chips,
90nm
technology
The yield of good dies in this case was 19/22, or 86%.
Assignment 1
Make a report and presentation to discuss the
processes needed to convert a blank wafer to a
patterned one.
Integrated Circuit Cost
Yield: proportion of working dies per wafer
𝐶𝑜𝑠𝑡 𝑃𝑒𝑟 𝑊𝑎𝑓𝑒𝑟
𝐶𝑜𝑠𝑡 𝑃𝑒𝑟 𝐷𝑖𝑒 =
𝐷𝑖𝑒𝑠 𝑝𝑒𝑟 𝑊𝑎𝑓𝑒𝑟 𝑋 𝑌𝑖𝑒𝑙𝑑
𝑊𝑎𝑓𝑒𝑟 𝐴𝑟𝑒𝑎
𝐷𝑖𝑒𝑠 𝑝𝑒𝑟 𝑊𝑎𝑓𝑒𝑟 ≈
𝐷𝑖𝑒 𝐴𝑟𝑒𝑎
1
𝑌𝑖𝑒𝑙𝑑 =
𝐷𝑒𝑓𝑒𝑐𝑡𝑠 𝑝𝑒𝑟 𝐴𝑟𝑒𝑎 𝑋 𝐷𝑖𝑒 𝐴𝑟𝑒𝑎 2
(1 +
)
2
Nonlinear relation to area and defect rate
• Wafer cost and area are fixed
• Defect rate determined by manufacturing process
• Die area determined by architecture and circuit design
Next Lecture
• Defining Performance
• Performance Calculations
• Introduction to assembly language
• MIPS
Next Lecture Prerequisite
• Review
• MIPS Instruction Set
THANK YOU