PTOLEMY DOMAINS AND BASIC OPERATIONS

1. SIMULATION DOMAINS
- Synchronous dataflow (SDF)
- Boolean dataflow (BDF)
- Dynamic dataflow (DDF)
- Process Network (PN)
- Discrete Event (DE)
- Multidimensional Synchronous dataflow (MDSDF)
2. Simulation Domain Presentation: SDF *
- Synchronous dataflow (SDF)
- the oldest and most mature domain
- about 500 stars available
- suitable for :
- digital filtering (fixed or adaptive, in time or frequency domain, real and complex filters, ...)
- speech coding and sound synthesis
- image processing and video coding
- sample rate conversion and multiple rate applications
- analysis and synthesis filter banks
- modems
- phase-locked loops
- channel simulation
- linear prediction and Kalman filtering
- spectral estimation, ....
- all pure signal processing with or without sampling rate change
3. Simulation Domain Presentation: BDF
Boolean dataflow (BDF)
- like DDF, also a run-time flow of control
- unlike DDF attempts to construct compile-time schedule
- mechanism = annotated schedule, ie a static schedule where each firing is annotated with the Boolean condition under which it occurs; the Boolean values are computed during the execution
- does not support recursion
- applications are the same as those of DDF
- SDF is a subdomain of BDF, which is a subdomain of DDF
4. Simulation Domain Presentation: DDF
Dynamic dataflow (DDF)
- dynamic (run time) scheduling and flow of control
- allows data-dependent iteration, true recursion and simulation of systems with multiple modes of operation
- typical examples:
- modems implementing multiple standards
- signal coding algorithms with a range of compression scheme
- asynchronous signal processing such as timing recovery and arbitrary sample rate conversion
- clock recovery system in radiocommunication
- SDF is a subdomain of DDF
Simulation domains:DDF
5. Simulation Domain Presentation: PN
Process Network (PN)
- implementation of Kahn process networks, a generalization of dataflow, where dataflow actors become dataflow processes
- implemented using POSIX threads
- PN systems can run in parallel on multiprocessor workstations with appropriate OS support for threads
- SDF, BDF nad DDF are subdomains of PN
- still an experimental domain
6. Simulation Domain Presentation: DE
Discrete Event (DE) = Time domain
- each data has an associated time stamp
- event driven model of computation
- a scheduler maintains the event queue
- simultaneous events are handled in a consistent way
- suitable for
- high-level modeling of communication networks (packet switched networks, wireless networks)
- hardware systems and queuing systems
- multimedia systems
- transportation networks
- synchronizing a simulation to a real-time clock
- can be used in combination with SDF, BDF, DDF or PN domains
7. Simulation Domain Presentation: MDSDF
Multidimensionnal Synchronous Dataflow (MDSDF)
- still new and experimental domain
- extension of the SDF to multidimensional streams
- greater variety of dataflow schedule in a graphically compact way
- potentially can reveal data parallelism
- current implementation limited to two dimensional streams
8. What is a wormhole ?
by definition a wormhole is a star from a particular domain that internally contains a galaxy from another domain
- it allows domains to be nested and mixed
9. CODE GENERATION DOMAINS
- Code Generation Domains
- Code Generation in C (CGC)
- Code Generation for Motorola 56000 (CG56)
- Code Generation for TMS320C50 (CG320C50)
- Code Generation for VHDL (CGVHDL)
- Code Generation Domain: CGC
- Code Generation in C (CGC)
- the most mature code generation model
- can generate code for SDF, DDF, and BDF models
- generate code for having the simulation working on many processors
- handles automatically the parallelisation of the code (for multi DSP boards)
- !! does not handle message structures !!
- (just built in data types)
10. Code Generation Domain: CG56
Code Generation in assembly code for Motorola 56000 DSP (CG56)
- support only SDF systems
- possibility to have the generated code running on a real DSP board connected to the station, and to have some stimuli coming from a SDF simulation
- used for example:
- for real-time implementation of various modem standards,
- for touchtone generators, touchtone decoders
- but resulting code not very efficient for elementary operations
- !! old development stopped !!
11. Code generation: CG320C50
same principles as CG56 but for TMS320C50
named CG320C50 starting from release 0.7
12. Code generation in VHDL VHDL
- supports only SDF systems
- for modeling systems at the functional block level, independently of implementation issues:
- DSP functions for filtering and transforms
- digital logic functions
- different targets are available for different styles of VHDL, behavioural or structural (for VSS, for Model TechVHDL simulator)
- no bit or bit vector available
- co-simulation between a VHDL simulator and Ptolemy is possible
13. Code Generation Domain: CGVHDLB
- supports behavioral models using native VHDL discrete event model of computation
- for modeling the behaviour of the components and their interaction at all levels of abstraction
13. What is a target ?
- a target is related to a domain
- a target is a structure used to control
- either the execution and scheduling of a simulation ( in case of a simulation domain )
- or the code generation, scheduling, compilation and execution ( in case of a code generation domain )
- each target has a different behaviour / principle
- each target has its own parameters
- targets can be changed / edited by the user ('T')
14. Ptolemy Terminology
- a domain of simulation is considered as an object defining the model of computation, which defines the behavior of a network of blocks
- a domain of code generation corresponds to a single target language
15. Ptolemy Terminology
- a star is the lowest level of block in Ptolemy
- a galaxy is a block made up of connected sub-blocks, with inputs and/or output
- a universe is an outermost block representing a complete system that the user can run
15. Ptolemy Terminology
- a schematic is a block diagram, at any level
- a palette is a design object that contains a library of icons rather than a schematic
- a facet is a design object, either a schematic or a palette
Related utilities
used to display simulation results:
- Xgraph: for curves
- Xv: for static images
- URT: for moving pictures
- ptplay: for sounds
- if Matlab license available: for any curve or static image plotting
16. Designing a universe: workflow
17. Creating a universe: step by step
- open main palettes ('O')
- open needed palettes ('i')
- open new facet window with universe name ('F')
- build schematic with existing stars and galaxies
- select blocks and place them on schematic
- connect them to each others
- add signal sources and display blocks
- edit star parameters ('e')
- save schematic ('S')
- check result and run simulation ('R')
- Designing a galaxy: workflow
18. Creating a galaxy: step by step
- open main palettes ('O')
- open needed palettes ('i')
- open new facet window with galaxy name ('F')
- build schematic with existing stars
- select blocks and connect them
- add wires for inputs / outputs
- give them a name ("name" then 'c')
- edit star parameters (',')
- save schematic ('S')
- create galaxy ('@') and give related palette name
- check in the given palette the presence of the created block
19. PTOLEMY Basic commands
| Window management |
| F |
"Facet": open facet or new/existing schematic |
| O |
"open" palette list |
| CTRL-D |
"quit" window |
| Schematic creation |
| c |
"create" a new block or wire name |
| i |
"inside": look at palette or block content |
| S |
"save" a schematic |
| Schematic edition |
| e |
"edit" the parameters of a block |
| Simulation |
| R |
"run" the simulation of current schematic |
20. Ptolemy basic commands for creating a schematic
| Window management |
| F |
"Facet": open facet/schematic |
| O |
"open" palette list |
| z |
"zoom" in a window |
| Z |
"zoom" out a window |
| p |
"pan" a window |
| CTRL-D |
"quit window |
|
|
| Schematic creation |
| c |
"create" a new block or wire name |
| i |
"inside": look at palette or block content |
| s |
"select" a block |
| u |
deselect a block |
| m |
"move" a block |
| S |
"save" a schematic |
|
|
| Schematic edition |
| e |
"edit" the parameters of a block |
| , |
show the description of a block |
| <- |
delete a line or a box |
| D |
"delete" a pointed block or wire |
|
|
| Simulation |
| * |
make new star |
| @ |
create a star / galaxy from a schematic |
| R |
"run" the simulation of current schematic |
Copyright Arnaud LAPREVOTE & FREE&ALTER SOFT 1997-2000 - Right to copy, distribute, modify electronically the electronic form is given to anybody. Commercial reproductions on paper vorbidden without written autorisation of Arnaud LAPREVOTE