I am doing experiments about modulated flicker noise and I aim to stick to Verilog-A behavioural modelling.
Below is the test bench I brought up and the Verilog-A modules that I wrote seperately:
// VerilogA for lab_simu, noise_source, veriloga
`include "constants.vams"`include "disciplines.vams"
module noise_source (op);
output op;voltage op;
analog begin V(op) <+ flicker_noise (1000,1,"Flicker") ;end
// VerilogA for lab_simu, Oscillator_fixed_freq, veriloga
module Oscillator_fixed_freq (out);
output out; voltage out; // output signal
parameter real freq = 1e9 from (0:inf); // output frequencyparameter real vl= 0; // high output voltageparameter real vh=1; // low output voltageparameter real tt=0.01/ (1e9) from (0:inf); // transition time of output
integer n;real next;
analog begin @(initial_step) begin next = 0.5/freq + $abstime; end @(timer(next)) begin n = !n; next = next + 0.5/freq; end V(out) <+ transition(n ? vh : vl, 0, tt);end
// VerilogA for lab_simu, mixer, veriloga
module mixer (vin1, vin2, vout);input vin1, vin2;output vout;voltage vin1, vin2, vout;parameter real gain = 1;
analog V(vout) <+ gain * V(vin1)*V(vin2);
Nothing terribly bizarre.
The question is, I would love to extract the Noise Power Spectral Density measured in V^2/Hz for both 'noise' and 'output':
when I set the noise analysis as below:
I get the plot expected (green curve is noise PSD and red line is that taken 10dB - a straight line!):
However, when I set the 'positive output node' in the noise analysis to be the modulated noise output, I got nothing in the plot (0V^2/Hz for the whole spectrum):
Could somebody explain why and suggest any solution to it? I want to plot the noise PSD of the output modulated noise.
In case noise analysis could not handle this task. Could somebody suggest in which analysis I can extract the same nice noise PSD plot as in the first case and how?
Thank you so much!!!
You cannot simulate modulated noise with a simple noise analysis. Use either pnoise or hbnoise.