CS 5513: Computer Architecture
Lecture 1: Discussion, Circuits, Metrics, Goals

Discussion

Let's have a discussion about performance. We'll begin with an example designed to show you where computer architecture can be relevant to you as a programmer.

Our objective is a favorite toy example of mine. Let's write a program that counts the prime numbers between 0 and 10,000,000. We'd like a fast program, so we'll go through a few ideas. We'll do this in Java. If you don't know Java, just pretend it is C or C++. If you don't know any of these, learn one as soon as possible.

The point is, having some knowledge of the microarchitecture that is implementing your program can help you make it execute more efficiently. However, you must be careful: make sure your algorithm is good before trying to tweak it to use the microarchitecture more efficiently. Premature optimization is the root of all evil. We could have tried optimizing the heck out of the first prime counting function, but we would never have been able to get it to the speed of the blocked sieve because of the innate inefficiency of the algorithm.

CS 5513

CS 5513, Computer Architecture, is a graduate level class on computer architecture. Let's talk about computer architecture. Here are some questions to think about:

Administrivia

Class web page is http://www.cs.utsa.edu/~dj/cs5513/index.html. A syllabus is available there.

Circuits

Speaking of transistors, Our focus will be on higher-level issues, but we must always keep in mind that these ideas have some sort of physical basis. There are three main types of components we are interested in: Voltage is used to represent logical values 0 and 1. For us, it doesn't matter what the voltages are, just that there are two distinguishable voltages that we can simply name 0 and 1. Sometimes it helps to have 0 be equal to 0 volts.

Transistors

Transistors are tiny switches. They have three terminals: When the gate terminal is triggered, current is allowed to flow from the source to the drain. Otherwise, no current flows from the source to the drain.

There are two types of MOS transistors used in the CMOS technology that dominates current computer architecture:

How do we compute with these devices? We'd like to be able to work with AND, OR, NOT, etc., not with "turn on" and "bad at passing 0."

For example, consider the NOT function:

in  out
--  ---
0    1
1    0
Here is an example of a NOT gate (or inverter) implemented with transistors:
              1                               
             _|                               
        |-o||_                                
___in___|     |__out___                       
        |    _|                               
        |--||_                             
              |                               
              0                               
How about a more complex function? The NAND function is important in computer architecture for a number of reasons. Why? The truth table is:
a  b  x
-  -  -
0  0  1
0  1  1
1  0  1
1  1  0
How would we implement this in transistors?

Goals for the class

What is Computer Architecture?

Interface Design

Implementation

Our focus is on microarchitecture, the idea of designing the CPU given a particular architecture.

Application Constraints

Applications drive machine "balance."

Trends in Computer Architecture

Metrics

How and what do we measure in computer architecture?

If I reach this point in the lecture and still have lots of time left over, I will launch into an impromptu and very painful lecture on digital logic design.

For next time, read Chapters 1 and 2 of the book and do Homework 1 .