Hello everyone,
I'm using an "if else" statement inside the (local design) variable value in ADE Assembler. The expression is used to assign a string value to a corresponding integer value.
The variable is defined as: CG_MODE = if(CG_MODE_s=="LCG" then LCG else if(CG_MODE_s=="HCG" then HCG else if(CG_MODE_s=="HDR" then HDR else 0)))
And CG_MODE_s can get string values such as "LCG", "HCG", "HDR".
The variables HCG, LCG and HDR are simple integers that are used inside the testbench.
This is basically a wrapper to use strings which are much easier to read and understand when sweeping these values.
The issue I have is if I'm running a single point simulation (i.e. - no parameter sweeps) the generated netlist contains the if statement inside the parameter (which I guess is not a legal netlist statement):
parameters {some parameters omitted} CG_MODE_s="LCG" HCG=1111 HDR=2222 \
LCG=3333 \ CG_MODE=if(CG_MODE_s=="LCG" then LCG else if(CG_MODE_s=="HCG" then HCG \
else if(CG_MODE_s=="HDR" then HDR else 0)))
parameters {some parameters omitted} CG_MODE_s="LCG" HCG=1111 HDR=2222 \
LCG=3333 \
CG_MODE=3333
Clearly the variable if statement is evaluated or parsed/translated differently into the netlist if I'm running a parametric sweep or not. Why does that happen ?
Is there any workaround for this ? or a better way to implement this parameter "alias" that I wanted ?
Currently I use a workaround which involves always sweep some variable and canceling those run points in the run preview window, but this is not an ideal solution.
Thanks in advance,
Michael Shekhtman