I'll take a shot at this. horne <[EMAIL PROTECTED]> writes: > i am rewriting in Java a low-level hardware simulation that i have written > previously in C++ with CSIM19. CSIM is a process-oriented discrete event > simulation library. anyone may answer any part of my e-mail: > > --- > > 1) what ptolemy classes act as low-level process-oriented DE library to > replace what CSIM did, for example: > > create processes > > synchronizing events (set, clear, wait) > > resources (counters, buffers, process waiting queues)
You could look at the Distributed Discrete Event (DDE) domain in ptolemy.domains.dde. DDE is an experimental domain. See $PTII/ptolemy/domains/dde/doc/main.htm for a description. ptolemy.actor.process contains generic Ptolemy process domain classes that you might find interesting. > --- > > 2) from experience, can anyone suggest whether the message-passing DE model > (based on fire()) or a process-oriented model is 'easier' for > electronics-level simulation? (ie. would it be worth it to convert my > existing C++ process model to a message model?) If by processes, you mean threads, then in my personal experience, a message passing model is easier. Threads are great, but the bugs are very subtle and the overhead can be high. > --- > > 3) initially i intend to use the simulator without virgil (console > and custom GUI). what are the ptolemy classes or combinations of > classes that would approximately correspond to:: ? You can run Ptolemy models without the GUI, see question 4.1: How do I invoke Ptolemy II in $PTII/doc/ptIIfaq.htm http://ptolemy.eecs.berkeley.edu/~ptII/ptolemyII/ptIIfaq.htm#invoking%20Ptolemy%20II? > Model - ex: in my simulation, this would be the class that > implements electronics with a parameterizable topology (for example: > instantate N chips, N^2 links, etc.), whose instantiation would > contain all of the active simulation components You can specify your model topology using MoML - The xml that Vergil generates ptjacl - A 100% Java implementation of a subset of Tcl See for example ptII/ptolemy/actor/lib/test/Ramp.tcl Java - You can call Java methods, see ~/ptII/ptolemy/domains/sdf/demo/Butterfly/Butterfly.java Cal - A language for specifying actors, see $PTII/ptolemy/caltrop Usually one creates a ptolemy.actor.lib.TypedCompositeActor and then starts adding components. > > Components ptolemy.actor.lib > Experiment - a (detailed, time indexed) statistical history of a model > subjected to events, which would control the simulation time/execution The Director implements the model of computation and ptolemy.actor.Manager gets involved as well See http://embedded.eecs.berkeley.edu/concurrency/ptolemy/actor.pdf The docs at http://embedded.eecs.berkeley.edu/concurrency/ptolemy/index.html are a good place to browse. > .. > > > maybe if you can help me with these questions, i will write a 'Ptolemy for > CSIM Users' transition guide. Sounds interesting _Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]