[SI-LIST] Re: Calling subcircuits in HSpice

  • From: nrpatel@xxxxxxxxxxx
  • To: si-list@xxxxxxxxxxxxx
  • Date: Thu, 22 Dec 2005 14:24:43 -0500

I have the subcircuit defined as
.subckt name node1 node2 node3 node4
.ends
when i call it 
X1 node1 node2 node3 node4 name

i want to be able to set node1 node2 node3 and node4 to different values

i have tried 
X1 node1=0 node2=1 node3=1 node4=1 name

but that does not work

Thanks for your help
Nikhil






Adrianna <acgalletta@xxxxxxxxx>
12/22/2005 01:59 PM
 
        To:     nrpatel@xxxxxxxxxxx
        cc: 
        Subject:        Re: [SI-LIST] Calling subcircuits in HSpice


Hi Nikhil,

Have the subcircuit defined in a separate file and put an ".include
'file' " in the main spice deck you're running. Then when you make the
subcircuit calls, you write
in your main spice deck:

x<cell1> <vss> <vdd> <net1> <net2...>
+ <cell_name>

Note:

<cell1> : call anything you like, but be sure to have 'x' in front to
denote an instance (subcircuit) call.
<nets...> : make sure you have the correct ordering of the pin
definition defined in your subcircuit and connect appropiately.
<cell_name> : must match the subcircuit name

You can call the same instance as many times you like, but have a
commented definition of the subcircuit pin definition in the main deck
for reference.

The subcircuit file, you write circuit definition but the header line
should read

.subcircuit <cell_name> <port definitions>
<main circuit>
.ends

Also, you can find this information in the hspice manual.



Good luck,

Adrianna

On 12/22/05, nrpatel@xxxxxxxxxxx <nrpatel@xxxxxxxxxxx> wrote:
> Hello all,
> I have a subcircuit defined in HSpice and i am calling it 4 times in my
> main circuit. However each time i call it i want to set input nodes to
> different values in each of the 4 subcircuits.
> I do not want to copy the subcircuit 4 times and set parameters
> individually in each subcircuit. The subcircuit is very large.
> Does anyone know a better way of handling this?
>
> Thanks and Happy Holidays to all
> Nikhil
>
>
> ------------------------------------------------------------------
> To unsubscribe from si-list:
> si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field
>
> or to administer your membership from a web page, go to:
> //www.freelists.org/webpage/si-list
>
> For help:
> si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field
>
> List FAQ wiki page is located at:
>                 http://si-list.org/wiki/wiki.pl?Si-List_FAQ
>
> List technical documents are available at:
>                 http://www.si-list.org
>
> List archives are viewable at:
>                 //www.freelists.org/archives/si-list
> or at our remote archives:
>                 http://groups.yahoo.com/group/si-list/messages
> Old (prior to June 6, 2001) list archives are viewable at:
>                 http://www.qsl.net/wb6tpu
>
>
>



------------------------------------------------------------------
To unsubscribe from si-list:
si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field

or to administer your membership from a web page, go to:
//www.freelists.org/webpage/si-list

For help:
si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field

List FAQ wiki page is located at:
                http://si-list.org/wiki/wiki.pl?Si-List_FAQ

List technical documents are available at:
                http://www.si-list.org

List archives are viewable at:     
                //www.freelists.org/archives/si-list
or at our remote archives:
                http://groups.yahoo.com/group/si-list/messages
Old (prior to June 6, 2001) list archives are viewable at:
                http://www.qsl.net/wb6tpu
  

Other related posts: