The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> DC sweep failed for Initial block
https://designers-guide.org/forum/YaBB.pl?num=1291466814

Message started by ywguo on Dec 4th, 2010, 4:46am

Title: DC sweep failed for Initial block
Post by ywguo on Dec 4th, 2010, 4:46am

Hi Guys,

I am wondering what a spectre simulator do for a "initial_step" block. For eg., I have an initial_step block as below. It is used to measure a PTAT voltage. An integer variable named dat is a digitized number for the input voltage, which is the PTAT voltage. Then I run a dc analysis in ADE-L, sweeping temperature from -40 to 125C. However, the dat is always equal to the number corresponding to -40C. In results browser, I check the dcOp-dc result, it varies if I change the number in Setup --> Temperature.... What's the difference between dcOp-dc and dc-dc for the Initial_step block?


Code:
  analog begin

     @ ( initial_step ) begin
         halfref = vref / 2;
        unconverted = V(vin);
           dat = 0;
        for (i = (`NUM_ADC_BITS-1); i >= 0 ; i = i - 1) begin
           if (unconverted > halfref) begin
              dat = dat + pow(2,i);
              unconverted = unconverted - halfref;
           end else begin    
              dat = dat;
           end
           unconverted = unconverted * 2;
        end
     end


Best Regards,
Yawei

Title: Re: DC sweep failed for Initial block
Post by Geoffrey_Coram on Dec 6th, 2010, 11:57am

I believe the Verilog-AMS LRM specifies what happens with initial_step, and that it's only the first point of a dc sweep.

Perhaps what you want is if(analysis("static")) ?

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.