Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show...

31
Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work

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.

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.

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.

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.

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.

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.

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.

NamedObj

Page 8: Ptolemy Tutorial What is Ptolemy? How it works? What is the development environment for you Show demo and former simulation work.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Resources (cont.) Kernel manual

All stars defined in kernel Targets used in kernel