Department of Computer Science
National Tsing Hua University
CS4100 -- Computer Architecture
Fall, 2004
This is a one semester course on computer organization.
The purpose of the course is to introduce
the concepts that are the basis for current computers and to show
the interdependencies among assembly language, compiler,
organization, and design.
In this course we will cover the following topics:
the role of performance, instruction sets,
computer arithmetic, processor and pipelining, digital control,
memory hierarchies, and input/output architectures.
- Course Overview
- Instructor: Chung-Ta King
(king@cs.nthu.edu.tw)
- Homeworks:
- 作業一
(Due: 10/14 in class)
- 作業二
(Due: 11/2 10:00 am)
- 作業三
(Due: 11/30 10:10 am)
- 作業四
(Due: 12/16 10:10 am)
- Course Outline:
- Course outline (class slides:
pdf)
- Chapter 1: Computer abstractions and technology (class slides:
pdf)
- Chapter 2: The role of performance (class slides:
pdf)
- Chapter 3: Instructions: language of the machine (class slides:
pdf)
- Chapter 4: Arithmetic for computers (class slides:
pdf)
- Chapter 5: The processor: datapath and control (class slides:
single-cycle pdf,
multicycle pdf)
- Chapter 6: Enhancing performance with pipelining (class slides:
pdf)
- Chapter 7: Large and fast: exploiting memory hierarchy (class slides:
pdf)
- Chapter 8: Interfacing processors and peripherals (class slides:
pdf)
- Related course resources:
- Simulation tools:
- SPIM: Read Appendix A of the text book for its usage.
The following description assumes that you have an account on
the workstation, e.g. cs20 - 24.
- Create a directory, say
spim, under your home directory
- Link everything under
cs20:~king/tools/spim
as follows:
%ln -s ~king/tools/spim spim
- Read the README file for setting the environment variable
for running xspim
.
Information of compiling a C program into MIPS assemly code
can also be found there.
- To run the simulator only, type
spim or
xspim
- To generate trace, run the simulator as follows:
%spim -trace -file MIPS_program_file.s
> trace_file
Each record in the trace file has the following format:
[0x00400000] 0x8fa40000 lw $4, 0($29)
; 102: lw $a0, 0($sp)
where the first field is the address of the instruction, the
second field is its binary code, the third field is the assembly
code, and the fourth field is the corresponding source assembly
code
- PCSPIM: Windows version of SPIM
- Get it from here.
However, you still need compiled MIPS assembly code as
input to PCSPIM (see description above).
- Dinero:
- Download the
dineroIV package
- According to the instructions
in the README file, install the
package
- The subdirectory
testing contains two sample trace
files, mm.32 and
mm.64. They store the trace
information in the pixie32 format. You may like to
use these trace files to familiarize yourself with dineroIV.
- To run dineroIV with
mm.32, use the following
command at the dineroIV main directory:
cat testing/mm.32 | dineroIV -informat
p .....
- Benchmarks:
- Small benchmarks:
bytesort.c,
fibo.c,
linpack-pc.c,
queens.c,
dhry-c,
hanoi.c,
livermore.c,
sieve.c,
whetstone.c,
fft.c
(trigtbl.h),
heapsort.c,
mm.c,
tfftdp.c
- More benchmarks:
netlib
- Related links: