FFT in SpectreMDL

J

J. Patrick Bedell

Guest
Hello,
I'm trying to use the FFT to analyze a transient waveform and
extract the signal to noise ratio. I'm using MMSIM6.2, with the mdl
file:

alias measurement tran_run {
run analysisTRAN1
// 1) Extract 'snr_fft'
export real Zsnr_fft0 = snr(fft(sig=V(v_out), from=0ns, to=160ns,
numpoints=1024, window='rectangular), \ sig_from=11e6, sig_to=13e6,
noise_from=1, noise_to=2e9)
}
run tran_run as tran1

The simulation executes, but the function fft is not found. From the
output of "spectremdl -batch filename.mdl -design filename.scs":

Error found by spectre during transient analysis `tran1', during task
`MDLControl'.
ERROR: line `8': Unable to bind function `fft'.
ERROR: Argument 'sig' cannot be cast scalar to waveform.
ERROR: line `8': Operand 'fft' of function 'snr' contains an
error.
ERROR: line `8': The function 'snr' contains no arguments


Is it possible to use the fft function when MDL is used in batch
mode? Is there some other problem I'm not aware of? Thanks!!!

Patrick
 
Hello,
For what it's worth, I found that the FFT command did work when I
did not include the parameter names, i.e.

Zsnr_fft0 = snr(fft(V(v_out), 0ns, 160ns, \
1024, 'rectangular), sig_from=11e6, sig_to=13e6, \
noise_from=1, noise_to=2e9)

works fine, but

export real Zsnr_fft0 = snr(fft(sig=V(v_out), from=0ns, to=160ns, \
numpoints=1024, window='rectangular), sig_from=11e6, sig_to=13e6, \
noise_from=1, noise_to=2e9)

does not.

Patrick

On Nov 27, 2:17 pm, "J. Patrick Bedell" <jpbed...@gmail.com> wrote:
Hello,
   I'm trying to use the FFT to analyze a transient waveform and
extract the signal to noise ratio.  I'm using MMSIM6.2, with the mdl
file:

alias measurement tran_run {
run analysisTRAN1
// 1) Extract 'snr_fft'
export real Zsnr_fft0 = snr(fft(sig=V(v_out), from=0ns, to=160ns,
numpoints=1024, window='rectangular), \ sig_from=11e6, sig_to=13e6,
noise_from=1, noise_to=2e9)}

run tran_run as tran1

The simulation executes, but the function fft is not found.  From the
output of "spectremdl -batch filename.mdl -design filename.scs":

Error found by spectre during transient analysis `tran1', during task
`MDLControl'.
    ERROR: line `8': Unable to bind function `fft'.
    ERROR: Argument 'sig' cannot be cast scalar to waveform.
    ERROR: line `8': Operand 'fft' of function 'snr' contains an
error.
    ERROR: line `8': The function 'snr' contains no arguments

   Is it possible to use the fft function when MDL is used in batch
mode?  Is there some other problem I'm not aware of?  Thanks!!!

   Patrick
 

Welcome to EDABoard.com

Sponsor

Back
Top