Unformatted text preview:

C152 Laboratory Exercise 1 Professor Krste Asanovic GSI Henry Cook Department of Electrical Engineering Computer Science University of California Berkeley January 31 2008 1 Introduction and goals The goal of this laboratory assignment is to familiarize you with the Simics simulation environment while also allowing you to conduct some simple experiments Using a modified instruction tracer module you will collect instruction mix statistics and make some architectural recommendations based on the results The lab has two sections a directed portion and an open ended portion Everyone will do the directed portion the same way and grades will be assigned based on correctness The open ended portion will allow you to pursue more creative investigations and your grade will be based on the effort 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 but must 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 or three Any open ended lab assignment completed as a group should be written up and handed in separately Students are free to take part in different groups for different lab assignments 1 1 Terminology and conventions Host machine refers to the remote server on which you are running Simics Target machine refers to the simulated machine running inside of Simics workspace refers to the directory in which you 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 type When on the Simics command line we will note it like this simics this is what you type And when on the target machine s command line we will note it like this target this is what you type 1 2 Graded Items You will turn a hard copy of your results to the professor or TA Please label each section of the results clearly The following items need to be turned in for evaluation 1 Figure 1 Lab assignment setup 1 Problem 2 3 recorded instruction mixes for each benchmark and answers 2 Problem 2 4 thought problem answers 3 Problem 2 5 design problem answers 4 Problem 3 1 source code and recorded ratio 5 Problem 3 2 and Problem 3 3 design proposals 2 2 1 Directed Portion Setting Up Your Simics Workspace To 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 will also 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 sure you use ssh Y to ensure that X11 packets are forwarded to your machine by the server Simics can be run on any of the instructional Linux servers ilinux1 2 3 eecs see http inst eecs berkeley edu cgi bin clients cgi choice 13 for more information about available machines However when compiling Simics modules use only ilinux3 or you will see exceptions when loading the modules in Simics Although Simics is installed in only one place every student will create their own Simics workspace to contain their personal scripts and checkpoints In order to create a workspace called simics workspace in your home directory run host share instsww pkg virtutech simics 3 0 30 bin workspace setup simics workspace 2 2 2 Simics First Steps Now that your workspace has been created you are ready to begin simulation Navigate to your workspace and load the Sun UltraSPARC III Sunfire machine specifically the configuration called Bagel host cd simics workspace host simics targets sunfire bagle common simics Simics will start up and present you with a command line and a new terminal window should also appear The new window is the terminal of the target machine being simulated by Simics The simulation begins paused Type simics continue to begin the simulation and watch the machine boot up After a short while you should be logged in to the target machine as root This simulated machine is running Linux so all the usual command line utilities should work Pressing control C in the terminal with the Simics command line interface will pause the simulation and make the simics prompt reappear While the simulation is paused you will not be able to interact with the simulated machine via its terminal Remember to restart the simulation with continue before attempting to execute commands on the simulated machine Checkpointing Once the machine has booted it would be best to save the state of the simulation so that we can resume from this point the next time we start Simics without having to sit and watch the machine boot up again This process is called checkpointing and it will be very useful to you at times when you wish to run from a certain single point multiple times to collect different types of data To create a checkpoint called after boot conf simply pause the simulation and run simics write configuration after boot conf The 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 conf One important thing to remember is that Simics checkpoints only save the differences between the 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 and then go and delete the first checkpoint then the second one won t work any more Keep this in mind when creating and deleting checkpoints Mounting the host filesystem The 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 simulation you are running To mount the host file system all you have to do is type target mount host This will mount the directory of the host machine on the host directory of the target machine This command mounts the host machine s file system read only Mounting with write permissions 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 or wherever you like inside the simulated machine Remember that these files will be lost forever if you 3 quit Simics without checkpointing though of course you could re


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
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 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?