customise ADE to allow variable&expression in transient stop

F

fogh

Guest
Hi All,

As described in the topic. These redefine CDS functions, used by analog artist
spectre-direct, so that you can use variables, or expressions.
This lets you define tran and ac analyses that will track with the time
constants or frequency design variables.


Please repost to comp.cad.cadence your improvements to this.

/*
________________________________________________________________________________________
*/

asiSpectreAutoloadProc() ;cause loading of class definition for ^asi.* methods
for spectre "tool".
let( (prevDMstatus)
prevDMstatus=status(debugMode)
prevDMstatus || sstatus( debugMode t)
/* _______________________a method redefine________________________ */
;; putd('asiCheckAnalysis nil) ;;let s not do that, so we keep the checks for
other analyses (i.e. classes ) intact.

defmethod( asiCheckAnalysis ( ( ana spectre_tran_analysis) form )
let( ( (formObj asiGetFormObject(form)) )
;;asiCheckBlankNumericGreater(ana form 'stop 0 )
asiCheckExpressionGreater(ana form 'stop 0 )
asiInvalidateControlStmts(asiGetSession(ana))
)
)

/* _______________________a new method___________________________ */

putd('asiNumericOrDesignVariableError nil)
defmethod( asiNumericOrDesignVariableError ( ( obj fixnum) varList ) nil )
defmethod( asiNumericOrDesignVariableError ( ( obj flonum) varList ) nil )
defmethod( asiNumericOrDesignVariableError ( ( obj string) varList )
cond(
(artBlankString(obj) nil)
(artGetValue(obj) nil)
(!setof(x varList obj == car(x)) "String does not represent a number or a
design variable" )
)
);method

/* ___ flowchart AC sweeps use checks: spectreiCheckAnaSecGenericSweepVariable
and spectreiCheckAnaSecGenericSweepRange___ */

putd('spectreiCheckAnaSecGenericSweepVariable nil)
procedure( spectreiCheckAnaSecGenericSweepVariable(ana form
@key (freq 'freq) (device 'dev) (deviceParam 'deviceParam) (model
'mod) (modelParam 'modelParam) (designVar 'designVar) )
let( ( (formObj asiGetFormObject(form)) theSweep )
theSweep = asiHiGetFieldVal(ana formObj 'sweep )
unless((stringp(freq) || (theSweep == "Frequency"))
;asiCheckBlankNumericGreater(ana form freq 0)
;t
asiCheckExpressionGreater(ana form freq 0)
)
case( theSweep
("Temperature")
(("Component Parameter" "Component Param.") asiCheckBlankInstExists(ana
form device) asiCheckBlank(ana form deviceParam))
(("Model Parameter" "Model Param.") asiCheckBlank(ana form model)
asiCheckBlank(ana form modelParam))
(("Variable" "Design Variable") asiCheckBlank(ana form designVar)
when(defstructp(form) asiCheckDesignVariable(ana form designVar) ))
);esac
);let
);proc

/* _______________________________________________________ */
putd('spectreiCheckAnaSecGenericSweepRange
getd('spectreiCheckAnaSecPSSSubSweepRange))

sstatus( debugMode prevDMstatus)
);let. scope of prevDMstatus
info("analog artist fix : allowing variables in transient stop time and AC
range.\n")

/*
________________________________________________________________________________________
*/
 

Welcome to EDABoard.com

Sponsor

Back
Top