Slides for Lecture 1 - people.ucalgary.ca

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

Transcript of Slides for Lecture 1 - people.ucalgary.ca

Slides for Lecture 1ENCM 501: Principles of Computer Architecture

Winter 2014 Term

Steve Norman, PhD, PEng

Electrical & Computer EngineeringSchulich School of Engineering

University of Calgary

9 January, 2014

ENCM 501 W14 Slides for Lecture 1 slide 2/25

Today’s Lecture

I introduction to ENCM 501

I course organization

I review of computer organization basics

I what does “computer architecture” mean?

Related material in Hennessy & Patterson (our coursetextbook): Sections 1.1–1.3..

ENCM 501 W14 Slides for Lecture 1 slide 3/25

Contacting Steve Norman (your instructor)

Office: ICT 411. This is near the north end of the 4th floor.You should be able to use your U of C ID cards to access thehallways outside academic offices on the 4th floor—ask at theECE main office (ICT 402) if have trouble.

I will post some office hours on the Course Home Page soon.

Email: [email protected] try to come up with a detailed subject line. “Questionabout ENCM 501 Assignment 3 Exercise 5” is a goodexample. “ENCM 501” and “Problem with course” areexamples of what not to do!

I will try to answer all emails within 24 hours, except weekendsand holidays.

ENCM 501 W14 Slides for Lecture 1 slide 4/25

Course Web site

Most course information will NOT be on Blackboard.

Instead, please go towww.enel.ucalgary.ca/People/Norman/encm501winter2014

ENCM 501 W14 Slides for Lecture 1 slide 5/25

In the Classroom

Lectures will start at 12:30pm sharp (except today). Please tryhard to be on time, and enter as non-disruptively as possible ifyou’re late.

If you need to leave early, please notify your instructor at thebeginning of class, and pick a seat that allows an easy exit.

Please, no conversations!

Please ask questions! Call out, “Question!” if I don’t seeyour raised hand.

ENCM 501 W14 Slides for Lecture 1 slide 6/25

Tutorial Periods

These start Wednesday, January 15.

There will be several small pencil-and-paper exercises eachweek.

There are NO marks for tutorial exercises, but the exerciseswill be helpful toward assignments, tests, and final exam.

ENCM 501 W14 Slides for Lecture 1 slide 7/25

Assignments

There will be assignments just about every week in ENCM501. Assignments will consist of several small- to medium-sizeproblems; there will be no large projects in this course.

Some assignment problems will involve programming andothers will be exercises that can be solved with pencil andpaper, possibly also a simple calculator.

Assignment 1 will be posted on the Course home pagesometime Monday, January 13.

ENCM 501 W14 Slides for Lecture 1 slide 8/25

Lab Periods

Lab periods start Tuesday, January 14. They are for drop-inhelp with assignments, and may also be used to ask generalquestions about lecture content.

It’s best to have done some work on the current assignmentbefore the lab period. That way you can ask good questionsstarting at the beginning of lab period.

ENCM 501 W14 Slides for Lecture 1 slide 9/25

The ENCM 501 Course Outline

A link to the complete course outline can be found on thecourse Web site.

Please read the whole thing carefully!

ENCM 501 W14 Slides for Lecture 1 slide 10/25

Course Outline: Exams

Quizzes (2): 40 minutes each, to be held in lecture periods,one in early February and one in late March.

Midterm test: 75 minutes, to be held in a lecture period inlate February or early March.

Final exam: Duration 3 hours, to be scheduled by theRegistrar’s Office.

All quizzes, tests and exams will be closed-book andclosed-notes. There will likely be instructor-provided referencematerial with formulas, instruction set documentation, etc.,provided along with question papers.

ENCM 501 W14 Slides for Lecture 1 slide 11/25

Course Outline: Grading

Assignments: 20%

Quizzes: 15%

Midterm test: 25%

Final exam: 40%

Attention: There is no minimum score on the final exam thatyou must obtain to pass the course. (But you will get an F ifboth your term work and your final exam are very weak.)

Read the Course Outline for more details about how lettergrades will be determined.

ENCM 501 W14 Slides for Lecture 1 slide 12/25

Course outline: Textbook

Computer Architecture: A Quantitative Approach, FifthEdition, by John L. Hennessy and David A. Patterson.

This book is by the same authors who wrote the textbookused for many years in ENCM 369, but it’s a completelydifferent and significantly more advanced book.

It’s really important to have this textbook—students will beexpected to do some serious reading, as there is no reasonableway to put so much detail into lecture notes.

Attention: We will not cover everything in the book in thiscourse! There is way too much material in the book for asingle course!

ENCM 501 W14 Slides for Lecture 1 slide 13/25

About ENCM 501 slides

Reading these slides online is not a good substitute forattending lectures—in most lectures I will do some importanthand-written work using the document camera. Please cometo lectures prepared to take some notes.

ENCM 501 W14 Slides for Lecture 1 slide 14/25

Typographical conventions

Either bold text or bright red text will be used for emphasis.

The typewriter font will usually be used for code inassembly language, C, or C++. (I might not use the typewriterfont for code if it makes the code too wide to fit in a slide.)

