• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. User Defined Skill Function - Alias Waveform

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 5083
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

User Defined Skill Function - Alias Waveform

mcunning
mcunning over 8 years ago

Hello,

I would like to create a function that performs ideal aliasing on the output waveform of a simulation (particularly output noise). In other words, I want all the nyquist bands within a specified frequency range to be folded down to the first nyquist zone. The best approach I could think of was to manually clip, shift, flip, and add the noise voltage within each nyquist band to each other. This works well, but high frequency aliasing requires a lot of equations.

Here is the waveform calculator formula of several additions (up to fourth nyquist) for reference:

(clip(Vno2 0 VAR("fnyq")) + rshift(flip(clip(Vno2 VAR("fnyq") (2 * VAR("fnyq")))) (2 * VAR("fnyq"))) + lshift(clip(Vno2 (2 * VAR("fnyq")) (3 * VAR ("fnyq"))) (2 * VAR("fnyq"))) + rshift(flip(clip(Vno2 (3 * VAR("fnyq")) (4 * VAR("fnyq")))) (4 * VAR("fnyq")))

where

Vno2 = (getData("out" ?result "noise")**2)

fnyq is defined in the design variables

I have also linked my attempt at a custom SKILL function, but it does not run. I don't have much background with SKILL, so I could have some bad code, but I've tried to follow the documentation and available scripts as best as possible.

I would appreciate it if someone could take a look at my code and help me debug it or present a better option. Thanks.

----------------------------------------------------------

mcAliasSignal.il

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    It's in the code that builds the form:

    You need to not reference "waveform" because that's not known when the form is launched (the errors are suppressed by default - you can re-enable them using sstatus(errsetTrace t)). So I commented these four lines out and made the fmin/fmax values fixed defaults.

    (procedure (abCreateAliasSignalForm)
      (let (fsample fmin fmax xVec startfreq endfreq len)
           (setq fsample (ahiCreateStringField
    		    ?name 'fsample
    		    ?prompt "Sampling Frequency"
    		    ?value ""
    		    ))
           /*
           (setq xVec (drGetWaveformXVec waveform))
           (setq len drVectorLength(xVec))
           (setq startfreq (drGetElem xVec 0))
           (setq endfreq (drGetElem xVec (sub1 len)))
           */
           (setq fmin (ahiCreateStringField
    		    ?name 'fmin
    		    ?prompt "Min Freq"
    		    ?value "0"
    		    ))
           (setq fmax (ahiCreateStringField
    		    ?name 'fmax
    		    ?prompt "Max Freq"
    		    ?value "1G"
    		    ))
           (calCreateSpecialFunctionsForm
    	'abAliasSignalForm
    	(list
     
    	  (list fsample 0:0  180:20 90)
    	  (list fmin 0:30  180:20 90)
              (list fmax 0:60  180:20 90)
    	)
           )
      )
    )


    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    It's in the code that builds the form:

    You need to not reference "waveform" because that's not known when the form is launched (the errors are suppressed by default - you can re-enable them using sstatus(errsetTrace t)). So I commented these four lines out and made the fmin/fmax values fixed defaults.

    (procedure (abCreateAliasSignalForm)
      (let (fsample fmin fmax xVec startfreq endfreq len)
           (setq fsample (ahiCreateStringField
    		    ?name 'fsample
    		    ?prompt "Sampling Frequency"
    		    ?value ""
    		    ))
           /*
           (setq xVec (drGetWaveformXVec waveform))
           (setq len drVectorLength(xVec))
           (setq startfreq (drGetElem xVec 0))
           (setq endfreq (drGetElem xVec (sub1 len)))
           */
           (setq fmin (ahiCreateStringField
    		    ?name 'fmin
    		    ?prompt "Min Freq"
    		    ?value "0"
    		    ))
           (setq fmax (ahiCreateStringField
    		    ?name 'fmax
    		    ?prompt "Max Freq"
    		    ?value "1G"
    		    ))
           (calCreateSpecialFunctionsForm
    	'abAliasSignalForm
    	(list
     
    	  (list fsample 0:0  180:20 90)
    	  (list fmin 0:30  180:20 90)
              (list fmax 0:60  180:20 90)
    	)
           )
      )
    )


    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information