The simplescalar tool set, version 2.0(8)

时间:2025-03-09

under Contract DABT63-95-C-0127 and ARPA order no. D346. The current support for this work comes from a variety of sources, all of to which we are indebted.

age, counters are “registered” by type with an internaldatabase. Thestat_reg_*() routines register countersof various types, andstat_reg_formula() allows youto register expressions constructed of other statistics.stat_print_stats() prints all registered statistics.The statistics package also has facilities to measure distribu-tions;stat_reg_dist() creates an array distribution,stat_reg_sdist() creates a sparse array distribution,andstat_add_sample()updates a distribution.

ss.[c,h]: De nes macros to expedite the processing ofinstructions, numerous constants needed across simulators,and a function to print out individual instructions in a read-able format.

ss.def: Holds a list of macro calls (the macros are de nedin the simulators andss.h andss.c), each of whichde nes an instruction. The macro calls accept as argumentsthe opcode, name of the instruction, sources, destinations,actions to execute, and other information. This le serves asthe de nition of the instruction set.

symbol.[c,h]: Holds routines to handle program sym-bol and line information (used in DLite!).

syscall.[c,h]: Contains code that acts as the interfacebetween the SimpleScalar system calls (which are POSIX-compliant) and the system calls on the host machine.

sysprobe.c: Determines byte and word order on the hostplatform, and generates appropriate compiler ags.

version.h: De nes the version number and release dateof the distribution.

The traces may be viewed with thepipeview.pl Perl script,which is provided in the simplesim-2.0 directory. (You will haveto update the rst line ofpipeview.pl to have the correct pathto your local Perl binary, and you must have Perl installed onyour system).

pipeview.pl <ptrace_file>

We depict sample output from the pipetracer in Figure7.

5.2 The DLite! debugger

Release 2.0 of SimpleScalar includes a lightweight symbolicdebugger called DLite!, which runs with all simulators except forsim-fast. DLite! allows you to step through thebenchmark targetcode, not the simulator code. The debugger can be incorporatedinto a simulator by adding only four function calls (which havealready been added to all simulators in the distribution). Theneeded four function prototypes are indlite.h.

To use the debugger in a simulation, add the “-i” option(which stands for interactive) to the simulator command line.Below we list the set of commands that DLite! accepts.Getting help and getting out:help [string]print command reference.versionprint DLite! version information.quitexit simulator.terminategenerate statistics and exit simulator.Running and setting breakpoints:stepexecute next instruction and break.cont [addr]continue execution (optionally continuing

starting at <addr>).

break <addr>set breakpoint at <addr>, returns <id> of

breakpoint.

dbreak <addr> [r,w,x]

set data breakpoint at <addr> for (r)ead,(w)rite, and/or e(x)ecute, returns <id> ofbreakpoint.

rbreak <range> [r,w,x]

set breakpoint at <range> for (r)ead, (w)rite,and/or e(x)ecute, returns <id> of breakpoint.

breakslist active code and data breakpoints.delete <id>delete breakpoint <id>.clearclear all breakpoints (code and data).Printing information:

print [modi ers] <expr>

print the value of <expr> using optionalmodi ers.

display [modi ers] <expr>

display the value of <expr> using optionalmodi ers.

option <string>print the value of option <string>.optionsprint the values of all options.

stat <string>print the value of a statistical variable.statsprint the values of all statistical variables.whatis <expr>print the type of <expr>.regsprint all register contents.iregsprint all instruction register contents.

5 Utilities

In this section we describe the utilities that accompany the

SimpleScalar tool set; pipeline tracing and a source-level debug-ger.

5.1 Out-of-order pipeline tracing

The tool set provides the ability to extract and view traces ofthe out-of-order pipeline. Using the “-ptrace” option, a detailedhistory of all instructions executed in a range may be saved to a le. The information saved includes instruction fetch, retirement,and stage transitions. The syntax of this command is as follows:-ptrace < le> <start>:<end>

< le> is the le to which the trace will besaved. <start> and <end> are the instructionnumbers at which the trace will be startedand stopped. If they are left blank, the tracewill start at the beginning and/or stop at theend of the program, respectively.

For example:

-ptrace FOO.trc 100:500

trace from instructions 100 to 500, store thetrace in le FOO.src.

-ptrace FOO.trc :10000

trace from program beginning to instruction10000.

-ptrace FOO.trc :

trace the entire program execution.

…… 此处隐藏:2711字,全部文档内容请下载后查看。喜欢就下载吧 ……
The simplescalar tool set, version 2.0(8).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219