Compilation of Matlab to Process Networks (Compaan)

Compaan is an effort to automatically compile a subset of imperative programs into a concurrent representation. Compaan uses Matlab language as the imperative language and compiles programs in this language into a concurrent representation: a particular version of Process Networks.

The compaan work is motivated by the advent of a new kind of embedded architectures that is composed of a microprocessor, some memory, and a number of dedicated coprocessors that are linked together via some kind of programmable interconnect. These architectures are devised to be used in real-time, high-performance signal processing applications. Thy have in common that they exploit parallelism using instruction level parallelism offered by the microprocessor and coarse-grained parallelism offered by the coprocessors. Given a set of applications, the hardware/software codesign problem is to determine what needs to execute on the microprocessor and what on the coprocessors and furthermore, what should each coprocessor contain, while being programmable enough to support the set of applications.

Compaan tries to provide a tool that can help designers in answering this tough question of how to partition an application into hardware and software candidates. A motivation why Process Networks are a good match for these new embedded architectures can be found in kienhuis et at. [2000]. Compaan consists of three different tools, which are shown here below.

 

 The three tools are:

  1. MatParser.
    MatParser is a sequential to parallel compiler. It extracts all available parallelism present in a Matlab description. The Matlab however needs to be confined to a particular type called Nested Loop Programs. MatParser uses a very advance parametric integer programming (PIP) technique to find all available parallelism in terms of the parameters of the original program.
  2. DgParser
    DgParser converts a single assignment program, generated by MatParser, into a Polyhedral Reduced Dependence Graph (PRDG) representation. A PRDG representation is much more amenable to mathematical manipulation.
  3. Panda.
    Panda transforms the PRDG description of an algorithm into a network of parallel running Processes, the desired Kahn Process Network. This tool uses the
    Polylib library extensively. Using Polylib, Panda can generate Ehrhart polynomials that give a symbolic expression for the number of integer points available in arbitrary polyhedra. The conversion from the PRDG to a Process Network happens in three steps; domain scanning, domain reconstruction and linearization.

The process networks that are being created by Compaan need to be made accessible in some kind, such that it can be simulated and analyzed. We use the Ptolemy II framework, developed at UC Berkeley. We make a process network available in the PN-domain. Compaan generates the network description in MoML, which is a modeling markup language based on XML used in Ptolemy II for specifying interconnections of parameterized components. The process generation step in this case, generates the Ptolemy II actors in the PN-domain. A MoML description can be executed as an application using a command-line interface or as a visual rendition in the Ptolemy II block diagram editor Vergil. Two examples will show screen dumps of PN networks in Ptolemy II.

The Ptolemy II framework enables us to combine the derived process network descriptions with predefined actors like sources to read Matrices and sinks to read and visualize Matrices. It also let us combine process networks with other domains, enabling the description and simulation of more complex systems.

Achievements

Achievements in MatParser, DgParser, and Panda

Publications/Presentations

 

People Involved

 

Related Links