• 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. Mixed-Signal Design
  3. Is it possible to netlist a cross event in Verilog-A?

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 66
  • Views 7287
  • 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

Is it possible to netlist a cross event in Verilog-A?

twix232
twix232 over 2 years ago

I'm trying to implement a prescaler block in verilog-a. The block should trigger a certain behavior when both signal1 and signal2 have rising edges.

// when a signal1 is in rising edge
@(cross(signal1 , 1)) begin

    // check also when signal 2 is in rising edge
    // but this checking should be second in priority
    // which means when signal1 is in rising edge
    // go check if signal 2 is in rising edge

    @(cross(signal2 , 1)) begin
        do something
    end
end

I have been searching for ways to create netlist-like events to achieve this functionality in Verilog-A, but I couldn't find any similar examples. Can you provide guidance on how to approach this situation and implement the desired behavior?

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 2 years ago

    Dear twix232,

    twix232 said:
    I'm trying to implement a prescaler block in verilog-a. The block should trigger a certain behavior when both signal1 and signal2 have rising edges.

    I think you basically need to set a flag when signal1 undergoes a rising edge and then use the flag in the cross statement for signal2. The cross event syntax includes an "enable" input. When the value of "enable" is non-zero, the cross expression is evaluated. However, if it is zero, it is not evaluated. Hence, if you set your flag to zero and then to, say, 1 when signal1 undergoes a rising edge, the cross event for signal2 will only be evaluated after signal1 undergoes a rising edge. Of course, if you have more than one rising edges of signal1 in your simulation time and want to detect a second signal2 edge, you will need to reset the flag to 0 after the cross event for signal2 occurs.

    An example may be found at URL:

    https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V000009MpctUAC&pageName=ArticleContent

    I hope this helps twix232.

    Shawn

    • Cancel
    • Vote Up +2 Vote Down
    • Cancel
  • twix232
    twix232 over 2 years ago in reply to ShawnLogan

    Helpful answer thank you

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to twix232

    Dear twix232,

    Great! Thank you for letting us know you made some progress!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to twix232

    Dear twix232,

    Great! Thank you for letting us know you made some progress!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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