simguide - CS:APP Guide to Y86 Processor Simulators Randal...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS:APP Guide to Y86 Processor Simulators * Randal E. Bryant David R. O’Hallaron November 4, 2004 * Copyright c c 2002, R. E. Bryant, D. R. O’Hallaron. All rights reserved. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This document describes the processor simulators that accompany the presentation of the Y86 processor architectures in Chapter 4 of Computer Systems: A Programmer’s Perspective . These simulators model three different processor designs: SEQ, SEQ+, and PIPE. 1 Installing The code for the simulator is distributed as a Tar format file named sim.tar . You can get a copy of this file from the CS:APP Web site ( csapp.cs.cmu.edu ). With the tar file in the directory you want to install the code, you should be able to do the following: unix> tar xf sim.tar unix> cd sim unix> make clean unix> make By default, this generates GUI (graphic user interface) versions of the simulators, which require that you have Tcl/Tk installed on your system. If not, then you have the option to install TTY-only versions that emit their output as ASCII text on stdout. See file README for a description of how to generate the GUI and TTY versions. The directory sim contains the following subdirectories: misc Source code files for utilities such as YAS (the Y86 assembler), YIS (the Y86 instruction set simula- tor), and HCL2C (HCL to C translator). It also contains the isa.c source file that is used by all of the processor simulators. seq Source code for the SEQ and SEQ+ simulators. Contains the HCL file for homework problems 4.34 and 4.35. See file README for instructions on compiling the different versions of the simulator. pipe Source code for the PIPE simulator. Contains the HCL files for homework problems 4.37–4.42. See file README for instructions on compiling the different versions of the simulator. y86-code Y86 assembly code for many of the example programs shown in the chapter. You can automat- ically test your modified simulators on these benchmark programs. See file README for instructions on how to run these tests. As a running example, we will use the program asum.ys in this subdirec- tory. This program is shown as CS:APP Figure 4.6. The compiled version of the program is shown in Figure 1. ptest Scripts that generate systematic regression tests of the different instructions, the different jump possibilities, and different hazard possibilities. These scripts are very good at finding bugs in your homework solutions. See file README for instructions on how to run these tests. 2
Background image of page 2
1 | # Execution begins at address 0 2 0x000: | .pos 0 3 0x000: 308400010000 | init: irmovl Stack, %esp # Set up Stack pointer 4 0x006: 308500010000 | irmovl Stack, %ebp # Set up base pointer 5 0x00c: 7024000000 | jmp Main # Execute main program 6 | 7 | # Array of 4 elements 8 0x014: | .align 4 9 0x014: 0d000000 | array: .long 0xd 10 0x018: c0000000 | .long 0xc0 11 0x01c: 000b0000 | .long 0xb00 12 0x020: 00a00000 | .long 0xa000 13 | 14 0x024: 308004000000 | Main: irmovl $4,%eax 15 0x02a: a008 | pushl %eax # Push 4
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

simguide - CS:APP Guide to Y86 Processor Simulators Randal...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online