|
|
 | | From: | Edward A. Lee | | Subject: | RE: Vergil lock-ups | | Date: | Wed, 22 Dec 2004 05:48:53 -0800 |
|
|
 | At 07:03 PM 12/21/2004 -0700, jeff_patterson@agilent.com wrote: >I am using DE to model a system for synchronizing two state machines >separated by a matched (but asynchronous) delay. When I hit Stop, I see >the 'wrapping up' and 'execution finished' messages on the status bar. The >simulation output is as expected and sim time appears to be chunking along >just fine right up to the time I halt. When I hit the Stop button, the CPU >meter on the task mon rails out and any subsequent changes to the system >are ignored. I can't delete actors or change parameters. I can save, and >'look inside' actors etc. Sometimes closing the file and reopening clears >the problem. Sometimes I have to exit vergil altogether. It seems to >happen more often after I've run a few sims. Like I mentioned, it happens >on both my Windows and Linux boxes.
Very interesting. I would probably have to see the model to track this down, but I can offer some observations.
The reason that you can't delete actors or change parameters is that any action that changes the model is queued as a "change request" and executed only between iterations or when the model is idle. Clearly, the model is somehow getting into an infinite loop.
One simple trick that could help track this down is to start vergil from the command line, then (on Windows at least) hit Control-break when the model is in the inifinite loop. This will display the stack traces of all running threads, which will indicate what code is currently executing. If you can do this and send me the stack trace, I would be grateful. This seems like a rather serious bug, so I would like to track it down...
>While I'm here I have a question about DE. In this domain, what's the best >way to model a flag that needs to stay asserted until a clock event >arrives? For example, in the system I'm working on, I need to >conditionally inhibit a clock event to an FSM based on an asynchronous >event that may have occurred between clocks. In the real world, such an >asynchronous event could be recorded with a flip-flop whose output >persists across the next clock edge. In the DE domain though, it appears >that all data is impulsive (i.e. of zero time width) and disappears after >the event token is absorbed by an actor. (Is this correct?). If I use an >SDF director in a modal refinement that connects the flag output to a >constant it seems to work but am I then scheduling a huge number of events >in the DE domain? >Any hints would be appreciated.
You could use the Sampler actor (in DomainSpecific->DE). It's doc says:
Output the most recent input token when the trigger port receives a token. If no token has been received on the input port when a token is received on the trigger port, then the value of the initialValue parameter is produced. If, however, the initialValue parameter contains no value, then no output is produced. The inputs can be of any token type, but the output port is constrained to be of a type at least that of the input port and the initialValue parameter (if it has a value).
Edward
>Sorry if this is the wrong forum for such questions. > >Jeff > > > >-----Original Message----- >From: Edward A. Lee [mailto:eal@eecs.berkeley.edu] >Sent: Tuesday, December 21, 2004 9:28 AM >To: Jeff Patterson >Cc: ptolemy-hackers@eecs.berkeley.edu >Subject: Re: Vergil lock-ups > > > >Hmm... If you can save, then the UI must not be actually hanging >(which would be a deadlock problem, probably). I suspect it's a problem >with an infinite loop. What is your model doing? Is it a DE model? >DE has a "feature" that if an actor fails to consume input tokens that >are present, the actor is refired at the current time. If it continues >to fail to consume the token, an infinite execution where time does >not advance results... > >Edward > >At 06:21 AM 12/21/2004 -0800, Jeff Patterson wrote: > >Since installing PTII v4.01 I've been having trouble with vergil locking > >up. It seems to occur after a simulation is stopped prematurely (i.e. > >using the stop button) at which point no modifications (moving actors, > >changing parameters etc.) are possible. You can however save the file. > >When it is in this mode it consumes all available CPU resources. I see > >this in both a windows NT and linux installation. > > > >Any ideas? > > > >Jeff Patterson > >Agilent Technologies > > > > > > > > > >---------------------------------------------------------------------------- > >Posted to the ptolemy-hackers mailing list. Please send administrative > >mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu > >------------ >Edward A. Lee, Professor >518 Cory Hall, UC Berkeley, Berkeley, CA 94720 >phone: 510-642-0455, fax: 510-642-2718 >eal@eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
------------ Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2718 eal@eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu
|
|
|