• 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. "ERROR: attempt to access a quantity that depends on the...

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 126
  • Views 5280
  • 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

"ERROR: attempt to access a quantity that depends on the time derivative" in Verilog-A

rhanna
rhanna over 4 years ago


Hi,

I'm new to verilogA and trying to compile a module including the following nested loop in an analog process:

for(k=0; k<5; k=k+1) begin
     for(j=0; j<25; j=j+1) begin
          I(x_node[k])<+ V(x_node[k]) + (1-alpha)* h*ddt(V(x_node[k])) - tanh(mul_Vin_w_Vin + mul_c_w_Vin + w_rec[j]*(V(x_node[k]) - alpha* h*ddt(V(x_node[k]))) + b_node[k]);
          V(Vout)<+ w_Vout[k] * V(x_node[k]) + b_Vout;
     end
end

where: 
=====
k, j are genvars.
x_node is a vector of internal nodes.
h, mul_Vin_w_Vin, mul_c_w_Vin, alpha, b_Vout are assumed to be constants.
w_rec, b_node, w_Vout are parameter vectors.
Vout is an output port.


I'm trying to force the current branched from these nodes to 0 and use the simulator to solve for V(x_node[k]).

I had this error at the bolded line:

Error: Encountered an attempt to access a quantity that depends on the time derivative. The software allows only symbolic use of such quantities. Either remove the need to access this quantity or create an internal node, assign the voltage of the internal node to this quantity, and access the voltage of the internal node.

I couldn't fully understand what's the problem with using "ddt()" in the expression, Can you please explain a bit more about the problem and the suggested solution? 

Thanks in advance,
Ramy

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to rhanna

    Hi Ramy,

    In general you should not need to try to control the timestep within a Verilog-A model - the simulator will do that automatically to ensure the specified simulator accuracy tolerances are met. However, it's possible that you're trying to model some kind of discrete sampled-data system (I've not even tried to spend time looking at the details of what you're actually modelling), but if so you might need to set up some kind of timer/clocking scheme to ensure that this sampled-data behaviour is operating.

    The point I had made about scaling the values appropriately is that by using a contribution operator (<+) to contribute the derivative to an internal node (which is marked as electrical), you're then creating an equation that needs to be solved as if it were a voltage (if using V(); it would be a current if you used I()). Given that a Verilog A discipline has two quantities (electrical has the Voltage and Current quantities), and each quantity has controls on the absolute value used in the tolerance criteria used in many places in the numerical algorithms - all of the form:

    delta < reltol*value+abstol

    The abstol is set differently for each quantity, and is usually set to a millionth of a typical signal value (so vabstol is 1uV, and iabstol is 1pA by default). What this means is that you want the values on these internal nodes to be at similar "voltage" levels to other signals in the circuit - i.e. of the order of 1V.

    So I was suggesting you scale the value as part of the contribution statement, given that you can then unscale it when it's used in a subsequent equation. This will keep the algorithms happier, and less likely to introduce errors.

    However, that may not be the root cause of your convergence difficulties - you might be advised to contact customer support so that somebody can look at your real example with coefficients and circuit and analysis setup rather than just the model (or simplified versions of the model). Even if you were to post that all here, I don't realistically have the time to check it and respond (I answer here in my spare time as it's not part of my role at Cadence).

    Anyway, hope that helps!

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • rhanna
    rhanna over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks a lot for the detailed explanation.

    So scaling a value could be as an example: V(c)<+ scaling_factor * ddt(V(in)); //c is an internal node

    So that any update (delta) should meet the criterion you mentioned above and V(c) converge in the end to a value in the allowed range.

    Then wherever V(c) is used, it should be in the form: (1/scaling_factor) * V(c)

    Did I get your point correctly?

    Regards,

    Ramy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to rhanna

    Yes, you got my point correctly. 

    Andrew

    • 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