DOC PREVIEW
Berkeley COMPSCI 152 - Laboratory Exercise 1

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

C152 Laboratory Exercise 1Professor: Krste AsanovicTA: Christopher CelioDepartment of Electrical Engineering & Computer ScienceUniversity of California, BerkeleyJanuary 26, 20111 Introduction and goalsThe goal of this laboratory assignment is to familiarize you with the Simics simulation environmentwhile also allowing you to conduct some simple experiments. Using a modified instruction tracermodule, you will collect instruction mix statistics and make some architectural recommendationsbased on the results.The lab has two sections, a directed portion and an open–ended portion. Everyone will do thedirected portion the same way, and grades will be assigned based on correctness. The open–endedportion will allow you to pursue more creative investigations, and your grade will be based on theeffort made to complete the task or the arguments you provide in support of your ideas.Students are encouraged to discuss solutions to the lab assignments with other students, butmust run through the directed portion of the lab by themselves and turn in their own lab report.For the open-ended portion of each lab, students can work individually or in groups of two orthree. Any open-ended lab assignment completed as a group should be written up and handed inseparately. Students are free to take part in different groups for different lab assignments.1.1 Terminology and conventionsHost machine refers to the remote server on which you are running Simics. Target machine refersto the simulated machine running inside of Simics. [workspace] refers to the directory in whichyou create as your Simics workspace in 2.1.If you should type something on the host machine’s command line we will note it like this:host$ this is what you typeWhen on the Simics command line we will note it like this:simics> this is what you typeAnd when on the target machine’s command line we will note it like this:target# this is what you type1.2 Graded ItemsYou will turn a hard copy of your results to the professor or TA. Please label each section of theresults clearly. The following items need to be turned in for evaluation:1Figure 1: Lab assignment setup1. Problem 2.3: recorded instruction mixes for each benchmark and answers2. Problem 2.4: thought problem answers3. Problem 2.5: design problem answers4. Problem 3.1: source code and recorded ratio5. Problem 3.2 and Problem 3.3 design proposals2 Directed Portion2.1 Setting Up Your Simics WorkspaceTo complete this lab you will log in to an instructional server, which is where you will run Simics.We will provide you with an instructional computing account for this purpose. However, you willalso need a client machine which can display X11 windows. See http://inst.eecs.berkeley.edu/connecting.html#xwindows for a guide on setting this up on Windows or OSX. Make sureyou use ssh -Y to ensure that X11 packets are forwarded to your machine by the server. Sim-ics can be run on any of the twelve instructional Linux servers t7400-1.eecs, t7400-2.eecs,..., t7400-12.eecs, as well as icom1.eecs. (see http://inst.eecs.berkeley.edu/cgi-bin/clients.cgi?choice=servers for more information about available machines).Although Simics is installed in only one place, every student will create their own Simicsworkspace to contain their personal scripts and checkpoints. In order to create a workspace calledsimics-workspace in your home directory, run:host$ /share/instsww/pkg/virtutech/simics-3.0.30/bin/workspace-setup ~/simics-workspace2.2 Simics First StepsNow that your workspace has been created, you are ready to begin simulation. Navigate to yourworkspace and load the Sun UltraSPARC III Sunfire machine (specifically the configuration called2Bagle):host$ cd ~/simics-workspacehost$ ./simics targets/sunfire/bagle-common.simicsSimics will start up and present you with a command line, and a new terminal window shouldalso appear. The new window is the terminal of the target machine being simulated by Simics.The simulation begins paused. Typesimics> continueto begin the simulation and watch the machine boot up. After a short while you should belogged in to the target machine as root. This simulated machine is running Linux, so all the usualcommand line utilities should work.Pressing [control-C] in the terminal with the Simics command line interface will pause thesimulation and make the simics> prompt reappear. While the simulation is paused, you will not beable to interact with the simulated machine via its terminal. Remember to restart the simulationwith continue before attempting to execute commands on the simulated machine.CheckpointingOnce the machine has booted, it would be best to save the state of the simulation so that we canresume from this point the next time we start Simics, without having to sit and watch the machineboot up again. This process is called checkpointing, and it will be very useful to you at times whenyou wish to run from a certain single point multiple times to collect different types of data. Tocreate a checkpoint called after_boot.conf, simply pause the simulation and runsimics> write-configuration after_boot.confThe checkpoint is now saved. To use the checkpoint in the future, simply start Simics with the-c flag, like this:host$ ./simics -c after_boot.confOne important thing to remember is that Simics checkpoints only save the differences betweenthe current checkpoint and the previous checkpoint. This is good because it saves lots of space.The problem is that if you create one checkpoint, keep running, create a second checkpoint, andthen go and delete the first checkpoint, then the second one won’t work any more. Keep this inmind when creating and deleting checkpoints.Mounting the host filesystemThe next thing to be done is to mount the file system of the host machine on the target machine.This will allow you to access any files you have stored on the host machine inside the simulationyou are running. To mount the host file system, all you have to do is typetarget# mount /hostThis will mount the / directory of the host machine on the /host directory of the targetmachine. This command mounts the host machine’s file system read only. Mounting with writepermissions is possible but experimental, and will not be required for this lab.Now you can just use cp to copy files from the /host directory tree into /root or /home orwherever you like inside the simulated machine. Remember that these files will be lost forever if youquit Simics without checkpointing (though of course you


View Full Document

Berkeley COMPSCI 152 - Laboratory Exercise 1

Documents in this Course
Quiz 5

Quiz 5

9 pages

Memory

Memory

29 pages

Quiz 5

Quiz 5

15 pages

Memory

Memory

29 pages

Memory

Memory

35 pages

Memory

Memory

15 pages

Quiz

Quiz

6 pages

Midterm 1

Midterm 1

20 pages

Quiz

Quiz

12 pages

Memory

Memory

33 pages

Quiz

Quiz

6 pages

Homework

Homework

19 pages

Quiz

Quiz

5 pages

Memory

Memory

15 pages

Load more
Download Laboratory Exercise 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Laboratory Exercise 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Laboratory Exercise 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?