Contains unknowns in math expression

37 views
Skip to first unread message

Manoj Maskey

unread,
Oct 7, 2021, 12:07:30 PM10/7/21
to xyce-users
Hi,


For the following netlist commands,
.MEASURE tran start_r WHEN V(CLK)='vtrig' TD='0' RISE=2
.MEASURE tran start param='start_r'
.MEASURE tran outsig MAX V(Q) FROM='(start+0.5e-9)' TO='(start+0.75e-9)'

I am seeing these errors:
Netlist error: Attempt to evaluate expression (start+0.5e-9), which contains unknowns
Netlist error: Attempt to evaluate expression (start+0.75e-9), which contains unknowns

Please suggest how to fix this issue.

Thank you. 

xyce-users

unread,
Oct 7, 2021, 1:52:42 PM10/7/21
to xyce-users
This is a known issue in Xyce, and the topic of a long-standing bug.  Section 2.1.18.3 ("Expression Support") of the .MEASURE section of the Xyce Reference Guide says this:

"These measure “qualifiers” (TO, FROM, TD, RISE, FALL, CROSS, AT, OFF, ON, DEFAULT_VAL and VAL) support expressions. The caveat is that the expression must evaluate to a constant at the time that
each measure object is made. So, that expression can not depend on solution variables or lead currents. This limitation matches HSPICE. It also can not depend on a global parameter. Finally, it can not depend
on another measure’s value, which is an allowed syntax in HSPICE."

The "hack" that internal users do is:

1) run the simulation with MEASURE tran outsig MAX V(Q) FROM='(start+0.5e-9)' TO='(start+0.75e-9)' commented out.
2) use -remeasure to re-calculate the outsig measure, once you know the value of the start measure.

Not elegant, but the best I can recommend for now.

An example is this:

* example.cir
V1 1 0 PWL 0 0 0.5 1 1 0
R1 1 0 1

.TRAN 0 1
.PRINT TRAN V(1)

.MEASURE TRAN START WHEN V(1)=0.5
*.MEASURE TRAN OUTSIG MAX V(1) FROM='start'

.END
****
Run Xyce example.cir    The example.cir.mt0 file has:

START = 2.500000e-01

You then change the OUTWIG measure line to use that value (.MEASURE TRAN OUTSIG MAX V(1) FROM=0.25) and do this:

Xyce -remeasure tranExample.cir.prn tranExample.cir

which gets your this in stdout.  -remeasure is typically quick even for very large .prn files.

*****
***** Welcome to the Xyce(TM) Parallel Electronic Simulator
*****
***** This is version XyceRad DEVELOPMENT-202110040807-(Release-7.3.0-283-g6d620e6)
***** Date: Thu Oct 07 11:49:33 MDT 2021

***** Executing netlist tranExample.cir

***** Reading and parsing netlist...
***** Setting up topology...

In OutputMgr::remeasure
file to reprocess through measure and/or fft functions: tranExample.cir.prn

 ***** Measure Functions *****

START = 2.500000e-01
Measure Start Time= 0.000000e+00        Measure End Time= 1.000000e+00

OUTSIG = 1.000000e+00 at time = 5.000000e-01
Measure Start Time= 2.500000e-01        Measure End Time= 1.000000e+00

***** Remeasure analysis complete

xyce-users

unread,
Oct 7, 2021, 2:01:18 PM10/7/21
to xyce-users
On a happier note, your example does work on my in-progress git worktree for this issue where at least the TD, FROM, TO and AT qualifiers are allowed to use more general expressions (including ones that depend on other measure values).  I'll start an internal discussion (with the Xyce Team) about finishing up the bug fix / feature request. 

Which qualifiers (amongst TO, FROM, TD, RISE, FALL, CROSS, AT, OFF, ON, DEFAULT_VAL and VAL ) do you care about most?

xyce-users

unread,
Oct 21, 2021, 1:24:11 PM10/21/21
to xyce-users
As an FYI, this issue is being discussed by the Xyce Team and we have a path forward on it.  I'm not sure when a fix will be available at our github site though, as I have to finish up some other things first.
Reply all
Reply to author
Forward
0 new messages