• 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. Clocking blocks /cycle based sampling and driving

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 64
  • Views 14404
  • 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

Clocking blocks /cycle based sampling and driving

hipooja
hipooja over 15 years ago

Hi,

I read that clocking block / cycle based simulation in SV promotes reusability.Why is that so? I understand that interface definition simplifies the signal connection  How does this promote reusability?

Regards,

Pooja Vaishnav.

  • Cancel
  • hipooja
    hipooja over 15 years ago

    I also read that clocking blocks seperate signal functionality and timing and help avoid user induced races.The latter point i understand is because clocking blocks samples the signal x time before the sampling event and holds the signal y time after the sampling event ,which avoids metastability and hence X's,the former point is however unclear.

     

    Regards,

    Pooja Vaishnav

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Vinayhonnavara
    Vinayhonnavara over 15 years ago

     Hello Pooja,

     Assume that you are working on developing new features for an existing project. If you have a central location where you have bundled up the wires and signals, you can simply add more signals without adding new port connections for each of the module accessing it. Also you will be driving just interface signals or sampling them. This promotes re-usabililty as you are just concerned with adding signals in the interface and in driving or sampling in your respective blocks.

    For your second part of the question "clocking blocks seperate signal functionality",  clocking blocks are mainly used by testbenches. If your testbench was in verilog then you would be working in the same timing region and there would be some inherent race conditions. However since clocking blocks are mainly used in testbench in SV which is in a different timing region, you would minimize the race conditions. Thus you need to seperate Signal functionality (active, observed and postpone ) from the reactive region in testbench. This is the essence of seperating timing regions for signal functionality

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • hipooja
    hipooja over 15 years ago

    I figured out that modports are the first step to reusability ,suppose there is a master and slave wherein only the direction of signal is different,then all you need to do is bunch the signals and define directions in modport and pass the modport to the constructor of the master and slave module,hence it spares the effort of defining the signals again in each module ,their direction and connections.This promotes reusability because as you said ,if signals change all you need to do is edit the interface,the same testbench code can be used incase only the signals have changed.If I2C interface is used connecting host to TX chip and the RX chip ,all you need is to define a single I2C interface and plug it to the TX,RX and host.

     

    Secondly i learnt that clocking blocks seperate signal timing as the interface where they are defined ,contain the typical sample-hold time of the signal,thus the coder does not need to worry about this /clocking event ,all he /she needs to do is focus on the functionality.

     

    Regards,

    Pooja

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Vinayhonnavara
    Vinayhonnavara over 15 years ago

     Rightly put :)

    • 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