The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 19th, 2024, 6:30am
Pages: 1
Send Topic Print
DC sweep failed for Initial block (Read 1633 times)
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
DC sweep failed for Initial block
Dec 04th, 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
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: DC sweep failed for Initial block
Reply #1 - 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")) ?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.