2.1.1. What is PARS?..................................................................................................................................... 12
4. PARS COMPONENT REFERENCE ............................................................................................................46
4.1.PARS CONTROL PANEL .............................................................................................................................. 46
4.1.2. File Menu ............................................................................................................................................46
4.1.3. PARS Menu.......................................................................................................................................... 46
4.1.5. Help Menu ...........................................................................................................................................46
5.3.2. Common Files...................................................................................................................................... 52
5.3.3. Scalar vs. Vector Inputs....................................................................................................................... 52
5.6.1. General Behavior ................................................................................................................................ 54
6.1.5. 3rd Party Board Support ..................................................................................................................... 55
7.1.5. Operation under HIL ...........................................................................................................................56
7.1.6. Operation in Standalone (embedded) Systems ....................................................................................56
7.2.4. Operation under HIL ...........................................................................................................................56
7.2.5. Operation in Standalone (embedded) Systems ....................................................................................56
7.4.3. TI CCS Operation................................................................................................................................57
7.5.REBUILDING OUTSIDE OF PARS................................................................................................................ 57
8.2.FILTER BANK ............................................................................................................................................58
Figure 1 - PARS Bird's Eye View.............................................................................................................................. 12
Figure 2 - PARS development cycle.......................................................................................................................... 15
Figure 4 - PARS Control Panel.................................................................................................................................. 16
Figure 9 - Opening a model in PARS.........................................................................................................................19
Figure 10 - Select model file to open ......................................................................................................................... 19
Figure 32 - Re-assign DSP task to FPGA task........................................................................................................... 31
Figure 33 - AddOne model on FPGA task................................................................................................................. 31
Figure 34 - Simulate, then generate the re-targeted application ................................................................................ 32
Figure 35 - PARS Generates FPGA-based application.............................................................................................. 32
Figure 36 - FPGA model execution on hardware (note the error) ............................................................................. 33
Figure 38 - PARS workflow and automation............................................................................................................. 34
Figure 39 - Simulink model Solver parameters..........................................................................................................36
Figure 40 - Simulink model Hardware Implementation parameters.......................................................................... 37
Figure 41 - Selecting a hardware profile.................................................................................................................... 38
Figure 42 - Processors and wires in a hardware system............................................................................................. 40
Figure 43 - How routing is implemented between processors................................................................................... 41
Figure 44 - Setting data types on Input/Output ports................................................................................................. 42
Figure 45 - Shortcut buttons on PARS control panel................................................................................................. 43
Figure 46 - General DSP task parameters panel ........................................................................................................43
Figure 47 - Filter Bank original model....................................................................................................................... 59
Figure 48 - PARS versions as seen by Matlab........................................................................................................... 62
Table 1 - Matrix of PARS features vs. tools required................................................................................................ 14
Table 2 - Model Parameters for Code Generation ..................................................................................................... 37
Table 3 - Allowable connection data types in PARS................................................................................................. 42
This manual is a reference for generating distributed-memory multiprocessing
applications from Simulink® models.
1.1. INTENDED AUDIENCE
Before you begin, you should be familiar with developing and managing simulation models in
Simulink®. The software toolkit presented in this document will help an experienced Simulink®
architect to realize their model on special purpose digital signal processing hardware.
It will be extremely beneficial if experience with embedded digital signal processing algorithms and
tools from the Texas Instruments family of processors is available as well. For designs targeting fieldprogrammable gate array (FPGA) technology, experience with implementation of designs in very high
level hardware description language (VHDL) and tools from the Xilinx family of FPGAs will be
beneficial.
It is not necessary for the Simulink® architect to have these skills directly, but individuals should be on
hand with these skills to assist the architect with optimization options, design trade-offs and analysis of
performance results.
This section introduces PARS, describes its operation, features and enumerates the
software requirements needed to use the product. A simplistic model is used to “walk thru” using
PARS.
2.1.1. What is PARS?
PARS stands for ‘Parallel Application from Rapid Simulation’ and is a toolkit for generating multip
rocessor applications from Simulink® models.
Figure 1 - PARS Bird's Eye View
The above diagram graphically illustrates how PARS enables Simulink® models to be deployed on
multi-DSP and multi-FPGA hardware.
By interfacing with several toolkits, development tool chains and a distributed memory
multiprocessing operating system, PARS is able to accomplish the incredible feat of
automating the process of realizing model-based designs into deployable firmware on
embedded hardware systems.
2.1.2. Features
• Target embedded systems consisting of TI DSP (C64xx, C67xx) and Xilinx FPGA
• Manages all inter-processor communication and synchronization
• Generates test benches for Hardware-In-The-Loop simulation
• Generates stand-alone (ROM-able) applications
2.1.3. Benefits
• Maintain the system specification in model-based design space
• Complete and seamless access to wealth of visualization and diagnostic tools in Simulink
• Machine generated software and firmware eliminates time-consuming implementation effort
2.2. REQUIREMENTS
PARS requires several products, toolkits and development environments. They are enumerated below.
The MathWorks software
1. Matlab R2007B or R2008A3
2. Simulink®
3. Real Time Workshop or Real Time Workshop Embedded Coder (preferred)
4. Simulink® HDL Coder™ (optional, if targeting FPGA and not using Sysgen, below)
5. Simulink® Fixed Point and Fixed Point Blockset (optional, if targeting FPGA)
6. Signal Processing Blockset (optional, but recommended)
Texas Instruments software
7. Code Composer Studio 3.3
Xilinx software (optional, if targeting any FPGAs)
8. ISE 10.1.03i (Service Pack 3, including all IP updates)
9. Xilinx System Generator 10.1.03 (optional, if not using Simulink® HDL Coder™, above)
3L software
10. Diamond/DSP and Diamond/FPGA v3.1.10
11. Diamond Service Update 7 (provided with PARS installation)
12. SDB Hotfix (provided with PARS installation)
2
These must be properly installed and configured prior to generating code. Additionally, any hardwarevendor drivers should also be installed prior to running test benches under hardware-in-the-loop. Any
2
All Mathworks toolboxes must be consistent upon the major release. For example, R2007B+, etc.
3
PARS is distributed based on a major release of Matlab, you must use the PARS installer appropriate for your release.
link-layer drivers in support of Diamond must be configured prior to attempting to run on
hardware. PARS provides an interface to link-layer drivers based on Diamond’s example
TIS project4.
PARS The MathWorks TI Xilinx Diamond/DSP Diamond/FPGA
DSP FPGA Simulink RTW RTW-EC HDLCoder CCS ISE Sysgen Single Multi Single Multi
Single None R R O N/A R N/A N/A R O N/A N/A
Single Single
Single Multi R R O O R R O R O N/A R
None Any Not Available in PARS 11
Multi None R R O N/A R N/A N/A N/A R N/A N/A
Multi Single
Multi Multi R R O O R R O N/A R N/A R
R R O O R R O R O R O
R R O O R R O N/A R R O
Table 1 - Matrix of PARS features vs. tools required
The table above summarizes the required tools with respect to the desired number of DSPs and FPGAs.
An ‘R’ indicates a required tool. ‘O’ indicates an optional tool. ‘N/A’ indicates the tool does not
apply.
2.3. DEVELOPMENT FLOW
Generally speaking, developing with PARS is very similar to developing in Simulink®. A ‘PARS’
model is a fully-featured Simulink® model, with one important caveat: Prior to initiating code
generation, all blocks on the top level model must be organized into subsystems which have been
assigned to a processor type using the PARS Control Panel.
Organizing blocks into subsystems does not alter their behaviour in any way, so the model remains true
to the original. Assigning a subsystem to a processor type using PARS, causes the subsystem to be
‘masked’ and provides a means to control attributes for that subsystem with respect to the type of
processor you have assigned.
4
See: %DIAMOND_ROOT%\server\examples\TIS for additional details.
You can re-assign subsystems to other processors at any time to explore trade-offs with code execution
on multi-DSP systems. You can also re-assign subsystems to other processor types (such as from DSP
to FPGA) to explore architectural trade-offs in the implementation.
The resulting application can be re-distributed or embedded into FLASH for stand-alone use.
Here is a walk-through implementing a simple model with PARS.
Figure 3 - Invoking PARS
The first step is to start Matlab and invoke PARS.
Figure 4 - PARS Control Panel
The PARS control panel enables you to automate many of the steps needed to prepare a Simulink
model for code generation. It stays open on the desktop while you work in Matlab and Simulink.
Decide what your target hardware is going to be. PARS keeps a database of hardware targets that it can
use, and you can add additional ones or modify existing ones, as they are .m files. To pick a target
hardware, you invoke the ‘PARSOptions’ command.
The ‘PARSOptions’ dialog allows you to pick the target hardware profile, as well as control several
features of the code generation system. These are described in detail in the section ‘PARSOptions’,
below.
The next step is to use the PARS control panel to open an existing Simulink model that
you would like to run on the target hardware.
Figure 9 - Opening a model in PARS
Then browse to the location of the model. This walkthrough works with one of the demonstration
models provided by PARS.
Figure 10 - Select model file to open
At this point one of three things will happen: Normally, PARS will create a new folder and make a
copy of the original model, giving it a ‘_PARS’ suffix. If the folder already exists, PARS will analyze
the modification time of the model with the ‘_PARS’ suffix versus the original model. Then, it will
either use the ‘_PARS’ model (continuing the work-in-progress) or offer to back-it-up and start over.
For the walkthrough, the ‘normal’ case is most probable.