Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show...
-
Upload
shannon-holt -
Category
Documents
-
view
213 -
download
1
Transcript of Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show...
![Page 1: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/1.jpg)
Ptolemy Tutorial What is Ptolemy? How it works? What is the development
environment for you Show demo and former simulation
work
![Page 2: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/2.jpg)
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
![Page 3: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/3.jpg)
Organization of the software
![Page 4: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/4.jpg)
Domains in Ptolemy
![Page 5: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/5.jpg)
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
![Page 6: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/6.jpg)
Basic building bocks
![Page 7: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/7.jpg)
NamedObj
![Page 8: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/8.jpg)
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
![Page 9: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/9.jpg)
Domain classes derived
![Page 10: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/10.jpg)
Block communication
![Page 11: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/11.jpg)
Hierarchical Abstraction
![Page 12: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/12.jpg)
Hierarchical Abstraction (cont)
![Page 13: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/13.jpg)
Star definition
![Page 14: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/14.jpg)
Star definition (cont)
![Page 15: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/15.jpg)
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
![Page 16: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/16.jpg)
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)
![Page 17: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/17.jpg)
DE model (cont.)
![Page 18: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/18.jpg)
File organization
![Page 19: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/19.jpg)
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)
![Page 20: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/20.jpg)
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
![Page 21: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/21.jpg)
Running Ptolemy Run Ptolemy demo
Go to demo directory cd $PTOLEMY/demo
Run pigi Run former simulation
FC-AL SSA XOR-based disk
![Page 22: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/22.jpg)
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
![Page 23: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/23.jpg)
Sample code for FC-AL LPSM
Input Inbound (from the loop) fromFC2 (FC-2 layer)
Output Outbound (to the loop) toFC2 ( to upper layer)
![Page 24: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/24.jpg)
LPSM Internal states:
State (int) AL_PA (int) Fairness (int) progDelay (float) transTime (float)
![Page 25: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/25.jpg)
LPSM implementation Methods:
Setup Go wrapup
![Page 26: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/26.jpg)
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
![Page 27: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/27.jpg)
New direction of Ptolemy Ptolemy II
Java based simulation environment
![Page 28: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/28.jpg)
Resources http://ptolemy.eecs.berkeley.edu
![Page 29: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/29.jpg)
Resources User Manual:
Pigi Ptcl Domains Vem Pxgraph installation
![Page 30: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/30.jpg)
Resources (cont.) Programmer manual
Software organization Writing stars Infrastructure Data types tcl/tk Domains Code generation
![Page 31: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.](https://reader035.fdocuments.in/reader035/viewer/2022070402/56649f275503460f94c3e5f6/html5/thumbnails/31.jpg)
Resources (cont.) Kernel manual
All stars defined in kernel Targets used in kernel