.tran doesn't allow expressions?

Skip to first unread message

Sai Charan

Dec 11, 2022, 5:00:05 AM12/11/22
to xyce-users
Hello Eric,

I am trying to use expressions inside .tran but looks like Xyce doesn't allow it. 

.param sim_end = '0.04*1'
.TRAN 10n {sim_end}

Netlist error: Cannot convert '{sim_end}' to double for expression TSTOP

I see from the reference manual that Xyce supports both single quotes and curly braces. Can you comment and provide a solution for this, please?



Dec 11, 2022, 3:59:16 PM12/11/22
to xyce-users

Hi Sai,

Unfortunately, the Xyce parser by default doesn't allow any expressions in analysis statements such as .TRAN (or .DC, .AC, etc).  There are some exceptions to this, but that is the default behavior.  So what you're trying to do isn't currently allowed in Xyce.

This has come up multiple times before (at least once in this forum) and is an issue we need to fix.   A version of this is in our internal issue tracker already, but we haven't gotten around to resolving it. 

The code was probably set up this way (I am guessing) to prevent expressions that contain changeable parameters; i.e. params that could be updated via .STEP.  The various analysis classes at the moment aren't smart enough to update stuff like this once the simulation has started.    Fixing the code to handle this use case in general will require some hacking on the setup functions for each analysis class.  That isn't impossible to do, but will take a little time.

On the other hand, the use case of expressions that *don't* change should be pretty easy to fix, as this is mostly about revising some logic (I think) in one function in the parser.  I'll see if I can make that happen quickly.


Sai Charan

Dec 11, 2022, 4:30:58 PM12/11/22
to xyce-users, me...@umich.edu
Understood. I was initially using EXP and was not sure whether it was the exponential function which is terminating the run or some other thing. I had to track down to see if it's the core issue of .tran itself with the expressions in general. Thanks for providing the confirmation for the same. It would be good if you could add a note regarding this inside the manual (though I see that you never used any such examples under the expression section or .tran section inside the reference manual).

Thanks for your cooperation, Eric. I appreciate it. Looking forward to the new release with the fix.


You received this message because you are subscribed to a topic in the Google Groups "xyce-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xyce-users/5fR39U54PBw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xyce-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xyce-users/675bf727-b7ed-44ba-be84-82f7c9c7ad7an%40googlegroups.com.
Reply all
Reply to author
0 new messages