I agree with Dmitry, the formal argument should not include the sequence "signature". There is one problem in the example below. The LRM says:"To access a local variable of a subsequence, a local variable must be declared and passed to the instantiated subsequence through an argument" We should define that in the example below, lvar is passed to S1, and not to S2. I don't think that it is well defined. Korchemny, Dmitry wrote: > I think that the syntax should be: > > > > sequence S1 (lv_arg, a, b, c) ; > > a ##2 (b, lv_arg=din) ##2 c; > > endsequence > > > > sequence S2 (sequence Sarg); > > Sarg or (rdy ##2 ack); > > endsequence > > > > sequence S4 ; > > integer lvar; > > S2 (S1(lvar, as, xack, xdone)); > > endsequence > > > > It should work for the substitution semantics. We should make sure > that everything works with recursive properties though. > > > > Dmitry > > > > ------------------------------------------------------------------------ > > *From:* owner-sv-ac@server.eda.org [mailto:owner-sv-ac@server.eda.org] > *On Behalf Of *Faisal Haque (fhaque) > *Sent:* Tuesday, October 03, 2006 7:55 PM > *To:* sv-ac@server.eda.org > *Subject:* [sv-ac] Passing sequence as a formal arg to another sequence > > > > lets take an example: > > > > sequence S1 (lv_arg, a, b, c) ; > > a ##2 (b, lv_arg=din) ##2 c; > > endsequence > > > > sequence S2 (sequence Sarg (lv_arg, a, b, c) ); > > Sarg (**what do you use here**) or (rdy ##2 ack); > > endsequence > > > > sequence S4 ; > > integer lvar; > > S2 (S1(lvar, as, xack, xdone)); > > endsequence > > Two issues: > > > > 1) S1 is being passed a local variable that it assigns which flows out > of S1. Since local variables are declared inside sequences how do we > pass local variables into the sequence declaration for S2 which is > using sequence Sarg since we cannot pass any actual values until we > instantiate S2 in sequence S4 > > > > 2) Does lv_arg flow out of Sarg into S2 and then into lvar in S4? > > > > -Faisal >Received on Tue Oct 10 07:55:11 2006
This archive was generated by hypermail 2.1.8 : Tue Oct 10 2006 - 07:55:30 PDT