====== PowerPC 755 simulator - August 2007 snapshot ====== ===== Description ===== This snapshot correspond to the TLM-level simulators of the Mac G3 platform. This platform currently includes a MPC755 microprocessor, memories, the MPC107 chipset, a Programmable Interrupt Controller and a PIIX4 IDE controller. The simulator also includes a few devices such as some IDE disks and a Framebuffer Display. Two different version of the simulator are available: * **ppcemu**:\\ A user-level simulator of a PowerPC 755 which does not include any peripherals, and won't simulate the operating system. The simulated system calls are translated to be run on the host system. * **ppcemu-system**:\\ A system-level simulator of the PowerPC 755, with the whole architecture and operating system being simulated. The simulated system-calls are run within the simulator, accessing virtual devices. Both simulators are written using the TLM methodology presented in this {{modules:tlm:unisim_methodology_for_transaction_level_modeling.pdf|article}}. Some additional information are also available on the [[modules:tlm:intro|TLM-Modules]] and the [[services:start|Capabilities]] composing the simulator. ===== Building the Snapshot ===== The snapshot is available from the following tar.gz file: * {{simulators:tlm:mac-g3:powerpc755-tlm-snapshot-2007-08.tar.gz}} The tar.gz includes a {{simulators:tlm:mac-g3:readme.txt}} describing the requirements, and the compilation process. === Requirements === This snapshot requires that the following development tools are installed: * g++ (>= 4.0 recommended) * automake (>= 1.9.6 recommended) * autoconf (>= 2.59 recommended) * bison (2.3 recommended) or berkeley YACC (1.9 recommended) * flex (2.5.4 recommended) * libncurses-devel (5.5 recommended) * libSDL-devel (1.2.8 recommended) * boost-devel (1.34.0 recommended) * libreadline-devel (5.2 recommended) Those development tools are available for most linux distribution as binary packages. It also requires to have SystemC 2.2 installed on your system. It is available from http://www.systemc.org. Follow the README file carefully, running configure from ''objdir'' and be sure that the destination folder exists prior to starting the compilation. === Compilation steps === The installation steps are the following: $ ./configure --prefix=/opt/FullSystem \ --with-systemc=path-to-systemc-2.2 $ make $ make install You should provide the target installation folder (''/opt/FullSystem'' in the example above) and where SystemC 2.2 has been installed. ===== Running the simulators ===== The simulators are bundled with the gzip benchmark from Spec2000 compiled for the PowerPC architecture. A PowerPC linux kernel is also provided for the full-system simulator. \\ The benchmarks are available from the ''benchmarks/fullsystem'' and ''benchamrks/userlevel'' folders. === Using the User-level simulator === To run the user-level simulator (''ppcemu''), simply provide the powerpc binary you want to simulates followed by the arguments of the tested benchmark. For instance to run the gzip benchmark from ''benchmarks/userlevel'' folder: ppcemu ./benchmarks/userlevel/gzip_peak.ppc32_linux ./benchmarks/userlevel/input.source 60 By running this simulation, you should obtain the following output: ... Starting simulation at user privilege level (Linux system calls translation enabled) spec_init Loading Input Data Duplicating 17949 bytes Duplicating 35898 bytes Duplicating 71796 bytes Duplicating 143592 bytes Duplicating 287184 bytes Duplicating 574368 bytes Duplicating 948416 bytes Input data 2097152 bytes in length Compressing Input Data, level 1 Compressed data 302663 bytes in length Uncompressing Data Uncompressed data 2097152 bytes in length Uncompressed data compared correctly Compressing Input Data, level 3 Compressed data 277717 bytes in length Uncompressing Data Uncompressed data 2097152 bytes in length Uncompressed data compared correctly Compressing Input Data, level 5 Compressed data 28032 bytes in length Uncompressing Data Uncompressed data 2097152 bytes in length Uncompressed data compared correctly Compressing Input Data, level 7 Compressed data 22975 bytes in length Uncompressing Data Uncompressed data 2097152 bytes in length Uncompressed data compared correctly Compressing Input Data, level 9 Compressed data 22790 bytes in length Uncompressing Data Uncompressed data 2097152 bytes in length Uncompressed data compared correctly Tested 2MB buffer: OK! SystemC: simulation stopped by user. Simulation finished Simulation statistics: simulation time: 67.6 seconds simulated time : 2.39704 seconds (exactly 2397041099141 ps) simulated instructions : 709134970 instructions host simulation speed: 10.4902 MIPS time dilatation: 28.2014 times slower than target machine === Using the Full-system Simulator === As a fullsystem simulator will boot up on OS, it requires more parameters such as a file describing the device tree, the kernel to be loaded and the kernel parameters such as the booting drive and init script name. For instance, the ''benchmarks/fullsystem'' folder contains a PowerPC linux kernel (vmlinuz) and an initial ramdrive (initrd). To simulate such a configuration, you should enter: ppcemu-system \ -t TLM-PowerPC/src/processors/powerpc/device_tree_pmac_g4.xml \ -a TLM-PowerPC/src/processors/powerpc/gdb_powerpc.xml \ -r ./benchmarks/fullsystem/164.gzip.img.gz \ ./benchmarks/fullsystem/vmlinux-2.6.19.2pmac \ root=/dev/ram0 init=/linuxrc The previous commend line will start simulating a PowerPC booting linux, and running the gzip benchmark loaded into the initrd ramdrive. The following output is produced on the framebuffer display: | Initializing the simulated bios | Loading kernel and probing\\ peripherals | Running bzip benchmark from \\ the initrd ramdrive | | {{snapshot_preboot.png?width=200}} | {{snapshot_boot.png?width=200}} | {{snapshot_spec.png?width=200}} | You can click on any of he above pictures to have a more detailed view of the framebuffer console.