• 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 SKILL
  3. Veriloga Convergence Issues with DFF

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 11182
  • 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

Veriloga Convergence Issues with DFF

greywanderer
greywanderer over 3 years ago

I am using the code below for a d-flip-flop. Its basically copied from designersguide.com and modified. It seems that there are convergence issues depending on whether V(qb,gnd) is defined or not. Could you guys please provide some guidance on what might be happening here?

Thanks!

`include "constants.vams"
`include "disciplines.vams"

// d flip flop with reset (reset is active high) and parameterizable initial state
module dff2 (clk, d, reset, q, qb, gnd);

input clk, d, reset; output q, qb; inout gnd;
voltage clk, d, reset, q, qb, gnd;
parameter real v0=0;
parameter real v1=1 from (v0:inf);
parameter integer dir=1 from [-1:1] exclude 0;
parameter real td=0 from [0:inf);
parameter real tt=0 from [0:inf);
parameter integer init_state=0 from [0:1];
integer actNow, out, state;
real thresh;

analog begin
    thresh = (v0+v1)/2;
    actNow = 0;
    @(initial_step or cross(V(clk,gnd) - thresh, dir)) begin
        actNow = 1;
    end
    out = idt(0, V(d,gnd)>thresh, actNow);
    V(q,gnd) <+ transition(out ? v1 : v0, td, tt);
    V(qb,gnd) <+ v0 + v1 - V(q,gnd);
end
endmodule

"Error Report"

**************************************************************
Periodic Steady-State Analysis `pss': estimated fund = 650 MHz
**************************************************************
Trying `homotopy = gmin'.
Trying `homotopy = source'.
Trying `homotopy = dptran'..
Trying `homotopy = ptran'..
Trying `homotopy = arclength'.
None of the instantiated devices support arclength homotopy. Skipping.

Error found by spectre during DC analysis, during periodic steady state analysis `pss'.
ERROR (SPECTRE-16080): No DC solution found (no convergence).

The values for those nodes that did not converge on the last Newton iteration are given below. The manner in which the convergence criteria were not satisfied is also given.
Failed test: | Value | > RelTol*Ref + AbsTol

Top 10 Solution too large Convergence failure:
V(u65:idt0) = 0 V
update too large: | -1 V | > 0 V + 1 uV
Top 10 Residue too large Convergence failure:
V(u65:idt0) = 0 V
residue too large: | -1 V | > 5 mV + 1 uV

"

  • Cancel
Parents
  • greywanderer
    greywanderer over 3 years ago

    td, tt have been set to 10ps.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to greywanderer

    Not enough to go on - a simple instantiation of the flip flop works, so it probably depends on how the flip flop is connected up. For example:

    //

    I1 (clk d reset q qb 0) dff2 td=10p tt=10p

    V1 (d 0) vsource dc=1
    V2 (reset 0) vsource dc=0
    Vclk (clk 0) vsource type=pulse val0=0 val1=1 rise=1p period=10n width=5n

    ahdl_include "forum152.va"
    pss pss fund=100M

    converges with no problem (at least in SPECTRE21.1 ISR10).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • greywanderer
    greywanderer over 3 years ago in reply to Andrew Beckett

    The flip flop is connected to act as a divide by 2

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • greywanderer
    greywanderer over 3 years ago in reply to greywanderer

    To debug this issue, the model was simplified to remove the change in "actNow" at initial_step. The model seems to be having issues with the "-ive" sign on the definition of V(qb,gnd).

    The question that I am stuck on is what is definition of the model at DC?
    - "cross" should be ignored which means that actNow is 0.
    - does this mean that "out" = 0 too, since actNow is 0 and idt is reset. how does idt behave under DC analysis?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • greywanderer
    greywanderer over 3 years ago in reply to greywanderer

    To debug this issue, the model was simplified to remove the change in "actNow" at initial_step. The model seems to be having issues with the "-ive" sign on the definition of V(qb,gnd).

    The question that I am stuck on is what is definition of the model at DC?
    - "cross" should be ignored which means that actNow is 0.
    - does this mean that "out" = 0 too, since actNow is 0 and idt is reset. how does idt behave under DC analysis?

    • 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