Problems using PSPICE subckt in simulation.
Electronics Forum Index Electronics
Circuits, theory, electrons and discussions.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ElectronicsHelp.net
Problems using PSPICE subckt in simulation.

 
Post new topic   Reply to topic    Electronics Forum Index -> Design
Author Message
Guest






Posted: Fri Feb 11, 2005 3:02 am    Post subject: Problems using PSPICE subckt in simulation. Reply with quote

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

Back to top
Jim Thompson
Guest





Posted: Fri Feb 11, 2005 3:32 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

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.

On 10 Feb 2005 13:02:31 -0800, psfguard-ng@yahoo.com wrote:

Quote:
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
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
engr4fun
Guest





Posted: Fri Feb 11, 2005 4:14 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

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.


psfguard-ng@yahoo.com wrote:
Quote:
*** 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


Back to top
Jim Thompson
Guest





Posted: Fri Feb 11, 2005 4:33 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

On 10 Feb 2005 14:14:11 -0800, "engr4fun" <engr4fun@yahoo.com> wrote:

Quote:
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
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
Charles Edmondson
Guest





Posted: Fri Feb 11, 2005 5:45 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

psfguard-ng@yahoo.com wrote:

Quote:
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... 8-)

--
Charlie
--
Edmondson Engineering
Unique Solutions to Unusual Problems
Back to top
Guest






Posted: Sat Feb 12, 2005 1:45 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

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..
Back to top
Jim Thompson
Guest





Posted: Sat Feb 12, 2005 2:24 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

On 11 Feb 2005 11:45:20 -0800, psfguard-ng@yahoo.com wrote:

Quote:
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
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
engr4fun
Guest





Posted: Sat Feb 12, 2005 3:25 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

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.
Back to top
Jim Thompson
Guest





Posted: Sat Feb 12, 2005 4:00 am    Post subject: Re: Problems using PSPICE subckt in simulation. Reply with quote

On 11 Feb 2005 13:25:30 -0800, "engr4fun" <engr4fun@yahoo.com> wrote:

Quote:
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
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Back to top
 
Post new topic   Reply to topic    Electronics Forum Index -> Design All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Home & Living New Topics
Powered by phpBB