Lab Course On Archi
Lab Course On Archi
Lab Course On Archi
Abstract
In this paper, the laboratory exercises for a course on computer architecture in the Computer
Engineering degree at the Universidad Polit´ecnica de Valencia are presented. They have been
designed for a course length of 30 hours and they only require standard personal computers and
some simulation tools.
1 Introduction
The Computer Engineering degree at the Universidad Polit´ecnica de Valencia is organized as 5
academic years, each one consisting of two semesters. Each year accounts for 75 credits (1 credit:
10 hours). At the end of the 5th year, a final year project (equivalent to a master thesis) must
be carried out. Computer architecture and related matters are covered in five courses: Computer
Fundamentals (1st semester), Computer Organization I (2nd semester) and II (3rd semester) and
Computer Architecture I (7th semester) and II (8th semester). We will focus on the last two courses.
The authors have taught these courses for the last 8 years.
The students of Computer Architecture I and II know the assembly language of a modern MIPS-
like computer. They also learnt logic design and the basics of computer organization. The approach
we follow in these courses is based on the quantitative one found in [1]: design choices should be
oriented toward achieving the maximum performance for a given cost. The courses syllabus includes
performance analysis, instruction set design, simple and advanced pipelining and the basics of vector
computers and multiprocessors.
Computer Architecture I and II account for 4.5 credits each one divided into 3 lecture credits
plus 1.5 laboratory credits. Since a semester lasts for 15 weeks, each course must be taught for 2
lecture hours and 1 lab hour per week. As usual, the aim of laboratory exercises is to put into practice
and complement the concepts explained in the lectures. However, there are also some constraints
that must be taken into account. First, we wanted the lab course to be representative of almost
all the topics of the course. Considering 4 to 5 different lab exercises, and taking into account
the time dedicated to laboratory (15 hours), an average of three hours per lab exercise should be
considered. As a consequence, lab work should be precisely delimited in order to take advantage
of this somewhat limited time. With respect to class scheduling, we arranged laboratory exercises
in such a way that they are taught immediately after the corresponding lecture. Finally, there was a
cost constraint. The required equipment should be the standard one for an educational laboratory:
personal computers. This can be accomplished with the use of simulators. These tools allow the
experimentation with a variety of systems at a very low cost. At the same time, simulators also hide
the complexity of real machines, highlighting only those aspects that have to be analyzed. On the
other hand, there are more than 200 students per year for each course, with an average of 30 people
in each laboratory session. Thus, it is not feasible to organize a lab course where the student has
to design some hardware and then implement, analyze and debug it using a logic analyzer, or to
learn a complex programming environment to design parallel programs. Of course, these things are
also very interesting, but we neither have time nor enough resources to do it. These things can be
accomplished in the final year project.
In section 2, the syllabus for Computer Architecture I and II courses is presented. In section 3,
the laboratory course developed is presented and commented.
3 Laboratory Course
The laboratory course for Computer Architecture I and II consists of the following lab exercises:
1. Performance evaluation. Amdahl’s law.
2. Instruction set measurements.
3. Pipelined design.
4. Instruction pipeline design.
5. Programming pipelined computers.
6. Increasing ILP with compilation techniques.
7. Dynamic scheduling: Tomasulo’s algorithm.
8. Speculation.
9. Vector computer programming.
10. Multicomputer programming.
Computer Architecture I includes the first 5 exercises, whereas Computer Architecture II com-
prises the last 5 ones.
3.8 Speculation.
In this lab exercise, an incomplete simulator written in the C programming language of a hardware
speculative DLX is given to the students together with some DLX test programs. The provided code
includes all the data structures, procedures to show them and the implementation of the instruction
fetch, issue, execute and write back stages. The student’s job is to write the code for the Commit
stage in order to get a working simulator.
References
[1] J. L. Hennessy, D. A. Patterson, Computer Architecture: A Quantitative Approach, Morgan
Kauffman, 1996.
[2] P. L´opez, R. Calpe, DLXVSim: A DLXV vector computer simulator,
http://dlxv.disca.upv.es/tools/dlxv.html