
This tutorial walks through the process of importing the code examples into the Prism workspace and details the steps involved in creating a new Prism project and generating traces for it.
Once installed start up Prism by double clicking on the Prism Icon on the desktop. You will be prompted for a Workspace location into which all of the working files from your Prism session will be stored. Specify an appropriate location (you can change this later or have multiple workspaces) and click OK and Prism will load up with its welcome screen.
From the Prism Welcome Screen you may directly go to Prism User Guide, the Tutorials, create a new project and pad. To start the tutorial click the Start button that will open the Prism perspective. The views available in Eclipse will now be set to present the default Prism configuration.
Follow the directions in the building applications section of the reference guide in order to setup your build environment correctly for your required toolchain.
The following steps describe how to setup the tutorial code.
The project should now be imported into Prism. The examples are supplied as C code and are built as a standard Eclipse CDT makefile project. Do the following.
Prism works by analyzing the runtime behavior of a program. The behavior is captured as a set of traces, generated by running the user executable on a simulator, which are then loaded into Prism. This trace information along with other state information is organized in Prism Analysis Definition (PAD) files and the first step of an new analysis session is to create one of these PAD files.
A new PAD file (My.pad) is created and the contents are displayed in the PAD View. The exact layout varies depending on the toolchain being targeted by Prism but all configuration have the same basic functionality. The next step is to create traces from the executable.
The completed Invoke Simulator tab of the PAD view. Contents may vary depending on toolchain. (Click to Enlarge)
Once the traces are loaded the PAD View switches to show the Histogram View of the program trace. At this point the raw trace from the simulator has been processed and the results are stored in Prism Intermediate Trace (PIT) files managed by the PAD. This means that it is not necessary to rerun the simulation every time Prism is closed and restarted unless the executable itself has been modified. Try the following:
The view will now switch to show the histograms ready to begin the analysis session.
The resulting Histogram tab contents after running the simulator and loading the trace files. (Click to Enlarge)