Enabling DS-5 Streamline with Fixed Virtual Platforms

My colleague Jason recently published a very informative blog on enabling the Fast Models Fastline feature, a standard part of Fast Models v11.0 (and later) to generate data for the Streamline profiling tool. I highly recommend you read his blog before proceeding, as I make multiple references to it below.

Knowing that the Fixed Virtual Platforms (FVPs) provided with DS-5 are built with the same technology, I endeavored to replicate his steps with these platforms. Furthermore I wanted to see if I could achieve all steps within the DS-5 Eclipse environment (on a Windows machine).

Throughout the below, I used the multi-core fireworks example provided with DS-5, though any project could be used in a similar manner. Select Import... from the File menu and navigate to the fireworks_A9-FVP_AC6 example. Note you can use the text filter box to zoom to the project easily. Click Finish to import to your workspace.

Within the project I created a new folder named Fastline_scripts, and copied the json script examples from the FastlineTrace package. We will make use of these later.

Software preparation

Python scripts are provided to extract the necessary data from the ELF image. DS-5 includes scripting functionality that includes python support. As scripts are generally used to interact with a target directly, scripts are associated with a debug connection, so ensure the fireworks_AC6-Cortex-A9x4-FVP debug configuration is selected (or create your own new connections for this).

Locate the Scripts pane (use Window → Show View → Scripts for convenience), then click on the Import a script or directory button, and navigate to process-elf.py from the Fastline installation. You can then specify the image as a parameter to the file.

Connect to the target to run the script, and you can then disconnect. Note you only need to run this once (assuming you do not rebuild the original image). Assuming everything works OK (you will see the script output in the Commands pane), a .csv file be created in the project folder.

Configuration Files

These files are created in essentially the same way as per the previous blog. I noted that I had to use full paths for references to any source files. I also note Jason's comments on creating the Counter Configuration File. For now, I have decided to leave this blank, I believe this topic to warrant a future blog of it's own!

Loading the plugin and setting other parameters

Within the Debug Configurations pane, you can specify all the necessary parameters to enable the Fastline functionality.

Because this command line is resolved within Eclipse, you can make use of the workspace_loc variable to aid portability. I entered the following (edit as appropriate for your paths):

--plugin "C:\Arm\Fast_Models\FastModelsPortfolio_11.0\plugins\Win64_VC2013\Release\FastlineTrace.dll"
-C TRACE.FastlineTrace.config="${workspace_loc:/fireworks_A9-FVP_AC6_Fastline/Fastline_scripts/a9_fvp_system_config.json}"
-C TRACE.FastlineTrace.output-directory="${workspace_loc:/fireworks_A9-FVP_AC6_Fastline/Fastline_captures/}"
-C TRACE.FastlineTrace.apc-capture="fireworks.apc"

You can load the image via the Files tab as normal.

Run the image as normal from here and it will generate a database to load to Streamline (which is a separate executable to the DS-5 Eclipse IDE). The main usage for this with a Fast Model based platform would be to investigate code coverage to ensure that all paths through the code are taken. In the below screenshots I had a sample rate of 500 (as defined by sampling-frequency in the cluster config file). You could bring this down all the way to 1 to sample on every single cycle, though this does slow down execution considerably, and generates a huge database for Streamline to analyze.

Anonymous