• 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. Verilog - AMS model for powerFET

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 125
  • Views 2452
  • 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

Verilog - AMS model for powerFET

Divy
Divy over 9 years ago

To replace the spice level model with verilog ams at top level to increase the speed  .

idea here is to model powerfet  in verilog ams which should meet atleast following specs:

VDS (V) 40
RDS(on)  at VGS = 10 V 0.0063
RDS(on)  at VGS = 4.5 V 0.0075
ID (A) 58

//Verilog-AMS HDL for "FetModels_lib", "powerFET_sqj858c" "verilogams_1"

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

module powerFET_sqj858c ( D, G, S );

//==============================================================================
// Declarations (ports, parameters, variable, wires)
//==============================================================================
inout S, G, D;
electrical S, G, D;


parameter real vth = 2.0 from [0.1:10.0];
// parameter real cgs = 2.0e-9 from [1e-15:1e-6];




// variables/wires/registers
real rds;
real id, id_linear, id_sat ,rds_linear, rds_sat ;


// ===========================================================================

//==============================================================================
// Analog section
//==============================================================================

analog
begin

// when vds << vgs - vth it acts as voltage controlled resistor
//rds_sat = 50/(id_sat) ; // in sat mode the output resistance ro = 1/Id*(lamda) where lamba equals 0.02V^(-1)

//rds = V(D,S)<(V(G,S)- vth) ? rds_linear : rds_sat ;

//I(D, S) <+ V(D, S)/rds;

//I(D, S) <+ V(D, S)/rds ;

@(above(V(G,S)- vth - V(D,S),100p,50m))

begin

id = 2*2*5*( (V(G,S) - vth)*V(D,S) - 0.5*pow(V(D,S),2) ) ;

end

@(above( V(D,S) - V(G,S) + vth ,100p,50m))

begin

id = 2*2*(pow((V(G,S) - vth),2)) ; //(1+0.02*(V(D,S))) ; // drain current equation in saturation mode

end


I(D,S) <+ id ;


end
endmodule

  • Cancel
  • Divy
    Divy over 9 years ago
    Is there any other way ,as this model is very slow
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    A couple of things:

    1. You don't need to use @above to do this - just use if statements for the different regions. Using @above will try to accurately solve precisely at the transition point, whereas if the curve is continuous between the regions, this should be unnecessary (and will slow the simulation down). Of course, it goes without saying that your equations should be continuous across the regions (I didn't check the maths as this is a quick response)
    2. Your code doesn't describe what id should be before it is above either of the two conditions - and also if it drops back below either of the conditions it will retain whatever previous value of id it had. I doubt that's what  you want...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Divy
    Divy over 9 years ago
    I think if statements will also slow down the simulations as it will check at every time step of the simualtor
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Divy
    Divy over 9 years ago
    Just for information i am doing parametric analysis over this model (varying both vgs and vds). I tried with this method.analog

    begin


    if (V(G,S) < vth)
    begin

    rds = 1G ;
    end

    else if (V(G,S) > vth && (V(D,S) < V(G,S) - vth ) )

    begin

    rds = 0.06/(V(G,S) - vth - V(D,S)*0.5 ) ;
    end

    else if (V(G,S) > vth && (V(D,S) > V(G,S) - vth ) )

    begin
    //id = (pow((V(G,S) - vth),2)) ;
    rds = 50/58 ;
    end

    I(D, S) <+ V(D, S)/rds ;


    end
    endmodule
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Divy said:
    I think if statements will also slow down the simulations as it will check at every time step of the simualtor

    No. It's going to evaluate the code at every timestep anyway. The @above would have forced the tilmestep of the simulator, whereas if would not.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Divy
    Divy over 9 years ago

    thanks andrew for the input . I will update on this after trying what you suggested

    Regards,
    Divy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Divy
    Divy over 9 years ago

    So if(V(G,S) > vth ) will be faster in comparison to @above(V(G,S) - vth ) .Correct me if my understanding is wrong

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago
    I would expect so.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Divy
    Divy over 9 years ago

    Hi Andrew,

    I tried to use if instead of above as suggested ,there is a difference i agree  but not much.

    In my model i observe there are sharp edges or discontinuity in curve.which can be a one reason for slowness .

    Any idea how to smooth the curve??? (any function which you can recommend)

    I tried tanh but its not solving my problem .still i see sharp edges 

    I am doing parametric anlaysis (just FYI)

    Regards

    Divy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Divy,

    If there are discontinuities in your model, then the right thing to do is to correct the equations so they aren't discontinuous - clearly the device itself doesn't exhibit discontinuous behaviour, so your regions should really join. I can't suggest smoothing options that will magically fix incorrect modelling! Using things like tanh smoothing are a good idea to ensure that the derivative is smooth between the regions, but you really need to get your basic model correct first!

    Kind Regards,

    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