- Om oss
- Plattformar och lösningar
- Utvecklingsverktyg och arbetsmetodik
TSIM LEON3 simulator
2012-02-27Publicerad av Sven-Åke Andersson
TSIM is an instruction-level simulator capable of emulating ERC32- and LEON-based computer systems. TSIM provides several unique features:
- Accurate and cycle-true emulation of ERC32 and LEON2/3/4 processors
- Superior performance: up to 60 MIPS on high-end PC (Intei i7-2600K @3.4GHz)
- Accelerated processor standby mode, allowing faster-than-realtime simulation speeds
- Standalone operation and remote connection to GNU debugger (gdb)
- 64-bit time for unlimited simulation periods
- Loadable modules to include user-defined I/O device
- Instruction trace buffer
- Stack backtrace with symbolic information
- Non-intrusive execution time profiling
- Unlimited number of beakpoints and watchpoints
- Check-pointing capability to save and restore complete simulator state
- Code coverage monitoring
- EDAC operation (TSIM2/ERC32)
- MMU emulation (LEON2/3/4)
- L2 Cache emulation (LEON3/4)
- Emulation of UT699, AT697 and AT7913E (Spw-RTC)
TSIM can be run in stand-alone mode or connected through a network socket to the GNU debugger (GDB). In stand-alone mode, a variety of debugging commands are available to allow manipulation of memory contents and registers, breakpoint/watchpoint insertion and performance measurement. Connected to GDB, TSIM acts as a remote target and supports all GDB debug requests. The communication between GDB and TSIM is performed using the GDB extended-remote protocol. Any third-party debugger supporting this protocol can be used.
We will start by downloading the free TSIM2 LEON3 evaluation version.
Click the tsim-eval-2.0.21.tar.gz link.
After unzipping and unpacking the installation directory looks like this:
We will use our prime number calculation program and run it in the simulator. For more information about TSIM read the user's manual.
The help command shows all the TSIM commands.
To display the LEON peripherals registers type: leon
To display the memory content use the mem command:
Simulating Linux boot
This time we will use TSIM to simulate the system booting Linux. Here are the commands:
Starting the simulation
When we type <go> the simulation starts and Linux will boot:
The simulation will run for 232 clock cycles and then stop.
To get unlimited simulation time we have to use TSIM2 professional.