diff --git a/examples/xspice/noise/noise_gain.cir b/examples/xspice/noise/noise_gain.cir new file mode 100644 index 000000000..cb962f12e --- /dev/null +++ b/examples/xspice/noise/noise_gain.cir @@ -0,0 +1,22 @@ +Noise in gain code model + +a1 in1 out1 amp1 +.model amp1 gain(in_offset=0.1 gain=5.0 ++ out_offset=-0.01 noise_voltage=1u noise_corner=2k noise_exponent=2) + +a2 in1 out2 amp2 +.model amp2 gain(in_offset=0.1 gain=5.0 ++ out_offset=-0.01 noise_voltage=2u noise_corner=1k noise_exponent=1.2) + +Vin1 in1 0 1 ac 1 + +.control +noise V(out1) vin1 dec 333 1 1e6 16 +print inoise_total onoise_total +noise V(out2) vin1 dec 333 1 1e6 16 +print inoise_total onoise_total +set xbrushwidth=3 +plot noise1.onoise_spectrum noise1.inoise_spectrum noise3.onoise_spectrum noise3.inoise_spectrum loglog +.endc + +.end diff --git a/src/xspice/icm/analog/gain/ifspec.ifs b/src/xspice/icm/analog/gain/ifspec.ifs index 4abd6c194..b7622ac39 100644 --- a/src/xspice/icm/analog/gain/ifspec.ifs +++ b/src/xspice/icm/analog/gain/ifspec.ifs @@ -53,3 +53,25 @@ Vector_Bounds: - - - Null_Allowed: yes yes yes +PARAMETER_TABLE: + +Parameter_Name: noise_voltage noise_current +Description: "noise voltage" "noise current" +Data_Type: real real +Default_Value: 0.0 0.0 +Limits: - - +Vector: no no +Vector_Bounds: - - +Null_Allowed: yes yes + + +PARAMETER_TABLE: + +Parameter_Name: noise_corner noise_exponent +Description: "1/f corner freq" "1/f exponent" +Data_Type: real real +Default_Value: 0.0 1.0 +Limits: - - +Vector: no no +Vector_Bounds: - - +Null_Allowed: yes yes