• 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. What's the definition and the function of value()

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 65
  • Views 1683
  • 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

What's the definition and the function of value()

TaoZ
TaoZ over 6 years ago

Hi, all

I'm new to specman E, and begin learning it by reading Design Verification with E. I've many times the utilization of function value, such as:

keep tx_monitor.file_logger.to_file == value(tx_log_filename);

keep tx_bfm.driver == value(tx_driver);

Could anyone explain me about the utilization of value().

Many thanks!

Tao

  • Cancel
  • hannes
    hannes over 6 years ago

    When 2 variables are linked by a constraint, they are in a bidirectional relationship. E.g keep a>b links a and b, so b needs to be bigger than a and a smaller than b.
    Sometimes you don't want a bidirectional relationship, e.g. keep a = crc_function(data). So here a and data are in a unit-directional relationship. Data needs to be generated
    before a, and then the function is called and the result assigned to a.

    value() is just a function call returning the value. But for the generator, it also create a unidirectional relationship. To assign pointers in a testbench, the use of value() (or read_only()) is recommended. Generally testbench containers (units) are created in a specific order, and there are no bidirectional relationships. And to assign a pointer to something that already exists, just use value() or read_only()

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • TaoZ
    TaoZ over 6 years ago in reply to hannes

    Hi, Hannes

    Thanks for your reply, which make me have a better understanding of value().

    Nice Weekends!

    Tao

    • 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