Text in a box is a general description of what could appearwithin a piece of code.

Example: A C do statement has this syntax . . .do

statement

while ( expression );

(Usually statement is a compound statement that startswith { and ends with } .)

ENCM 501 W14 Slides for Lecture 1 slide 15/25

Typographical conventions: Italics

Italics will be used two different ways.

One word or a few words in italics will be used to formally orinformally define a term.

Example: A bit is the basic unit of information in a digitalsystem; the value of a bit is either 0 or 1.

An entire sentence in italics indicates a pause to elaborate aconcept or solve a problem under the document camera.

Example: Let’s translate the C statement into a sequence ofassembly language instructions.

ENCM 501 W14 Slides for Lecture 1 slide 16/25

Review of Computer Organization Basics

The next several slides will review concepts covered early inENCM 369, and make comments about how those conceptsare related to current computer design.

ENCM 501 W14 Slides for Lecture 1 slide 17/25

Organization of a Simple Computer

......

Bus

Processor

Main

Memory

I/O

Device

I/O

Device

I What is a bus?

I What is the role of theprocessor?

I What is the role of themain memory?

I What does I/O standfor?

I What are importantcategories ofI/O devices?

ENCM 501 W14 Slides for Lecture 1 slide 18/25

Operation of our Simple Computer

Within the processor, there is a special-purpose register calledthe program counter (or PC). The PC holds the memoryaddress of the next instruction to be executed.

When our computer is powered up, some kind of initializationcircuit puts a specific address into the PC. After that, theprocessor repeats two steps, Step 1 and Step 2, over and over,until the computer is powered down.

ENCM 501 W14 Slides for Lecture 1 slide 19/25

Operation of our Simple Computer, continued

Step 1: Fetch an instruction and update the PC. Copyone or more bytes, starting at the address in the PC, into theprocessor, then make the PC point at the next byte in memorythat wasn’t part of the instruction.

Remark: Step 1 is simple if all instructions are the same size,but quite messy if some instructions occupy more memorythan other instructions.

Step 2: Execute the instruction. Perform whatever tiny,simple task is specified by the instruction.

Let’s make an informal list of the kinds of instructions we’veseen in various computer instruction sets, with one or morespecific examples of each kind of instruction.

ENCM 501 W14 Slides for Lecture 1 slide 20/25

Step 1, then Step 2, then Step 1, then Step 2 . . .

This model for computer operation is simultaneously seriouslymisleading regarding current computer systems (exceptperhaps the very “lowest-end” embedded computers) andsupremely important.

Let’s make a list of reasons why the model is seriouslymisleading.

But why then is the model still supremely important?

ENCM 501 W14 Slides for Lecture 1 slide 21/25

What does “Computer Architecture” mean? (1)

It is surprisingly hard to come up with a simple, shortdefinition of computer architecture. It’s kind of an “umbrella”term that includes a bunch of related ideas and activities.Let’s start at the level of instructions . . .

I What instructions are available to applicationsprogrammers? This is often called instruction setarchitecture, or ISA.

I What additional instructions are provided to operatingsystem kernel programmers? (Examples: Instructions toquery system state when an interrupt occurs, to managevirtual memory hardware, to control I/O devices, and soon.)

ENCM 501 W14 Slides for Lecture 1 slide 22/25

What does “Computer Architecture” mean? (2)

Now let’s move a down one or two levels of abstraction . . .

I Given the ISA, how exactly are instructions handled byprocessors—how deep are pipelines; can instructions beexecuted out-of-order?How is the memory system organized to minimize loss ofclock cycles in fetching instructions and reading andwriting data?This category of concern is sometimes calledmicroarchitecture or organization.

I Given a microarchitecture, what are good ways toimplement it at the integrated circuit and printed circuitboard level? These are hardware design problems.

ENCM 501 W14 Slides for Lecture 1 slide 23/25

It’s good to have a broad perspective on

architecture

Obviously, ISA choice dictates much about microarchitecture,and microarchitecture dictates much about hardware.

But the influences also work in the opposite direction, fromlower to higher levels of abstraction.

Cost of fabrication (a hardware issue) makes somemicroarchitectures attractive and others less attractive.Physical size of components may also matter.

Aspects of microarchitecture matter when a new ISA isdesigned or an existing ISA is extended. Preference forrelatively simple, clean microarchitecture might rule out someuseful instructions.

ENCM 501 W14 Slides for Lecture 1 slide 24/25

ENCM 501 Course Topics

I introduction to computer system design goals andperformance measurement (textbook, Chapter 1)

I brief overview of ISA principles (parts of Appendix A)

I memory system design and performance assessment(parts of Appendix B and Chapter 2)

I aspects of instruction-level parallelism (parts ofAppendix C and Chapter 3)

I aspects of thread-level parallelism (TLP) (parts ofChapter 5)

I introduction to programming with TLP (not covered intextbook)

ENCM 501 W14 Slides for Lecture 1 slide 25/25

Next Lecture

I overview of computer technology

I trends in technology, energy use, and cost

Related reading in Hennessy & Patterson: Sections 1.1–1.6