Maker Pro
Maker Pro

Problems using PSPICE subckt in simulation.

Hello. I'm new to PSPICE (Orcad 10) and am having trouble with
invalid expressions in subckts. As part of the .out file it says
"Error - missing or invalid expression" and points to V(0#) where
the 0# is node in the original .subckt file. Why is the original node
"V(IN)" lost?

I didn't create the original subckt but used a conversion program to
convert an IBIS model to SPICE that created many subcircuits and
models.

Thanks in advance for any guidance!

*** EXPANSION OF SUBCIRCUIT X_U2 ****
X_U2.C_COMP X_U2.DIE 0 3e-012
X_U2.R_COMP X_U2.DIE 0 1e+012
X_U2.G1 X_U2.DIE 0 VALUE
{(V(IPD)*V(XVKDR.VKDR)*((V(0#)>=2.02)*(V(1#)>=2.02))+V(
+ IPD)*V(XVKDF.VKDF)*(((V(0#)>=2.02)*(V(1#)>=2.02)==0)))}
-------------------------$
ERROR -- Missing or invalid expression
X_U2.G2 X_U2.DIE VCC0 VALUE
{(V(IPU)*V(XVKUR.VKUR)*((V(0#)>=2.02)*(V(1#)>=2.02))+V(
+ IPU)*V(XVKUF.VKUF)*(((V(0#)>=2.02)*(V(1#)>=2.02)==0)))}
----------------------------$
ERROR -- Missing or invalid expression

In the original

The original from the library looks likes this:

..SUBCKT SDRDAT_A16_MAXVCC IN EN OUT VCC VEE
C_COMP DIE VEE 3.3e-012
R_COMP DIE VEE 1e+012
G1 DIE VEE VALUE =
{(V(IPD)*V(XVKDR.VKDR)*((V(IN)>=2.02)*(V(EN)>=2.02))+V(IPD)*V(XVKDF.VKDF)*(((V(IN)>=2.02)*(V(EN)>=2.02)==0)))}
G2 DIE VCC VALUE =
{(V(IPU)*V(XVKUR.VKUR)*((V(IN)>=2.02)*(V(EN)>=2.02))+V(IPU)*V(XVKUF.VKUF)*(((V(IN)>=2.02)*(V(EN)>=2.02)==0)))}


The schematic netlist is pretty simple with just the subcircuit and
power supply.

**** INCLUDING SCHEMATIC1.net ****
* source IMPORTTRY
V_V1 VCC0 0 3.3Vdc
X_U2 IN0 EN0 OUT0 VCC0 0 SDRDAT_A16_TYPVCC
V_VIN IN0 0 0Vdc
V_V2 EN0 0 2.2Vdc
R_R1 0 OUT0 50
 
J

Jim Thompson

Jan 1, 1970
0
Where did you come up with this syntax? Looks like a cobbled up
mixture of analog and logistical operators improperly mixed up... or
syntax from some other simulator.

Hello. I'm new to PSPICE (Orcad 10) and am having trouble with
invalid expressions in subckts. As part of the .out file it says
"Error - missing or invalid expression" and points to V(0#) where
the 0# is node in the original .subckt file. Why is the original node
"V(IN)" lost?

I didn't create the original subckt but used a conversion program to
convert an IBIS model to SPICE that created many subcircuits and
models.

Thanks in advance for any guidance!

*** EXPANSION OF SUBCIRCUIT X_U2 ****
X_U2.C_COMP X_U2.DIE 0 3e-012
X_U2.R_COMP X_U2.DIE 0 1e+012
X_U2.G1 X_U2.DIE 0 VALUE
{(V(IPD)*V(XVKDR.VKDR)*((V(0#)>=2.02)*(V(1#)>=2.02))+V(
+ IPD)*V(XVKDF.VKDF)*(((V(0#)>=2.02)*(V(1#)>=2.02)==0)))}
-------------------------$
ERROR -- Missing or invalid expression
X_U2.G2 X_U2.DIE VCC0 VALUE
{(V(IPU)*V(XVKUR.VKUR)*((V(0#)>=2.02)*(V(1#)>=2.02))+V(
+ IPU)*V(XVKUF.VKUF)*(((V(0#)>=2.02)*(V(1#)>=2.02)==0)))}
----------------------------$
ERROR -- Missing or invalid expression

In the original

The original from the library looks likes this:

.SUBCKT SDRDAT_A16_MAXVCC IN EN OUT VCC VEE
C_COMP DIE VEE 3.3e-012
R_COMP DIE VEE 1e+012
G1 DIE VEE VALUE =
{(V(IPD)*V(XVKDR.VKDR)*((V(IN)>=2.02)*(V(EN)>=2.02))+V(IPD)*V(XVKDF.VKDF)*(((V(IN)>=2.02)*(V(EN)>=2.02)==0)))}
G2 DIE VCC VALUE =
{(V(IPU)*V(XVKUR.VKUR)*((V(IN)>=2.02)*(V(EN)>=2.02))+V(IPU)*V(XVKUF.VKUF)*(((V(IN)>=2.02)*(V(EN)>=2.02)==0)))}


The schematic netlist is pretty simple with just the subcircuit and
power supply.

**** INCLUDING SCHEMATIC1.net ****
* source IMPORTTRY
V_V1 VCC0 0 3.3Vdc
X_U2 IN0 EN0 OUT0 VCC0 0 SDRDAT_A16_TYPVCC
V_VIN IN0 0 0Vdc
V_V2 EN0 0 2.2Vdc
R_R1 0 OUT0 50


...Jim Thompson
 
E

engr4fun

Jan 1, 1970
0
That looks like the Micro-Cap IBIS conversion. I tried using the
Micro-Cap IBIS converter and running it on PSpice. It looks like there
are two things that PSpice is unable to handle:

1) PSpice limits the relational operators (>=, ==, etc) to only within
an IF statement for some reason.
2) I don't think PSpice has the capability to handle the NOBRKPNTS
TRIGGER={((V(IN)>=2.02)*(V(EN)>=2.02))==0} commands for the PWL source
(present at least in the model I created).

You can probably rework the G dependent source equations to use the If
statement but I don't know if you can do anything about the PWL
commands.
 
J

Jim Thompson

Jan 1, 1970
0
That looks like the Micro-Cap IBIS conversion. I tried using the
Micro-Cap IBIS converter and running it on PSpice. It looks like there
are two things that PSpice is unable to handle:

1) PSpice limits the relational operators (>=, ==, etc) to only within
an IF statement for some reason.
2) I don't think PSpice has the capability to handle the NOBRKPNTS
TRIGGER={((V(IN)>=2.02)*(V(EN)>=2.02))==0} commands for the PWL source
(present at least in the model I created).

You can probably rework the G dependent source equations to use the If
statement but I don't know if you can do anything about the PWL
commands.
[snip]

PSpice uses MAX, MIN and LIMIT to get these functions.

I also noted some node names in the subcircuit declaration did not
occur in the component listing.

...Jim Thompson
 
C

Charles Edmondson

Jan 1, 1970
0
Hello. I'm new to PSPICE (Orcad 10) and am having trouble with
invalid expressions in subckts. As part of the .out file it says
"Error - missing or invalid expression" and points to V(0#) where
the 0# is node in the original .subckt file. Why is the original node
"V(IN)" lost?

I didn't create the original subckt but used a conversion program to
convert an IBIS model to SPICE that created many subcircuits and
models.

Thanks in advance for any guidance!

*** EXPANSION OF SUBCIRCUIT X_U2 ****
X_U2.C_COMP X_U2.DIE 0 3e-012
X_U2.R_COMP X_U2.DIE 0 1e+012
X_U2.G1 X_U2.DIE 0 VALUE
{(V(IPD)*V(XVKDR.VKDR)*((V(0#)>=2.02)*(V(1#)>=2.02))+V(
+ IPD)*V(XVKDF.VKDF)*(((V(0#)>=2.02)*(V(1#)>=2.02)==0)))}
-------------------------$
ERROR -- Missing or invalid expression
X_U2.G2 X_U2.DIE VCC0 VALUE
{(V(IPU)*V(XVKUR.VKUR)*((V(0#)>=2.02)*(V(1#)>=2.02))+V(
+ IPU)*V(XVKUF.VKUF)*(((V(0#)>=2.02)*(V(1#)>=2.02)==0)))}
----------------------------$
ERROR -- Missing or invalid expression

In the original

The original from the library looks likes this:

.SUBCKT SDRDAT_A16_MAXVCC IN EN OUT VCC VEE
C_COMP DIE VEE 3.3e-012
R_COMP DIE VEE 1e+012
G1 DIE VEE VALUE =
{(V(IPD)*V(XVKDR.VKDR)*((V(IN)>=2.02)*(V(EN)>=2.02))+V(IPD)*V(XVKDF.VKDF)*(((V(IN)>=2.02)*(V(EN)>=2.02)==0)))}
G2 DIE VCC VALUE =
{(V(IPU)*V(XVKUR.VKUR)*((V(IN)>=2.02)*(V(EN)>=2.02))+V(IPU)*V(XVKUF.VKUF)*(((V(IN)>=2.02)*(V(EN)>=2.02)==0)))}


The schematic netlist is pretty simple with just the subcircuit and
power supply.

**** INCLUDING SCHEMATIC1.net ****
* source IMPORTTRY
V_V1 VCC0 0 3.3Vdc
X_U2 IN0 EN0 OUT0 VCC0 0 SDRDAT_A16_TYPVCC
V_VIN IN0 0 0Vdc
V_V2 EN0 0 2.2Vdc
R_R1 0 OUT0 50
When the Gvalue is continued on the next line, there needs to be a +
sign at the beginning to indicat continuation. It isn't there, so the
simulator thinks that is a different statement, which of course has
invalid syntax.

As for whether it will work after that, I am not sure... :cool:
 
You are correct in that I used MicroCap 8 to convert the IBIS to SPICE.
I didn't show it in my initial post but like you mentioned I also had
an error where it didn't like the NOBRKPNTS statement in the PWL
source.

So even if I can rework the G dependent sources it lookes like I'm out
of luck in terms of getting the PWL statements to work..
 
J

Jim Thompson

Jan 1, 1970
0
You are correct in that I used MicroCap 8 to convert the IBIS to SPICE.
I didn't show it in my initial post but like you mentioned I also had
an error where it didn't like the NOBRKPNTS statement in the PWL
source.

So even if I can rework the G dependent sources it lookes like I'm out
of luck in terms of getting the PWL statements to work..

You don't know how to run an editor ?:) I recommend UltraEdit as a
very versatile program with good search and replace capability.

...Jim Thompson
 
E

engr4fun

Jan 1, 1970
0
I don't have the latest PSpice, but if the newest one doesn't support
at least the Trigger statement for the PWL, then you probably would be
out of luck. From what I can understand of it, the Trigger statement
waits till its expression is True and then starts the PWL defined
waveform. Therefore it looks crucial to the IBIS operation whereas the
NOBRKPNTS you could probably get away with just deleting. I don't know
if PSpice has an equivalent. Also not sure if the Trigger syntax is
unique to Micro-Cap or also available in other simulators. I can see
its usefulness for IBIS though.
 
J

Jim Thompson

Jan 1, 1970
0
I don't have the latest PSpice, but if the newest one doesn't support
at least the Trigger statement for the PWL, then you probably would be
out of luck. From what I can understand of it, the Trigger statement
waits till its expression is True and then starts the PWL defined
waveform. Therefore it looks crucial to the IBIS operation whereas the
NOBRKPNTS you could probably get away with just deleting. I don't know
if PSpice has an equivalent. Also not sure if the Trigger syntax is
unique to Micro-Cap or also available in other simulators. I can see
its usefulness for IBIS though.

In PSpice:

STP(TIME-100u) = 0 for TIME < 100us, 1 for TIME >= 100us

...Jim Thompson
 
Top