Need to delay execution by 1 clk...
Hi I am new to ptolemy (6 months). Currently I am using PTII 3.0.2 for building(simulating) custom actors in the DE domain, which are basically executional elements (of a reconfigurable device). In one particular situation I have an actor with 8 stages of execution. During initialize I construct a Execution(Data) flow graph depending on the selector settings in the actor. I traverse through the graph and execute each stage in it during fire. Now at one stage I need to create a delay of 1 clock. The executional unit needs to sleep for a clock and proceed to the next stage. Basically I need to forward time by a clock. setCurrentTime (currentTime+1) might not be a good idea as it might cause problems to the token's timestamp. What is to be achieved is that the currentTime after this stage should be t+1(say we started at t). I don't know if I can use DEEventQueue in any way for this purpose. Maybe its a wrong or a repeat question! I have searched all group messages and couldn't find anybody with such a requirement. Can somebody help me out with this problem? - kiran -- __ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
Re: Need to delay execution by 1 clk...
Will the TimedDelay actor do what you need? Edward Lee At 04:06 PM 11/27/2003 +0500, Kiran SB wrote: Hi I am new to ptolemy (6 months). Currently I am using PTII 3.0.2 for building(simulating) custom actors in the DE domain, which are basically executional elements (of a reconfigurable device). In one particular situation I have an actor with 8 stages of execution. During initialize I construct a Execution(Data) flow graph depending on the selector settings in the actor. I traverse through the graph and execute each stage in it during fire. Now at one stage I need to create a delay of 1 clock. The executional unit needs to sleep for a clock and proceed to the next stage. Basically I need to forward time by a clock. setCurrentTime (currentTime+1) might not be a good idea as it might cause problems to the token's timestamp. What is to be achieved is that the currentTime after this stage should be t+1(say we started at t). I don't know if I can use DEEventQueue in any way for this purpose. Maybe its a wrong or a repeat question! I have searched all group messages and couldn't find anybody with such a requirement. Can somebody help me out with this problem? - kiran -- __ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED] Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2739 [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
Re: Need to delay execution by 1 clk...
Thanks for the response... TimedDelay just sends out a token after a specified delay (send (token, delay)). what I am looking at is to stop(delay) the execution by a clock and proceed. I could have used TimedDelay if I had to delay in a particular simulation. But I need to delay inside an actor and not while sending out the Token. Just somehow hold the execution for one clock. Its a flipflop kind of a device which needs to hold the data for 1 clock and then give it out to the next stage of execution. - kiran - Original Message - From: "Edward A Lee" <[EMAIL PROTECTED]> Date: Tue, 02 Dec 2003 15:23:31 -0800 To: "Kiran SB" <[EMAIL PROTECTED]> Subject: Re: Need to delay execution by 1 clk... > > Will the TimedDelay actor do what you need? > > Edward Lee > > At 04:06 PM 11/27/2003 +0500, Kiran SB wrote: > >Hi > >I am new to ptolemy (6 months). > >Currently I am using PTII 3.0.2 for building(simulating) custom actors in the > >DE domain, which are basically executional elements (of a reconfigurable > >device). > > > >In one particular situation I have an actor with 8 stages of execution. > >During initialize I construct a Execution(Data) flow graph depending on the > >selector settings in the actor. > >I traverse through the graph and execute each stage in it during fire. > >Now at one stage I need to create a delay of 1 clock. > >The executional unit needs to sleep for a clock and proceed to the next stage. > >Basically I need to forward time by a clock. > >setCurrentTime (currentTime+1) might not be a good idea as it might cause > >problems to the token's timestamp. > >What is to be achieved is that the currentTime after this stage should be > >t+1(say we started at t). > >I don't know if I can use DEEventQueue in any way for this purpose. > >Maybe its a wrong or a repeat question! > >I have searched all group messages and couldn't find anybody with such a > >requirement. > >Can somebody help me out with this problem? > > > >- kiran > >-- > >__ > >Check out the latest SMS services @ http://www.linuxmail.org > >This allows you to send and receive SMS through your mailbox. > > > > > >Powered by Outblaze > > > > > >Posted to the ptolemy-hackers mailing list. Please send administrative > >mail for this list to: [EMAIL PROTECTED] > > > Edward A. Lee, Professor > 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 > phone: 510-642-0455, fax: 510-642-2739 > [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal > -- __ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
Re: Need to delay execution by 1 clk...
Hmm... Your problem statement is still ambiguous. If you want the delay to be a real-time delay, then you can set the synchronizeToRealTime parameter of the DEDirector. If what you need is the effect of a latch, then you want to combine the TimedDelay with the Previous actor (in the domain-specific/DE library). It's also possible that the actor you want is Sleep (in the real-time library). Edward At 06:56 PM 12/3/2003 +0500, Kiran SB wrote: Thanks for the response... TimedDelay just sends out a token after a specified delay (send (token, delay)). what I am looking at is to stop(delay) the execution by a clock and proceed. I could have used TimedDelay if I had to delay in a particular simulation. But I need to delay inside an actor and not while sending out the Token. Just somehow hold the execution for one clock. Its a flipflop kind of a device which needs to hold the data for 1 clock and then give it out to the next stage of execution. - kiran - Original Message - From: "Edward A Lee" <[EMAIL PROTECTED]> Date: Tue, 02 Dec 2003 15:23:31 -0800 To: "Kiran SB" <[EMAIL PROTECTED]> Subject: Re: Need to delay execution by 1 clk... > > Will the TimedDelay actor do what you need? > > Edward Lee > > At 04:06 PM 11/27/2003 +0500, Kiran SB wrote: > >Hi > >I am new to ptolemy (6 months). > >Currently I am using PTII 3.0.2 for building(simulating) custom actors in the > >DE domain, which are basically executional elements (of a reconfigurable > >device). > > > >In one particular situation I have an actor with 8 stages of execution. > >During initialize I construct a Execution(Data) flow graph depending on the > >selector settings in the actor. > >I traverse through the graph and execute each stage in it during fire. > >Now at one stage I need to create a delay of 1 clock. > >The executional unit needs to sleep for a clock and proceed to the next stage. > >Basically I need to forward time by a clock. > >setCurrentTime (currentTime+1) might not be a good idea as it might cause > >problems to the token's timestamp. > >What is to be achieved is that the currentTime after this stage should be > >t+1(say we started at t). > >I don't know if I can use DEEventQueue in any way for this purpose. > >Maybe its a wrong or a repeat question! > >I have searched all group messages and couldn't find anybody with such a > >requirement. > >Can somebody help me out with this problem? > > > >- kiran > >-- > >__ > >Check out the latest SMS services @ http://www.linuxmail.org > >This allows you to send and receive SMS through your mailbox. > > > > > >Powered by Outblaze > > > >--- - > >Posted to the ptolemy-hackers mailing list. Please send administrative > >mail for this list to: [EMAIL PROTECTED] > > > Edward A. Lee, Professor > 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 > phone: 510-642-0455, fax: 510-642-2739 > [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal > -- __ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2739 [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
Re: Need to delay execution by 1 clk...
Hi Kiran and all, If this actor is constructed as one atomic-actor that models the eight stages of execution, I would suggest that you re-build it as a composite actor from eight diffent atmoic-actors (your own models and/or from library actors).Each atomic actor in this model would be corresponding to one of the eight stages of execution. Pipeline your actors; in other words output of (actor1/stage 1) is connected to input of (actor2/stage2);meanwhile all eight are synchronous;i.e connected to the same main clock. The DE director reacts to each positive edge as an event. The running(execution) of the overall composite actor is a sequene of events corresponding to each positive edge of the clock. In this criteria, Consider two consecutive actors (one delivering to the next) in (execution graph) ; at the positive edge both of them are Fired such that at this instance(event) T ; (actorX) delivers its output at time (T-1)to (actorX+1) and it produces simultaneously an output that to be delivered to (actorX+1)in the next firing event(next positive edge)at time (T+1).In other words the output token of actorX is reserved (not changing) in the gap between two consecutive events. for example : assume actorX output at T-1 = m actorX output at T = n (ActorX reserves-stores(flipflop) a value =m for one clock cycle) Then actor X+1 processes an input = m at time T actor X+1 processes an input = n at time T+1 Conclusion , if I understand your exact problem , this method could do your job without a delay actor in between actorX and actor X+1. Otherwise, insertion of a Timedelay with delay parameter of 1 could help. I hope that this would be helpful ... let me know about results. THANKS for your time and interest Best Regards, Mohamed A.Salem On Thu, 2003-11-27 at 13:06, Kiran SB wrote: > Hi > I am new to ptolemy (6 months). > Currently I am using PTII 3.0.2 for building(simulating) custom actors in the > DE domain, which are basically executional elements (of a reconfigurable > device). > > In one particular situation I have an actor with 8 stages of execution. > During initialize I construct a Execution(Data) flow graph depending on the > selector settings in the actor. > I traverse through the graph and execute each stage in it during fire. > Now at one stage I need to create a delay of 1 clock. > The executional unit needs to sleep for a clock and proceed to the next stage. > Basically I need to forward time by a clock. > setCurrentTime (currentTime+1) might not be a good idea as it might cause > problems to the token's timestamp. > What is to be achieved is that the currentTime after this stage should be > t+1(say we started at t). > I don't know if I can use DEEventQueue in any way for this purpose. > Maybe its a wrong or a repeat question! > I have searched all group messages and couldn't find anybody with such a > requirement. > Can somebody help me out with this problem? > > - kiran Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
Re: Need to delay execution by 1 clk...
Hi Mohamed Salem, I think this would be a nice way to look at it. It never struck to me! I can always split this actor into 8 different atomic actors and put them into a composite actor. May be this can solve the matter (My project release is due this month end!!). Anyway thanks a lot for the suggestion, I will try it and let you know. Thanks kiran - Original Message - From: Mohamed Salem <[EMAIL PROTECTED]> Date: 04 Dec 2003 16:12:55 +0200 To: Kiran SB <[EMAIL PROTECTED]> Subject: Re: Need to delay execution by 1 clk... > Hi Kiran and all, > > If this actor is constructed as one atomic-actor that models the eight > stages of execution, I would suggest that you re-build it as a composite > actor from eight diffent atmoic-actors (your own models and/or from > library actors).Each atomic actor in this model would be corresponding > to one of the eight stages of execution. > > Pipeline your actors; in other words output of (actor1/stage 1) is > connected to input of (actor2/stage2);meanwhile all eight are > synchronous;i.e connected to the same main clock. > > The DE director reacts to each positive edge as an event. The > running(execution) of the overall composite actor is a sequene of events > corresponding to each positive edge of the clock. > > In this criteria, Consider two consecutive actors (one delivering to > the next) in (execution graph) ; at the positive edge both of them are > Fired such that at this instance(event) T ; (actorX) delivers its output > at time (T-1)to (actorX+1) and it produces simultaneously an output that > to be delivered to (actorX+1)in the next firing event(next positive > edge)at time (T+1).In other words the output token of actorX is reserved > (not changing) in the gap between two consecutive events. > > for example : > assume > actorX output at T-1 = m > actorX output at T = n > > (ActorX reserves-stores(flipflop) a value =m for one clock cycle) > > Then > > actor X+1 processes an input = m at time T > actor X+1 processes an input = n at time T+1 > > Conclusion , if I understand your exact problem , this method could > do your job without a delay actor in between actorX and actor X+1. > Otherwise, insertion of a Timedelay with delay parameter of 1 could > help. > > I hope that this would be helpful ... > let me know about results. > > THANKS for your time and interest > > Best Regards, > > Mohamed A.Salem > > > > On Thu, 2003-11-27 at 13:06, Kiran SB wrote: > > Hi > > I am new to ptolemy (6 months). > > Currently I am using PTII 3.0.2 for building(simulating) custom actors in the > > DE domain, which are basically executional elements (of a reconfigurable > > device). > > > > In one particular situation I have an actor with 8 stages of execution. > > During initialize I construct a Execution(Data) flow graph depending on the > > selector settings in the actor. > > I traverse through the graph and execute each stage in it during fire. > > Now at one stage I need to create a delay of 1 clock. > > The executional unit needs to sleep for a clock and proceed to the next stage. > > Basically I need to forward time by a clock. > > setCurrentTime (currentTime+1) might not be a good idea as it might cause > > problems to the token's timestamp. > > What is to be achieved is that the currentTime after this stage should be > > t+1(say we started at t). > > I don't know if I can use DEEventQueue in any way for this purpose. > > Maybe its a wrong or a repeat question! > > I have searched all group messages and couldn't find anybody with such a > > requirement. > > Can somebody help me out with this problem? > > > > - kiran > -- __ Check out the latest SMS services @ http://www.linuxmail.org This allows you to send and receive SMS through your mailbox. Powered by Outblaze Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]