wiki:TBR/BSP/Psim

Version 76 (modified by .ayush10297, on Jan 7, 2013 at 12:29:53 AM) (diff)

Psim

{{Infobox BSP |BSP_name = Power PC |Manufacturer = IBM |Board_URL = http://www.thelearningpit.com/plc/psim/doc/getstarted.html |image = PPC.jpg |Architecture = RISC architecture |CPU_model = IBM PowerPC 600, PowerPC 7xx, PowerPC 970 and other PowerPC families. |Simulator = YES |Aliases = PSIM |RAM = 640 KB main memory |NVMEM = 1.44 MB, 3.5 inch diskette or 1.2 MB 5 1/4 inch diskette. |Serial = psim com port |Video = http://www.youtube.com/watch?v=2V3Ua-cypKs }}

Overview

PSIM is a program written in extended ANSI-C that emulates the Instruction Set Architecture of the PowerPC microprocessor family. It is freely available in source code form under the terms of the GNU General Public License (version 2 or later). It is now packaged with GDB and is included in the pre-built RTEMS tool binaries. There are scripts in rtems-testing to assist in executing psim standalone and inside a GDB instance.

The publication The PowerPC Architecture: A specification for a new family of RISC processors describes the PowerPC Instruction Set Architecture has having three levels of compliance:

  • UEA (User Instruction Set Architecture) - the registers, instructions, storage model, and execution model that are available to all application programs
  • VEA (Virtual Environment Architecture) - the features of the architecture that permit application programs to create or modify code, to share data among programs in a multiprocessing system, and to optimize the performance of storage accesses
  • OEA (Operating Environment Architecture) - the features of the architecture that permit operating systems to allocate and manage storage, to handle errors encountered by application programs, to support I/O devices, and to provide the other services expected of secure, modern, multiprocessor operating systems

PSIM, both implements all three levels of the PowerPC Instruction Set Architecture, and includes, for each level, a number of simulated run-time environments:

  • UEA PSIM can run static programs compiled for any of the following operating systems:
  • NetBSD
  • Solaris
  • GNU/Linux
  • VEA Support for environmental features of the Instruction Set Architecture including:
  • Symetric multi-processing
  • Cache manipulation
  • Time base registers
  • OEA Details of the target PowerPC Platform being modelled can be specified including:
  • firmware (Motorola BUG or OpenFirmware?)
  • memory and I/O address maps
  • attached devices
  • interrupt controller (OpenPIC) configuration

In addition, PSIM, to the execution unit level, models the performance of most of the current PowerPC implementations (contributed by Michael Meissner). This detailed performance monitoring (unlike many other simulators) resulting in only a relatively marginal reduction in the simulators performance.

The most recent formal release of PSIM is version 2.1. In addition to describing that release of PSIM, this document also describes extensions that have been proposed for a future release of the PSIM Architecture

Downloading and Executing

The simplest way to get started with PSIM is just to install pre-built GDB binaries for your host environment. These will include PSIM. If binaries are not available for your host, then you will need to patch GDB to include the latest patch in contrib/crossrpms/patches in the RTEMS CVS checkout. Then configure with a command similar to the following with variables replaced appropriately:

${GDBDIR}/configure --target=powerpc-rtems${RTEMS_MAJOR_VERSION} \
        --enable-sim --enable-sim-hardware \
        --disable-werror \
        --enable-timebase --enable-sim-trace  --prefix=${INSTALL}

References

{{Navbox_BSPs}}