FFT in SpectreMDL

Discussion in 'Cadence' started by J. Patrick Bedell, Nov 27, 2008.

  1. 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
     
    J. Patrick Bedell, Nov 27, 2008
    #1
  2. 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
     
    J. Patrick Bedell, Dec 2, 2008
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.