• 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 in sub-range ADC simulation.

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 124
  • Views 15197
  • 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 in sub-range ADC simulation.

archive
archive over 18 years ago

Hello.
I am trying to simulate a 3bit ADC which incorporates sub ranging. Im using a swictched capacitor implementation of the circuit . There are 7 comparators used. these comparators are then used to select a given output of a DAC which is in actuality a thermometer code based DAC.
The circuit schematic looks like the one in my attachment.

When i try to simulate that, cadence flashes an error saying that
"Only one connection to the following 7 nodes:"
"The following branches form a loop of rigid branches (shorts) when added to the circuit:"

Why is such an error flashed? In the case of my schematic, i do actually want a connection from those 7 nodes into the negative terminal of the op-amp.
And what can be done to get rid of those errors and at the same time get that schematic implemented?

Im including a gzipped version of the relevant lib. Please do have a look if that would help you understand the error better

Best Regards,
Aijaz


Originally posted in cdnusers.org by aijazbaig1
work.tar.gz
  • Cancel
Parents
  • archive
    archive over 18 years ago

    Thanks a lot for the tip andrew.
    Now that I have got the switch fixed, it does compiles properly. However, as in the case of most switched cap circuits, im having a lot of trouble with getting the circuit to converge.
    I have replaced the switch with a model which does have a finite ON resistance and a big OFF resistance. Heres what the code looks like:
    [code]
    // $Date: 1996/10/02 00:44:13 $
    // $Revision: 1.10 $
    //
    //
    //The sample SpectreHDL library is unsupported and subject to change
    //without notice. Future versions of SpectreHDL may not be compatible
    //with this library.
     
    //--------------------
    // sw
    //
    // -  switch
    //
    // vp,vn:        output terminals [V,A]
    // vctrlp,vctrln:     control terminals [V,A]
    //
    // INSTANCE parameters
    //    vth = threshold voltage [V]
    //
    // MODEL parameters
    //    {none}
    //
    // If ('vctrlp' - 'vctrln' > 'vth') then the branch between 'vp' and 'vn'
    // is shorted. Otherwise the branch between 'vp' and 'vn' is opened
    //

    module sw(vp, vn, vctrlp, vctrln) (vth)
    node [V,I] vp, vn, vctrlp, vctrln;
    parameter real vth;
    {
       enum {OPEN, CLOSED} sw_state;
       real Ron = 10;
       real Roff = 100M;
       
       analog {
          sw_state = (V(vctrlp,vctrln) > vth) ? CLOSED: OPEN;
        
          if ($threshold(V(vctrlp, vctrln) - vth, 1)){
    //      if ($threshold(V(vctrlp, vctrln) - vth, 1, $abstol("V"), 1.0)){
               sw_state = CLOSED;
          }

          if ($threshold(V(vctrlp, vctrln) - vth, -1)){
    //      if ($threshold(V(vctrlp, vctrln) - vth, -1, $abstol("V"), 1.0)){
               sw_state = OPEN;
          }

          if (sw_state == OPEN){
               V(vp,vn) <- Roff*I(vp,vn);
          }
          else{
               V(vp,vn) <- Ron*I(vp,vn);
          }
       }
    }
    [/code]
    As u can see, i modified the code of the sw from the ahdl library. Now (supposedly) it does always have a resistance between the two terminals.

    Nonetheless, I am facing convergence problems at some of the nodes and no matter what I try the warning doesn't seem to go.

    Heres the schematic
    And the simulation stops just after 1.25ns and it complains that the voltage/current changes at some nodes is just too much to take care of.
    As suggested in some of the places and app notes, i have tried attaching a LPF kind of a structure in the hope that it may prevent a sudden change in the voltage level. I tried adding big resistors from floating nodes to ground which took care of the problem of floating nodes.
    However, I do not understand how to prevent this sudden voltage change. will changing the value of ABSTOL or RELTOL make a difference. If yes then how do I do it?

    Additionally, is there anything in the circuit topology which causes it besides the obvious fact that many nodes are getting connected to a single node in the netlist. The only reasonable way I could think of to solve this was to insert nominal resistances in the path so as to prevent a short between these nodes in the schematic.

    As before id include the gzipped version of the relevant library. Please do have a look so you may find some factors which I may have overlooked.

    Best Regards,
    Aijaz


    Originally posted in cdnusers.org by aijazbaig1
    • ADC_TB.jpg
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 18 years ago

    Thanks a lot for the tip andrew.
    Now that I have got the switch fixed, it does compiles properly. However, as in the case of most switched cap circuits, im having a lot of trouble with getting the circuit to converge.
    I have replaced the switch with a model which does have a finite ON resistance and a big OFF resistance. Heres what the code looks like:
    [code]
    // $Date: 1996/10/02 00:44:13 $
    // $Revision: 1.10 $
    //
    //
    //The sample SpectreHDL library is unsupported and subject to change
    //without notice. Future versions of SpectreHDL may not be compatible
    //with this library.
     
    //--------------------
    // sw
    //
    // -  switch
    //
    // vp,vn:        output terminals [V,A]
    // vctrlp,vctrln:     control terminals [V,A]
    //
    // INSTANCE parameters
    //    vth = threshold voltage [V]
    //
    // MODEL parameters
    //    {none}
    //
    // If ('vctrlp' - 'vctrln' > 'vth') then the branch between 'vp' and 'vn'
    // is shorted. Otherwise the branch between 'vp' and 'vn' is opened
    //

    module sw(vp, vn, vctrlp, vctrln) (vth)
    node [V,I] vp, vn, vctrlp, vctrln;
    parameter real vth;
    {
       enum {OPEN, CLOSED} sw_state;
       real Ron = 10;
       real Roff = 100M;
       
       analog {
          sw_state = (V(vctrlp,vctrln) > vth) ? CLOSED: OPEN;
        
          if ($threshold(V(vctrlp, vctrln) - vth, 1)){
    //      if ($threshold(V(vctrlp, vctrln) - vth, 1, $abstol("V"), 1.0)){
               sw_state = CLOSED;
          }

          if ($threshold(V(vctrlp, vctrln) - vth, -1)){
    //      if ($threshold(V(vctrlp, vctrln) - vth, -1, $abstol("V"), 1.0)){
               sw_state = OPEN;
          }

          if (sw_state == OPEN){
               V(vp,vn) <- Roff*I(vp,vn);
          }
          else{
               V(vp,vn) <- Ron*I(vp,vn);
          }
       }
    }
    [/code]
    As u can see, i modified the code of the sw from the ahdl library. Now (supposedly) it does always have a resistance between the two terminals.

    Nonetheless, I am facing convergence problems at some of the nodes and no matter what I try the warning doesn't seem to go.

    Heres the schematic
    And the simulation stops just after 1.25ns and it complains that the voltage/current changes at some nodes is just too much to take care of.
    As suggested in some of the places and app notes, i have tried attaching a LPF kind of a structure in the hope that it may prevent a sudden change in the voltage level. I tried adding big resistors from floating nodes to ground which took care of the problem of floating nodes.
    However, I do not understand how to prevent this sudden voltage change. will changing the value of ABSTOL or RELTOL make a difference. If yes then how do I do it?

    Additionally, is there anything in the circuit topology which causes it besides the obvious fact that many nodes are getting connected to a single node in the netlist. The only reasonable way I could think of to solve this was to insert nominal resistances in the path so as to prevent a short between these nodes in the schematic.

    As before id include the gzipped version of the relevant library. Please do have a look so you may find some factors which I may have overlooked.

    Best Regards,
    Aijaz


    Originally posted in cdnusers.org by aijazbaig1
    • ADC_TB.jpg
    • View
    • Hide
    • 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