• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Using variables within range repetition expression in e

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 13221
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using variables within range repetition expression in e

myonlyscreen
myonlyscreen over 11 years ago

 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.

 

  • Cancel
  • hannes
    hannes over 11 years ago

    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 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • myonlyscreen
    myonlyscreen over 11 years ago

     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.   

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information