慶應義塾大学
2007年度 秋学期
コンピューター・アーキテクチャ
Computer Architecture
第5回 10月28日
Lecture 5, October 28: Instruction Sets and the Data Path
Outline of This Lecture
- Using the MIPS Simulator
- Homework
Using the MIPS Simulator
Note: on MacOS, you will need spim 7.2 (or possibly later),
available on the
web. (Actually, it might not be a bad idea for everyone to use
the latest, although I installed 7.0 from the CD in the book.)
You will need vecadd.s, a short MIPS
assembly program.
Here are screen shots from spim (Linux), xspim (Linux),
PCspim (Windows) and spim (Mac) versions of the tool.
Things to note in the images above, as well as your own execution runs:
- Watch the advance of the PC (program counter) as you step
through the program.
- By convention, most of the registers have two names, Rxx and a
more mnemonic one indicating the use.
- The floating point registers are either single-precision, or a
pair of them (e.g., F0 and F1) are used as one double-precision FP
register.
- Notice especially the precision
and accuracy of the FP numbers in the output, compared to the
values we intended! This is an important fact!
宿題
Homework
This week's homework (submit via email):
- Modify vecadd.s to multiply two four-by-four matrices
(行列の掛け算). Call it arraymult.s.
Next Lecture
Next week, we will continue with the discussion of processor
architecture, getting into the fun stuff: pipelining!
Next lecture:
第6回 11月4日 プロセッサー:パイプラインの基本
Lecture 6, November 4: Processors: Basics of Pipelining
Readings for next time:
- P-H:
- H-P: Appendix A.1 and A.2
Additional Information
その他