Home > Community > Forums > Functional Verification > Using variables within range repetition expression in e

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Using variables within range repetition expression in e  

Last post Thu, Dec 26 2013 5:37 AM by myonlyscreen. 2 replies.
Started by myonlyscreen 17 Dec 2013 04:14 AM. Topic has 2 replies and 4748 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, Dec 17 2013 4:14 AM

    Using variables within range repetition expression in e Reply

     Hi.

    I am facing some problems with using var in  range repetition expression.

    I have the next code :

    a : unit;

    b : uint;

    keep b == a + 1234;

    event e1;

    event e2;

    expect {@e1;[a]*@clk} => @e2 ; //  <== this works !

     expect {@e1;[a..b]*@clk} => @e2 ; //  <== this doesn't work !

    I am geting the next error : 

     *** Error: first match variable repeat can only be used inside a sequence

    Why ? does cadence supports such usage of the range repetition expresion ?

    How do you recomend to workaround this problem ? (well beside the obivuos solution to replace it with TCM).

    Regards,

    E.M.

     

    • Post Points: 20
  • Thu, Dec 19 2013 3:51 AM

    • hannes
    • Top 150 Contributor
    • Joined on Fri, Nov 14 2008
    • Bracknell, Berkshire
    • Posts 50
    • Points 895
    Re: Using variables within range repetition expression in e Reply

    Hi,

    if you have a first match variable repeat ([a..b]*TE) it needs to be followed by something else (some successor event), e.g:
    expect {@e1; [a..b]*@clk; <some-other-temporal-exp>} => @e2;

    Btw. [a..b]*@clk succeeds (first match) at [a]*@clk, so the first expect and the second expect you wrote are the same.
    Maybe you wanted to express something else? There is also a true match repeat (~[..]*TE).

    Regards,
    -hannes 

    • Post Points: 20
  • Thu, Dec 26 2013 5:37 AM

    Re: Using variables within range repetition expression in e Reply

     Hi,

    Thanks, for clarifying this issue.

    It does make a lot of sense to add another TE after the range repetition, in-order to avoid getting match on [a]*clk .

    Thanks again,

    E.M.   

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by myonlyscreen at 17 Dec 2013 04:14 AM. Topic has 2 replies.