Chapter 3. Heterogeneous System Design with ESE

This section deals with design of MP3 decoder on a heterogeneous platform consisting of one MicroBlaze processor and four HW accelerators. There are two buses in the platform. The Microblaze processor uses its compatible OPB. The hardware accelerators on the other hand, were manually designed and use their own proprietary Double Handshake (DH) bus. Since the two bus protocols are incompatible, a transducer that acts as a buffer and protocol converter, interfaces between the buses.

The MP3 application code is available as a C model. This C model was divided into five processes, by separating the left/right channel DCT32 and IMDCT36 transforms into separate processes. These new processes run concurrently to the main MP3 thread since they are data independent. In this Chapter, the communication between the processes takes place through pairs of message passing channels. ESE provides well defined communication APIs for this purpose. The testbench includes an MP3 file that is decoded into a corresponding PCM file by the design. The decoded output is shown graphically during the TLM simulation of the MP3 decoder.

The chapter starts by explaining the set up for ESE. It then shows, using screenshots, how the platform is created. To speed up the demostration, and to emphasize on the features, we start with an existing partial platform that is upgraded with an additional processor. Then we show the application mapping on the platform, followed by TLM generation, simulation and performance estimation. Thus, we present the core capabilities of the ESE Front-End tools in easy platform design & upgrade, model generation, validation and estimation.

3.1. ESE Startup and Settings

Before starting the demonstration, please ensure that you have the ESE software installed in the right location at "/home/ese/local." Also make sure that you have an "/home/ese/local/pkg" directory containing the SystemC 2.2.0 libraries and SDL libraries that are needed for simulation of generated TLMs. Also make sure that you have GCC version 3.4 or higher because it is needed to correctly compile the generated TLMs. The demonstration shown here assumes the user to have a bourne shell. For C shell, the user may call the ".csh" version of the setup scripts. Alternately, just use "sh" to create a new bourne shell and follow the tutorial directions.

3.1.1. Environment Setup

We start by setting up the environment variables to access ESE binaries. This is provided by the "setup.sh" script in your installation. Typically, the installation path would be "/home/ese/local." The script is in the "bin" directory in the installation. The script modifies your PATH environmental variable to include path to ESE as well as the LD_LIBRARY_PATH variable to access the shared libraries that ESE depends on. Run the command "source /home/ese/local/bin/setup.sh" and create a new local directory for the demo.

3.1.2. ESE Demonstration Setup

Once the environmental variables have been set, the user is ready to launch ESE and create his or her design. For the purposes of this tutorial, we will start with a partial design to quickly demonstrate the key capabilities of the toolset. We have created a shell script called "esedemo_hsd.sh" that prepares a partial design to start the demo for the MP3 decoder. At this point, run the "esedemo_hsd.sh" script after changing into the local directory created for the demo.

3.1.3. Launching ESE

After running the "esedemo_hsd.sh" script, you will notice several files in the working directory. Some of these files will have a ".eds" extension. They are the ESE design files for the MP3 decoder designs that we will be using for this demo. You may also see links to source directories. These point to the C code for the processes of the MP3 application. To launch the ESE GUI, simply run "ese" from your shell.

3.1.4. ESE GUI

The ESE GUI should now appear as shown in the screenshot. The GUI has several menu items that we shall explore over this tutorial. It is divided into five windows. The top left window is the "PE" window. It organizes the various application processes mapped to PEs in the design. The mid-left window is the "Channel" window that organizes the various channels used for communication between the application processes. The tabs represent the physical communication links in the platform. The bottom left window is the "Database" window that organizes the PE, CE, memory and RTOS model. The top right window is the "Platform Canvas" on which the platform architecture is edited graphically. The bottom right window is the "Logging" window that logs the messages from various ESE tools.

3.1.5. Editing Database Preferences

Before creating a new design, we must ensure that the components needed for our MP3 platform are accessible by the GUI. To do so, we edit the database preferences by selecting Edit->Preferences from the menu bar.

3.1.6. Select Database File

In the Preferences dialog, select the tab for Database. This will allow the user to browse for the database file that has a ".edb" extension. The database file needed for the MP3 demonstration already comes with the ESE installation. Typically, this file will be called "ese.edb" and will be located at "/data/users/ese/local/db/ese.edb." If the selection is not already there, please browse for the file and press OK. The PEs, buses and transducers should now be visible in the database window, if they weren't already.