The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jun 19th, 2019, 10:29pm
Pages: 1
Send Topic Print
How to Implement Time Dependent Noise (Read 6490 times)
jjrael
New Member
*
Offline



Posts: 8

How to Implement Time Dependent Noise
Jul 08th, 2003, 9:12am
 
I am having problems implementing/simulating time dependent noise in Cadence.

I want a block that injects noise only when it is on. The code I have is:


  analog begin
     vin = V(vinp, vinn);
     id = gm * (vin - vth);
     W  = 1;
     if (vin < vth) begin
      id = 0;
      W  = 0;
     end
     I(voutp,voutn) <+ id + W*white_noise( 4 * `P_K * $temperature * gamma * gm, "source1") ;
  end

I have tried coding this various ways but I always get the same error:'

Error found by spectre during AHDL read-in.
   file: /xxx/veriloga.va. Non-recoverable
       error: Use of small signal sources in expressions is not supported.
   Exiting SpectreHDL compilation.

Any ideas?

jr
Back to top
 
 
View Profile   IP Logged
jjrael
New Member
*
Offline



Posts: 8

Re: How to Implement Time Dependent Noise
Reply #1 - Jul 8th, 2003, 11:06am
 
Never mind, I got it:

I(voutp,voutn) <+ id + white_noise( W * 4 * `P_K * $temperature * gamma * gm, "source1") ;

I should have put the "W" inside!!

jr
Back to top
 
 
View Profile   IP Logged
jjrael
New Member
*
Offline



Posts: 8

Re: How to Implement Time Dependent Noise
Reply #2 - Jul 8th, 2003, 11:08am
 
Opps,

I was wrong, moving W inside solves the error but it does not output ANY noise.

jr
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: How to Implement Time Dependent Noise
Reply #3 - Jul 8th, 2003, 2:25pm
 
white_noise() is small signal source which is valid for only noise, sp-ana.

Noise in transient simulations can be added as pseudo-random voltages
and currents at each timepoint.
Generally the noise should have a Gaussian amplitude distribution.
So you have to use $rdist_normal() instead.
Here you have to approximate white noise with band-limited white gaussian noise since perfect white noise never exist even in real world.

The Noise bandwidth enables the generation of noise in transient analysis.
Because transient analysis uses a variable timestep method,
the noise must be limited to a bandwidth of less than 1/(2*MaxTimeStep).

Shocked

Back to top
 
« Last Edit: Jul 8th, 2003, 4:08pm by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
jjrael
New Member
*
Offline



Posts: 8

Re: How to Implement Time Dependent Noise
Reply #4 - Jul 8th, 2003, 2:45pm
 
It is also valid for pnoise.

It is my understanding the spectreRF runs a PSS analysis and then at each point along the PSS curve, finds the noise values and the gain values and then sums them up.

I want to be able to change the value of the noise along the PSS curve.

I did a "hack" where I used a tanh as a decsision block and a multiplier to shape the noise. Using the time domain noise capabilities of spectreRF, I could see that I got something close to what I wanted. However, my "hack" is larger than my circuit of interest!! I am sure there is a more elegant solution to this. I used to make hacks like this in Spice before I heard of verilogA/AMS. Since I am going back to my Spice tricks, I KNOW I am doing something wrong!!

jr
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: How to Implement Time Dependent Noise
Reply #5 - Jul 8th, 2003, 4:28pm
 
pnoise is frequecy domain small-signal noise analysis based on periodical operating point calculated by PSS.

Things you want to do is implementation of bias dependent frequency domain noise model for time domain small-signal noise analysis in  SpectreRF's PSS/Pnoise.

Right ?

[Note] time domain noise analysis of SpectreRF is actually frequency domain noise analysis.

First you have to test your model for PSS/Pnoise(Sources), next test it for PSS/Pnoise(Timedomain).

Your model including other sentences in Verilog-A is valid for normal PSS/Pnoise ?

For example, following code works for PSS/Pnoise.

module diode (a, c) ;
inout a, c ;
electrical a, c ;
parameter real rs=0, is=1e-14, tf=0, cjo=0, phi=0.7 ;
parameter real kf=0, af=1, ef=1 ;
analog begin
I(a, c) <+ is*(limexp((V(a, c)-rs*I(a, a))/$vt) - 1);
I(a, c) <+ white_noise(2* `P_Q * I(a, c)) ;
I(a, c) <+ flicker_noise(kf*pow(abs(I(a, c)),af),ef);
end
endmodule

Back to top
 
« Last Edit: Jul 9th, 2003, 4:57am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2019 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.