wait_rabbit 发表于 2011-11-04 01:43

有用simplescalar的朋友吗?找不到 stdio.h

本帖最后由 wait_rabbit 于 2011-11-04 02:42 编辑

下了四个压缩包,simpleutils-2v0.tgz,simpletools-2v0.tgz,simplesim-3v0e.tgz,gcc-2.7.2.3.ss.tar.gz。

经过一番修改,测试显示是编译成功了的。# ./sim-safe tests-pisa/bin.little/test-math
sim-safe: SimpleScalar/PISA Tool Set version 3.0 of August, 2003.
Copyright (c) 1994-2003 by Todd M. Austin, Ph.D. and SimpleScalar, LLC.
All Rights Reserved. This version of SimpleScalar is licensed for academic
non-commercial use.No portion of this work may be used by any commercial
entity, or for any commercial purpose, without the prior written permission
of SimpleScalar, LLC (info@simplescalar.com).

sim: command line: ./sim-safe tests-pisa/bin.little/test-math

sim: simulation started @ Fri Nov4 01:41:17 2011, options follow:

sim-safe: This simulator implements a functional simulator.This
functional simulator is the simplest, most user-friendly simulator in the
simplescalar tool set.Unlike sim-fast, this functional simulator checks
for all instruction errors, and the implementation is crafted for clarity
rather than speed.

# -config                     # load configuration from a file
# -dumpconfig               # dump configuration to a file
# -h                  false # print help message   
# -v                  false # verbose operation   
# -d                  false # enable debug message
# -i                  false # start in Dlite debugger
-seed                     1 # random number generator seed (0 for timer seed)
# -q                  false # initialize and terminate immediately
# -chkpt               <null> # restore EIO trace execution from <fname>
# -redir:sim         <null> # redirect simulator output to file (non-interactive only)
# -redir:prog          <null> # redirect simulated program output to file
-nice                     0 # simulator scheduling priority
-max:inst                   0 # maximum number of inst's to execute

sim: ** starting functional simulation **
pow(12.0, 2.0) == 144.000000
pow(10.0, 3.0) == 1000.000000
pow(10.0, -3.0) == 0.001000
str: 123.456
x: 123.000000
str: 123.456
x: 123.456000
str: 123.456
x: 123.456000
123.456 123.456000 123 1000
sinh(2.0) = 3.62686
sinh(3.0) = 10.01787
h=3.60555
atan2(3,2) = 0.98279
pow(3.60555,4.0) = 169
169 / exp(0.98279 * 5) = 1.24102
3.93117 + 5*log(3.60555) = 10.34355
cos(10.34355) = -0.6068,sin(10.34355) = -0.79486
x   0.5x
x0.5   x
x   0.5x
-1e-17 != -1e-17 Worked!

sim: ** simulation statistics **
sim_num_insn               213703 # total number of instructions executed
sim_num_refs                  56899 # total number of loads and stores executed
sim_elapsed_time                  1 # total simulation time in seconds
sim_inst_rate         213703.0000 # simulation speed (in insts/sec)
ld_text_base             0x00400000 # program text (code) segment base
ld_text_size                  91744 # program text (code) size in bytes
ld_data_base             0x10000000 # program initialized data segment base
ld_data_size                  13028 # program init'ed `.data' and uninit'ed `.bss' size in bytes
ld_stack_base            0x7fffc000 # program stack segment base (highest address in stack)
ld_stack_size               16384 # program initial stack size
ld_prog_entry            0x00400140 # program entry point (initial PC)
ld_environ_base          0x7fff8000 # program environment base address address
ld_target_big_endian            0 # target executable endian-ness, non-zero if big endian
mem.page_count                   33 # total number of pages allocated
mem.page_mem                   132k # total size of memory pages allocated
mem.ptab_misses                  34 # total first level page table misses
mem.ptab_accesses         1545575 # total page table accesses
mem.ptab_miss_rate         0.0000 # first level page table miss rate但是一旦我用生成的交叉编译器进行编译,就会报告缺少stdio.h。# ls
binhello.cincludeinfolibmansslittle-na-sstrix

# bin/sslittle-na-sstrix-gcc hello.c
hello.c:1: stdio.h: No such file or directory

wait_rabbit 发表于 2011-11-04 01:43

请朋友们释疑,谢谢!

wait_rabbit 发表于 2011-11-04 02:29

打印版本也是正常的,不知到究竟是哪里出了问题。# ./sslittle-na-sstrix-gcc -v
Reading specs from /home/SimpleScalar/lib/gcc-lib/sslittle-na-sstrix/2.7.2.3/specs
gcc version 2.7.2.3

wait_rabbit 发表于 2011-11-04 13:58

指定主机的 /usr/include 就能用了。哎,不知道是哪一步的编译出了点问题。暂且这么用着吧。
页: [1]
查看完整版本: 有用simplescalar的朋友吗?找不到 stdio.h