ptolemy tutorial what is ptolemy? how it works? what is the development environment for you show...
TRANSCRIPT
Ptolemy Tutorial What is Ptolemy? How it works? What is the development
environment for you Show demo and former simulation
work
What is Ptolemy Ptolemy is a software
infrastructure (kernel) developed by EECS dept, Berkeley Object-oriented Support modeling, simulation, design
and code generation for concurrent, embedded real-time system.
Support multiple domains Support heterogeneous environment
Organization of the software
Domains in Ptolemy
Ptolemy executables Pigi
All domains and targets plus GUI Ptrim
SDF,BDF,DDF,DE,CGC and HOF domains plus GUI
Ptiny SDF and DE domains plus GUI
Ptcl All domains, no GUI
Basic building bocks
NamedObj
Basic building blocks Star: lowest level block in Ptolemy, with
functionality defined in c++ Galaxy: A block consisting of sub-blocks
with input and output. Universe: An outmost block defining a
executable system Domain: A model of computation, defining
the behavior of a network of objects Wormhole: A galaxy with different
domains from inside and outside
Domain classes derived
Block communication
Hierarchical Abstraction
Hierarchical Abstraction (cont)
Star definition
Star definition (cont)
DE model Provides a generic environment for
time-oriented simulation system Queuing system Communication network High-level modeling of computer
architecture Particles represent event: change
of system state
DE model Each particle has an associated
timestamp A global event queue sorts events
by timestamp DE processes event in a
chronological order (fetches the first one)
DE model (cont.)
File organization
Setup your environment Environment variables:
PTOLEMY: full path name of ptolemy installation
PTARCH: the platform on which Ptolemy is running
Setup environment (put in .cshrc) setenv PTOLEMY ~ptolemy setenv PTARCH `$PTOLEMY/bin/ptarch` setenv path = ($PTOLEMY/bin $PTOLEMY/bin.
$PTARCH $path)
Setup environment (cont.) On machines in cs dept
View available module Module ptolemy
Load Ptolemy Module load soft/ptolemy
Setup JAVAHOME environment variable
setenv JAVAHOME /soft/java/SunOS5.6/JDK-1.3
Running Ptolemy Run Ptolemy demo
Go to demo directory cd $PTOLEMY/demo
Run pigi Run former simulation
FC-AL SSA XOR-based disk
Using GUI Programs:
Vem Oct pigiRPC
Design objects Oct: design manager and database Facet: a design object(schematic or palette) Schematic: a design block diagram Palette: a facet containing a library of icons
Sample code for FC-AL LPSM
Input Inbound (from the loop) fromFC2 (FC-2 layer)
Output Outbound (to the loop) toFC2 ( to upper layer)
LPSM Internal states:
State (int) AL_PA (int) Fairness (int) progDelay (float) transTime (float)
LPSM implementation Methods:
Setup Go wrapup
Checklist to write your own simulation system Have a overview of Ptolemy Conduct Architectural design of your system
Basic star Galaxy Universe
Get familiar with the Ptolemy running environment, draw the schematic diagram
Implement all your stars Tweak and run your simulation Analyze the result
New direction of Ptolemy Ptolemy II
Java based simulation environment
Resources http://ptolemy.eecs.berkeley.edu
Resources User Manual:
Pigi Ptcl Domains Vem Pxgraph installation
Resources (cont.) Programmer manual
Software organization Writing stars Infrastructure Data types tcl/tk Domains Code generation
Resources (cont.) Kernel manual
All stars defined in kernel Targets used in kernel