Introduction

Note: Updated to Y86-64 for CS:APP3e.

Students are given a small default Y86-64 array copying function and a working pipelined Y86-64 processor design that runs the copy function in some nominal number of clock cycles per array element (CPE). The students attempt to minimize the CPE by modifying both the function and the processor design. This gives the students a deep appreciation for the interactions between hardware and software.

Note: The lab materials include the master source distribution of the Y86-64 processor simulators and the Y86-64 Guide to Simulators.

In this lab, you will learn about the design and implementation of a pipelined Y86-64 processor, optimizing both it and a benchmark program to maximize performance. You are allowed to make any semanticspreserving transformation to the benchmark program, or to make enhancements to the pipelined processor, or both. When you have completed the lab, you will have a keen appreciation for the interactions between code and hardware that affect the performance of your programs.The lab is organized into three parts, each with its own handin. In Part A you will write some simple Y86-64 programs and become familiar with the Y86-64 tools. In Part B, you will extend the SEQ simulator with a new instruction. These two parts will prepare you for Part C, the heart of the lab, where you will optimize the Y86-64 benchmark program and the processor design.

在本实验中,您将了解流水线 Y86-64 处理器的设计和实现,并对其和基准程序进行优化以最大限度地
提高性能。 您可以对基准程序进行任何语义保留转换,或对流水线处理器进行增强,或两者兼而有之。
完成本实验后,您将对影响程序性能的代码和硬件之间的交互有深刻的体会。
本实验分为三个部分,每个部分都有自己的处理方式。 
在 A 部分中,您将编写一些简单的 Y86-64 程序并熟悉 Y86-64 工具。 
在 B 部分中,您将使用新指令扩展 SEQ 模拟器。 
这两部分将为您准备 C 部分,这是实验室的核心,您将在其中优化 Y86-64 基准程序和处理器设计。

Handout Instructions

  1. Start by copying the file archlab-handout.tar to a (protected) directory in which you plan to do your work.

  2. Then give the command: tar xvf archlab-handout.tar. This will cause the following files to be unpacked into the directory: README, Makefile, sim.tar, archlab.pdf, and simguide.pdf.

  3. Next, give the command tar xvf sim.tar. This will create the directory sim, which contains your personal copy of the Y86-64 tools. You will be doing all of your work inside this directory.

  4. Finally, change to the sim directory and build the Y86-64 tools:

*cd sim
make clean
make*

实验要求

这个实验总共分为三个部分,part A, part B, part C。

第一部分要求我们将三个用C写的函数翻译成y86-64指令

第二部分要求我们往seq ISA中添加一个新的指令iaddq。

第三个部分给了我们一个ncopy的函数和一个pipeline的hcl文件,要求我尽可能地加快程序运行的速度。结果是用CPE(cycles per element)来衡量。

实验文件(主要用到的在三个文件夹当中)

misc:part A 需要用到的文件夹