Quantcast
Channel: Cadence RF Design Forum
Viewing all articles
Browse latest Browse all 956

Modelling White noise using VerilogA

$
0
0

 Dear All,

I want to add a cyclostaionary noise current  ( 4*k*T*Gm(t) ) to a non-linear ( hard-limiter ) Gm block

 Gm(t) = derivative( I(out)/V(in)).

But the moment I am doing  Gm_t = ddx(I(out),V(in)); It is giving error.

Actullay, I ideally want to add white_noise(4*k*T*Gm_t) to I(out) finally.

It looks recursive. But could anybody please tell how this can be done.

The code is as given below.

 

Kind Regards,

 

 

 

// VerilogA for VERILOG_A_MODEL, HARD_LIMIT_GM, veriloga

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

module HARD_LIMIT_GM(in,out);
  inout in,out;
  parameter real vtrans = 0;
  parameter real tdelay = 0 from [0:inf);
  parameter real trise = 1p from (0:inf);
  parameter real tfall = 1p from (0:inf);
  parameter real Gm=-5m;

  real Gm_t;


  electrical in,out;
  real vout_val;


  analog begin 
      @ (cross(V(in) - vtrans)) ;
     vout_val = V(in)>vtrans; 
     I(out) <+ Gm * transition( vout_val, tdelay, trise, tfall); 

     Gm_t = ddx(I(out),V(in)); // HERE IT IS SHOWING ERROR

      // Actullay, here, I ideally want to add white_noise(4*k*T*Gm_t) to I(out) .

  end   
endmodule


Viewing all articles
Browse latest Browse all 956

Trending Articles