Unisim Ppcemu Simulator Manual: 1 Simulator Technical Reference (Generated)
Unisim Ppcemu Simulator Manual: 1 Simulator Technical Reference (Generated)
1.1 Introduction
UNISIM ppcemu, user level PowerPC simulator with support of ELF32 binaries and Linux
system call translation.
Section 1.2 gives licensing informations about the simulator. Section 1.3 shows the set of modules
and services that compose the simulator. Section 1.4 shows how to invoke the simulator at
the command line prompt. Section 1.5 gives the simulator parameters. Section 1.6 gives the
simulator statistic counters. Section 1.7 gives the simulator statistic formulas.
1.2 Licensing
UNISIM ppcemu 1.0beta3
Copyright (C) 2007-2010, Commissariat a l’Energie Atomique (CEA)
License: BSD (see file COPYING)
Authors: Gilles Mouchard <[email protected]>, Daniel Gracia Pérez <[email protected]>
• cpu
• debugger
• gdb-server: this service implements the GDB server remote serial protocol over TCP/IP.
Standards GDB clients (e.g. gdb, eclipse, ddd) can connect to the simulator to debug the
target application that runs within the simulator.
• host-time: this service is an abstraction layer for the host machine time
• inline-debugger: this service implements a built-in debugger in the terminal console
• linux-os
• memory: this module implements a memory
• profiler
• tee-memory-access-reporting
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[0]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[10]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[11]
1
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[12]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[13]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[14]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[15]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[1]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[2]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[3]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[4]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[5]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[6]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[7]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[8]
• tee-memory-access-reporting.tee-memory-access-reporting.control selector[9]
• time: this service is an abstraction layer for the SystemC kernel time
• --config <XML file> or -c <XML file>: configures the simulator with the given
XML configuration file
• --get-config <XML file> or -g <XML file>: get the simulator configuration XML
file (you can use it to create your own configuration. This option can be combined with
-c to get a new configuration file with existing variables from another file
• --list or -l: lists all available parameters, their type, and their current value
• --share-path <path> or -p <path>: the path that should be used for the share di-
rectory (absolute path)
1.5 Configuration
Simulator configuration (see below) can be modified using command line Options --set <param=value>
or --config <config file>.
Global
Name: enable-gdb-server Type: parameter
Default: true Data type: boolean
Valid: true, false
2
Description:
Enable/Disable GDB server instantiation.
Name: enable-inline-debugger Type: parameter
Default: true Data type: boolean
Valid: true, false
Description:
Enable/Disable inline debugger instantiation.
Name: enable-press-enter-at-exit Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable pressing key enter at exit.
Name: estimate-power Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable power estimators instantiation.
Name: kernel logger.file Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Keep logger output in a file.
Name: kernel logger.filename Type: parameter
Default: logger output.txt Data type: string
Description:
Filename to keep logger output (the option file must be activated).
Name: kernel logger.std err Type: parameter
Default: true Data type: boolean
Valid: true, false
Description:
Show logger output through the standard error output.
Name: kernel logger.std err color Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Colorize logger output through the standard error output (only works if std err is active).
Name: kernel logger.std out Type: parameter
Default: false Data type: boolean
3
Valid: true, false
Description:
Show logger output through the standard output.
Name: kernel logger.std out color Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Colorize logger output through the standard output (only works if std out is active).
Name: kernel logger.xml file Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Keep logger output in a file xml formatted.
Name: kernel logger.xml file gzipped Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
If the xml file option is active, the output file will be compressed (a .gz extension will be
automatically added to the xml filename option.
Name: kernel logger.xml filename Type: parameter
Default: logger output.xml Data type: string
Description:
Filename to keep logger xml output (the option xml file must be activated).
cpu
Name: cpu.cpu-cycle-time Type: parameter
Default: 3333 Data type: unsigned 64-bit integer
Description:
CPU cycle time in picoseconds.
Name: cpu.voltage Type: parameter
Default: 1300 Data type: unsigned 64-bit integer
Description:
CPU voltage in mV.
Name: cpu.max-inst Type: parameter
Default: 18446744073709551615 Data type: unsigned 64-bit integer
Description:
maximum number of instructions to simulate.
4
Name: cpu.verbose-all Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
globally enable/disable verbosity.
Name: cpu.verbose-setup Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity while setup.
Name: cpu.verbose-step Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when simulating an instruction.
Name: cpu.verbose-dtlb Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when accessing data translation lookahead buffer.
Name: cpu.verbose-itlb Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when accessing instruction translation lookahead buffer.
Name: cpu.verbose-dl1 Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when accessing L1 data cache.
Name: cpu.verbose-il1 Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when accessing L1 instruction cache.
Name: cpu.verbose-l2 Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when accessing L2 unified cache.
5
Name: cpu.verbose-load Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when simulating a load.
Name: cpu.verbose-store Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when simulating a store.
Name: cpu.verbose-read-memory Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when reading memory for a debug purpose.
Name: cpu.verbose-write-memory Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when writing memory for a debug purpose.
Name: cpu.verbose-exception Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when handling exceptions.
Name: cpu.verbose-set-msr Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when setting MSR.
Name: cpu.verbose-set-hid0 Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when setting HID0.
Name: cpu.verbose-set-hid1 Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when setting HID1.
6
Name: cpu.verbose-set-hid2 Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when setting HID2.
Name: cpu.verbose-set-l2cr Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity when setting L2CR.
Name: cpu.enable-linux-printk-snooping Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable linux printk buffer snooping.
Name: cpu.enable-linux-syscall-snoopingType: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable linux syscall snooping.
Name: cpu.trap-on-instruction-counter Type: parameter
Default: 18446744073709551615 Data type: unsigned 64-bit integer
Description:
number of simulated instruction before traping.
Name: cpu.halt-on Type: parameter
Default: Data type: string
Description:
Symbol or address where to stop simulation.
Name: cpu.bus-cycle-time Type: parameter
Default: 13333 ps Data type: sc time
Description:
bus cycle time.
Name: cpu.nice-time Type: parameter
Default: 1 ms Data type: sc time
Description:
maximum time between synchonizations.
7
Name: cpu.ipc Type: parameter
Default: 1 Data type: double precision
floating-point
Description:
targeted average instructions per second.
debugger
Name: debugger.verbose Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable verbosity.
Name: debugger.dwarf-to-html-output- Type: parameter
,→directory
Default: Data type: string
Description:
DWARF v2/v3 to HTML output directory.
Name: debugger.dwarf-register-number- Type: parameter
,→mapping-filename
Default: powerpc eabi gcc dwarf register Data type: string
,→number mapping.xml
Description:
DWARF register number mapping filename.
Name: debugger.parse-dwarf Type: parameter
Default: true Data type: boolean
Valid: true, false
Description:
Enable/Disable parsing of DWARF debugging informations.
gdb-server
Name: gdb-server.memory-atom-size Type: parameter
Default: 0x00000001 Data type: unsigned 32-bit integer
Description:
size of the smallest addressable element in memory.
Name: gdb-server.tcp-port Type: parameter
Default: 0 Data type: signed 32-bit integer
Description:
TCP/IP port to listen waiting for a GDB client connection.
8
Name: gdb-server.architecture-description-
Type: parameter
,→filename
Default: gdb powerpc.xml Data type: string
Description:
filename of a XML description of the connected processor.
Name: gdb-server.verbose Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable verbosity.
inline-debugger
Name: inline-debugger.memory-atom- Type: parameter
,→size
Default: 0x00000001 Data type: unsigned 32-bit integer
Description:
size of the smallest addressable element in memory.
Name: inline-debugger.search-path Type: parameter
Default: Data type: string
Description:
Search path for source (separated by ’;’).
Name: inline-debugger.init-macro Type: parameter
Default: Data type: string
Description:
path to initial macro to run when debugger starts.
Name: inline-debugger.output Type: parameter
Default: Data type: string
Description:
path to output file where to redirect the debugger outputs.
Name: inline-debugger.architecture- Type: parameter
,→description-filename
Default: Data type: string
Description:
filename of a XML description of the connected processor.
linux-os
9
Name: linux-os.verbose Type: parameter
Default: false Data type: boolean
Valid: true, false
Name: linux-os.system Type: parameter
Default: ppc Data type: string
Description:
Emulated system architecture available values are ”arm”, ”arm-eabi” and ”powerpc”.
Name: linux-os.endianness Type: parameter
Default: big-endian Data type: endianess
Valid: little-endian, big-endian
Description:
The endianness of the binary loaded. Available values are: little-endian and big-endian..
Name: linux-os.memory-page-size Type: parameter
Default: 0x00001000 Data type: unsigned 32-bit integer
Description:
The stack base address used for the load and execution of the linux application.
Name: linux-os.binary Type: parameter
Default: Data type: string
Description:
The binary to execute on the target simulator. Usually it is the same value than the
argv[1] parameter..
Name: linux-os.argc Type: parameter
Default: 0 Data type: unsigned 32-bit integer
Description:
Number of commands in the program execution line (usually at least one which is the
name of the program executed). The different tokens can be set up with the parameters
argv[<n>] where <n> can go up to argc - 1..
Name: linux-os.apply-host-environment Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Wether to apply the host environment on the target simulator or use the provided envc
and envp..
10
Name: linux-os.envc Type: parameter
Default: 0x00000000 Data type: unsigned 32-bit integer
Description:
Number of environment variables defined for the program execution. The different vari-
ables can be set up with the parameters envp[<n>] where <n> can go up to envc - 1..
Name: linux-os.utsname-sysname Type: parameter
Default: Linux Data type: string
Description:
The value that the uname system call should return. As this service is providing linux
emulation supoort its value should be ’Linux’, so you should not modify it..
Name: linux-os.utsname-nodename Type: parameter
Default: (none) Data type: string
Description:
The network node hostname that the uname system call should return. Default value is
localhost, but you could write whatever name you want..
Name: linux-os.utsname-release Type: parameter
Default: 3.0.4 Data type: string
Description:
The kernel realese information that the uname system call should return. This should
usually match the linux-kernel parameter..
Name: linux-os.utsname-version Type: parameter
Default: #1 PREEMPT Thu Jan 1 Data type: string
00:00:00
,→CEST 1970
Description:
The kernel version information that the uname system call should return..
Name: linux-os.utsname-machine Type: parameter
Default: ppc Data type: string
Description:
The machine information that the uname system call should return. This should be one of
the supported architectures (the system parameter, that is, arm or powerpc) or a specific
model derived from it (i.e., arm926ejs)..
11
Name: linux-os.utsname-domainname Type: parameter
Default: (none) Data type: string
Description:
The domain name information that the uname system call should return..
memory
Name: memory.org Type: parameter
Default: 0x00000000 Data type: unsigned 32-bit integer
Description:
memory origin/base address.
Name: memory.bytesize Type: parameter
Default: 4294967295 Data type: unsigned 32-bit integer
Description:
memory size in bytes.
Name: memory.initial-byte-value Type: parameter
Default: 0x00 Data type: unsigned 8-bit integer
Description:
memory cycle time.
Name: memory.read-latency Type: parameter
Default: 13333 ps Data type: sc time
Description:
memory read latency.
Name: memory.write-latency Type: parameter
Default: 0 s Data type: sc time
Description:
memory write latency.
Name: memory.verbose Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
enable/disable verbosity.
12
profiler
Name: profiler.min-data-read-prof- Type: parameter
,→addr
Default: 0x00000000 Data type: unsigned 32-bit integer
Description:
Minimum address for data read profiling.
Name: profiler.max-data-read-prof- Type: parameter
,→addr
Default: 0xffffffff Data type: unsigned 32-bit integer
Description:
Maximum address for data read profiling.
Name: profiler.min-data-write-prof- Type: parameter
,→addr
Default: 0x00000000 Data type: unsigned 32-bit integer
Description:
Minimum address for data write profiling.
Name: profiler.max-data-write-prof- Type: parameter
,→addr
Default: 0xffffffff Data type: unsigned 32-bit integer
Description:
Maximum address for data write profiling.
Name: profiler.min-insn-fetch-prof- Type: parameter
,→addr
Default: 0x00000000 Data type: unsigned 32-bit integer
Description:
Minimum address for instruction fetch profiling.
Name: profiler.max-insn-fetch-prof- Type: parameter
,→addr
Default: 0xffffffff Data type: unsigned 32-bit integer
Description:
Maximum address for instruction fetch profiling.
Name: profiler.min-insn-exec-prof- Type: parameter
,→addr
Default: 0x00000000 Data type: unsigned 32-bit integer
13
Description:
Minimum address for instruction execution profiling.
Name: profiler.max-insn-exec-prof- Type: parameter
,→addr
Default: 0xffffffff Data type: unsigned 32-bit integer
Description:
Maximum address for instruction execution profiling.
Name: profiler.enable-data-read- Type: parameter
,→prof
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable data read profiling.
Name: profiler.enable-data-write- Type: parameter
,→prof
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable data write profiling.
Name: profiler.enable-insn-fetch- Type: parameter
,→prof
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable instruction fetch profiling.
Name: profiler.enable-insn-exec- Type: parameter
,→prof
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable instruction execution profiling.
Name: profiler.verbose Type: parameter
Default: false Data type: boolean
Valid: true, false
Description:
Enable/Disable verbosity.
1.6 Statistics
Simulation statistic counters are listed below:
cpu
Name: cpu.instruction-counter Type: statistic
Data type: unsigned 64-bit integer
14
Description:
number of simulated instructions.
Name: cpu.bus-cycle Type: statistic
Data type: unsigned 64-bit integer
Description:
number of simulated bus cycles.
Name: cpu.num-il1-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to L1 instruction cache.
Name: cpu.num-il1-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to L1 instruction cache.
Name: cpu.num-dl1-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to L1 data cache.
Name: cpu.num-dl1-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to L1 data cache.
Name: cpu.num-l2-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to unified L2 cache.
Name: cpu.num-l2-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to unified L2 cache.
15
Name: cpu.num-ibat-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to IBATs.
Name: cpu.num-ibat-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to IBATs.
Name: cpu.num-dbat-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to DBATs.
Name: cpu.num-dbat-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to DBATs.
Name: cpu.num-itlb-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to ITLB.
Name: cpu.num-itlb-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to ITLB.
Name: cpu.num-dtlb-accesses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of accesses to DTLB.
Name: cpu.num-dtlb-misses Type: statistic
Data type: unsigned 64-bit integer
Description:
number of misses to DTLB.
16
memory
Name: memory.read-counter Type: statistic
Data type: unsigned 64-bit integer
Description:
read counter.
Name: memory.write-counter Type: statistic
Data type: unsigned 64-bit integer
Description:
write counter.
1.7 Formulas
Simulation statistic formulas are listed below:
cpu
Name: cpu.il1-miss-rate Type: formula
Formula: cpu.num-il1-misses / cpu. Data type: double precision
,→num-il1-accesses floating-point
17