• 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. Custom IC Design
  3. How can I take a real value and assign it to a node in this...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 4110
  • 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

How can I take a real value and assign it to a node in this case the output port of my module

Wasif Absar
Wasif Absar over 1 year ago

In the module below there is an error that says I cannot assign a real value to a node. How can I solve the issue? 


module VA_measureDelay(INPUT_CLOCK,OUTPUT_CLOCK,TIME_DELAY);
input INPUT_CLOCK;
input OUTPUT_CLOCK;
output TIME_DELAY;

electrical INPUT_CLOCK, OUTPUT_CLOCK, TIME_DELAY;

parameter real vdd = 830m;

real time_INPUT_CLOCK, time_OUTPUT_CLOCK;


analog begin

@(cross( V(INPUT_CLOCK)-vdd/2, 1)) begin
time_INPUT_CLOCK = $abstime();
end

@(cross( V(OUTPUT_CLOCK)-vdd/2, 1)) begin
time_OUTPUT_CLOCK = $abstime();
end

TIME_DELAY = time_OUTPUT_CLOCK - time_INPUT_CLOCK;


end

endmodule

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    To update a node (an electrical node in this case) you need to use a contribution statement such as:

    V(TIME_DELAY) <+ time_OUTPUT_CLOCK - time_INPUT_CLOCK;

    However, you shouldn't do that directly because it would then be discontinuous (and discontinuities are bad for a circuit simulator). So instead something like:

    V(TIME_DELAY) <+ transition(time_OUTPUT_CLOCK - time_INPUT_CLOCK,10p,10p); set an appropriate delay and rise time for the changing signal

    Another issue that you would need to deal with is that if you are using voltages to represent time, the resulting voltages may be very small (I don't know what timescales you are dealing with here) and lower than the normal tolerance settings for voltages. Two approaches to this are either to use a different discipline than electrical for outputting time (you could create your own discipline with an appropriate abstol) or just scale the times to be within normal voltage ranges for the simulator.

    Alternatively, if this is for monitoring purposes, you could keep it as a real number and then use saveahdlvars or use the Op parameter saving capability in ADE to save the specific variables you want which would allow you to plot them anyway - they then end up just being numbers rather than electrical signals.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Wasif Absar
    Wasif Absar over 1 year ago in reply to Andrew Beckett

    Thank you Andrew Slight smile

    • 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