Forums

Sub circuit in Ltspice.

Started by Jamie October 6, 2012
  If I create a sub circuit in LTspice, will that circuit's content be
exported with the main file or do I need to include that along with the
file?
   I read the help file but it some what does not give me a fuzzy feeling..

Jamie

Jamie wrote:
> If I create a sub circuit in LTspice, will that circuit's content be > exported with the main file or do I need to include that along with the > file? > I read the help file but it some what does not give me a fuzzy feeling.. >
If you place the whole subcircuit text into your schematic as a SPICE directive then it is included. That's how I always do it. Typically to the left or below so clients have a choice of printing it out along with the schematic or not. Much better than needing two files or having to load library parts. -- Regards, Joerg http://www.analogconsultants.com/
On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid>
wrote:

>Jamie wrote: >> If I create a sub circuit in LTspice, will that circuit's content be >> exported with the main file or do I need to include that along with the >> file? >> I read the help file but it some what does not give me a fuzzy feeling.. >> > >If you place the whole subcircuit text into your schematic as a SPICE >directive then it is included. That's how I always do it. Typically to >the left or below so clients have a choice of printing it out along with >the schematic or not. > >Much better than needing two files or having to load library parts.
What Joerg suggests is the equivalent of .INCLUDE in other Spice's. Slows down the loading of the input file. .LIB is faster and more efficient. ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson wrote:
> On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid> > wrote: > >> Jamie wrote: >>> If I create a sub circuit in LTspice, will that circuit's content be >>> exported with the main file or do I need to include that along with the >>> file? >>> I read the help file but it some what does not give me a fuzzy feeling.. >>> >> If you place the whole subcircuit text into your schematic as a SPICE >> directive then it is included. That's how I always do it. Typically to >> the left or below so clients have a choice of printing it out along with >> the schematic or not. >> >> Much better than needing two files or having to load library parts. > > What Joerg suggests is the equivalent of .INCLUDE in other Spice's. > Slows down the loading of the input file. .LIB is faster and more > efficient. >
What I meant is .SUBCKT in the input file. I've never had any speed issues, they load in a second or two. What does take forever is sims with gapped transformers in there, leakage inductance and all that. And then the office temp start to rise and rise and rise. I've got an Intel 1.6GHz dual core in there. Rumors have it that the Intel i7 could be almost twice as fast. Have you heard and confirmations in that direction? -- Regards, Joerg http://www.analogconsultants.com/
On Sun, 07 Oct 2012 09:16:33 -0700, Joerg <invalid@invalid.invalid>
wrote:

>Jim Thompson wrote: >> On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid> >> wrote: >> >>> Jamie wrote: >>>> If I create a sub circuit in LTspice, will that circuit's content be >>>> exported with the main file or do I need to include that along with the >>>> file? >>>> I read the help file but it some what does not give me a fuzzy feeling.. >>>> >>> If you place the whole subcircuit text into your schematic as a SPICE >>> directive then it is included. That's how I always do it. Typically to >>> the left or below so clients have a choice of printing it out along with >>> the schematic or not. >>> >>> Much better than needing two files or having to load library parts. >> >> What Joerg suggests is the equivalent of .INCLUDE in other Spice's. >> Slows down the loading of the input file. .LIB is faster and more >> efficient. >> > >What I meant is .SUBCKT in the input file.
OK. I misread your intent. That's equivalent to a .LIB call... only what you need is loaded.
>I've never had any speed >issues, they load in a second or two. What does take forever is sims >with gapped transformers in there, leakage inductance and all that. And >then the office temp start to rise and rise and rise.
Heats my office in winter ;-)
> >I've got an Intel 1.6GHz dual core in there.
That's what I have in my notebook (Thinkpad X61s): 1.60 GHz Intel Core2 Duo. It runs slower than my old Win2K machine (Analog3) with a 2.20GHz AMD Athlon 64 and only 1G of RAM :-)
>Rumors have it that the >Intel i7 could be almost twice as fast. Have you heard and confirmations >in that direction?
Since Analog1 (also 2.20GHz AMD Athlon 64, but WinXP Pro) crashed and burned, I'm pondering what to replace it with. Mark/qrk is the resident expert on benchmarking. There's so much Intel malarkey out there, it's difficult to know what would be best for a simulation machine. ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson wrote:
> > On Sun, 07 Oct 2012 09:16:33 -0700, Joerg <invalid@invalid.invalid> > wrote: > > >Jim Thompson wrote: > >> On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid> > >> wrote: > >> > >>> Jamie wrote: > >>>> If I create a sub circuit in LTspice, will that circuit's content be > >>>> exported with the main file or do I need to include that along with the > >>>> file? > >>>> I read the help file but it some what does not give me a fuzzy feeling.. > >>>> > >>> If you place the whole subcircuit text into your schematic as a SPICE > >>> directive then it is included. That's how I always do it. Typically to > >>> the left or below so clients have a choice of printing it out along with > >>> the schematic or not. > >>> > >>> Much better than needing two files or having to load library parts. > >> > >> What Joerg suggests is the equivalent of .INCLUDE in other Spice's. > >> Slows down the loading of the input file. .LIB is faster and more > >> efficient. > >> > > > >What I meant is .SUBCKT in the input file. > > OK. I misread your intent. That's equivalent to a .LIB call... only > what you need is loaded. > > >I've never had any speed > >issues, they load in a second or two. What does take forever is sims > >with gapped transformers in there, leakage inductance and all that. And > >then the office temp start to rise and rise and rise. > > Heats my office in winter ;-) > > > > >I've got an Intel 1.6GHz dual core in there. > > That's what I have in my notebook (Thinkpad X61s): 1.60 GHz Intel > Core2 Duo. It runs slower than my old Win2K machine (Analog3) with a > 2.20GHz AMD Athlon 64 and only 1G of RAM :-) > > >Rumors have it that the > >Intel i7 could be almost twice as fast. Have you heard and confirmations > >in that direction? > > Since Analog1 (also 2.20GHz AMD Athlon 64, but WinXP Pro) crashed and > burned, I'm pondering what to replace it with. Mark/qrk is the > resident expert on benchmarking. There's so much Intel malarkey out > there, it's difficult to know what would be best for a simulation > machine. >
My main office machine is a nice Supermicro dual 8-core AMD Magny Cours with 32G of RAM and a nice RAID5 disc array. I bought it about a year ago for a bit under $4k. It runs CentOS 6.2 Linux, with kvm/qemu virtual machines for XP/32 and Win7/64. LTspice flies. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net
On Sun, 07 Oct 2012 10:18:16 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

> >Since Analog1 (also 2.20GHz AMD Athlon 64, but WinXP Pro) crashed and >burned, I'm pondering what to replace it with. Mark/qrk is the >resident expert on benchmarking. There's so much Intel malarkey out >there, it's difficult to know what would be best for a simulation >machine. > > ...Jim Thompson
My cheap i3 laptop would sim circles around those, so $400. You could likely get an ATOM that would do it pretty fast too. Can't beat Costco sometimes. But better and cheaper is already out there too. Kinda wished I'd waited. But if you want *the best*, splurge and build your own machine with a new LG2011 socket W79 motherboard, and a superior EVGA vid card. It takes a while to build the box, PS, and get your HDs and Disc drives and fans first. THEN get the MOBO, CPU, and RAM. They get cheaper over time, so you buy those last. A good, hot, cutting edge build starts at around $2k and goes up from there. A dual Xeon could run $3k each just for the processors. Those build do hold *some* of their value though. My Atom runs circles around my old 486 EISA though, and I thought that was a hot box, and my Atom is a full computer for $300.
On Sun, 07 Oct 2012 13:26:48 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>Jim Thompson wrote: >> >> On Sun, 07 Oct 2012 09:16:33 -0700, Joerg <invalid@invalid.invalid> >> wrote: >> >> >Jim Thompson wrote: >> >> On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid> >> >> wrote: >> >> >> >>> Jamie wrote: >> >>>> If I create a sub circuit in LTspice, will that circuit's content be >> >>>> exported with the main file or do I need to include that along with the >> >>>> file? >> >>>> I read the help file but it some what does not give me a fuzzy feeling.. >> >>>> >> >>> If you place the whole subcircuit text into your schematic as a SPICE >> >>> directive then it is included. That's how I always do it. Typically to >> >>> the left or below so clients have a choice of printing it out along with >> >>> the schematic or not. >> >>> >> >>> Much better than needing two files or having to load library parts. >> >> >> >> What Joerg suggests is the equivalent of .INCLUDE in other Spice's. >> >> Slows down the loading of the input file. .LIB is faster and more >> >> efficient. >> >> >> > >> >What I meant is .SUBCKT in the input file. >> >> OK. I misread your intent. That's equivalent to a .LIB call... only >> what you need is loaded. >> >> >I've never had any speed >> >issues, they load in a second or two. What does take forever is sims >> >with gapped transformers in there, leakage inductance and all that. And >> >then the office temp start to rise and rise and rise. >> >> Heats my office in winter ;-) >> >> > >> >I've got an Intel 1.6GHz dual core in there. >> >> That's what I have in my notebook (Thinkpad X61s): 1.60 GHz Intel >> Core2 Duo. It runs slower than my old Win2K machine (Analog3) with a >> 2.20GHz AMD Athlon 64 and only 1G of RAM :-) >> >> >Rumors have it that the >> >Intel i7 could be almost twice as fast. Have you heard and confirmations >> >in that direction? >> >> Since Analog1 (also 2.20GHz AMD Athlon 64, but WinXP Pro) crashed and >> burned, I'm pondering what to replace it with. Mark/qrk is the >> resident expert on benchmarking. There's so much Intel malarkey out >> there, it's difficult to know what would be best for a simulation >> machine. >> > >My main office machine is a nice Supermicro dual 8-core AMD Magny Cours >with 32G of RAM and a nice RAID5 disc array. I bought it about a year >ago for a bit under $4k. It runs CentOS 6.2 Linux, with kvm/qemu >virtual machines for XP/32 and Win7/64. > >LTspice flies. > >Cheers > >Phil Hobbs
It isn't "nice" if it doesn't have USB 3. also needs SATA 3, cause RAID 5 on the old interface spec is no gain. $4k??? Supermicro saw you coming. Or the guy you got to build it for you. I'd go with an EVGA dual XEOM MOBO and fill it with 6 or 12 way (core pairs). Put all my money into the CPUs and MOBO. AMD mobos are all taking a hit these days, mainly because the idiots embraced and bought ATI. Supermicro makes dual CPU mobos. Oh boy. They have always been hugely overpriced and underfunctioned. EVGA makes MODERN dual CPU motherboards. Supermicro is like Dell. It is two year old technology the moment you buy it. With this, even more than 2 years. And the price difference is small enough that I stopped buying AMD 8 years ago. Intel Mobos and CPUs scream.
TheQuickBrownFox wrote:
> > On Sun, 07 Oct 2012 13:26:48 -0400, Phil Hobbs > <pcdhSpamMeSenseless@electrooptical.net> wrote: > > >Jim Thompson wrote: > >> > >> On Sun, 07 Oct 2012 09:16:33 -0700, Joerg <invalid@invalid.invalid> > >> wrote: > >> > >> >Jim Thompson wrote: > >> >> On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid> > >> >> wrote: > >> >> > >> >>> Jamie wrote: > >> >>>> If I create a sub circuit in LTspice, will that circuit's content be > >> >>>> exported with the main file or do I need to include that along with the > >> >>>> file? > >> >>>> I read the help file but it some what does not give me a fuzzy feeling.. > >> >>>> > >> >>> If you place the whole subcircuit text into your schematic as a SPICE > >> >>> directive then it is included. That's how I always do it. Typically to > >> >>> the left or below so clients have a choice of printing it out along with > >> >>> the schematic or not. > >> >>> > >> >>> Much better than needing two files or having to load library parts. > >> >> > >> >> What Joerg suggests is the equivalent of .INCLUDE in other Spice's. > >> >> Slows down the loading of the input file. .LIB is faster and more > >> >> efficient. > >> >> > >> > > >> >What I meant is .SUBCKT in the input file. > >> > >> OK. I misread your intent. That's equivalent to a .LIB call... only > >> what you need is loaded. > >> > >> >I've never had any speed > >> >issues, they load in a second or two. What does take forever is sims > >> >with gapped transformers in there, leakage inductance and all that. And > >> >then the office temp start to rise and rise and rise. > >> > >> Heats my office in winter ;-) > >> > >> > > >> >I've got an Intel 1.6GHz dual core in there. > >> > >> That's what I have in my notebook (Thinkpad X61s): 1.60 GHz Intel > >> Core2 Duo. It runs slower than my old Win2K machine (Analog3) with a > >> 2.20GHz AMD Athlon 64 and only 1G of RAM :-) > >> > >> >Rumors have it that the > >> >Intel i7 could be almost twice as fast. Have you heard and confirmations > >> >in that direction? > >> > >> Since Analog1 (also 2.20GHz AMD Athlon 64, but WinXP Pro) crashed and > >> burned, I'm pondering what to replace it with. Mark/qrk is the > >> resident expert on benchmarking. There's so much Intel malarkey out > >> there, it's difficult to know what would be best for a simulation > >> machine. > >> > > > >My main office machine is a nice Supermicro dual 8-core AMD Magny Cours > >with 32G of RAM and a nice RAID5 disc array. I bought it about a year > >ago for a bit under $4k. It runs CentOS 6.2 Linux, with kvm/qemu > >virtual machines for XP/32 and Win7/64. > > > >LTspice flies. > > > >Cheers > > > >Phil Hobbs > > It isn't "nice" if it doesn't have USB 3. also needs SATA 3, cause RAID > 5 on the old interface spec is no gain. > > $4k??? Supermicro saw you coming. Or the guy you got to build it for > you. > > I'd go with an EVGA dual XEOM MOBO and fill it with 6 or 12 way (core > pairs). Put all my money into the CPUs and MOBO. AMD mobos are all > taking a hit these days, mainly because the idiots embraced and bought > ATI. > > Supermicro makes dual CPU mobos. Oh boy. They have always been hugely > overpriced and underfunctioned. > > EVGA makes MODERN dual CPU motherboards. Supermicro is like Dell. It > is two year old technology the moment you buy it. With this, even more > than 2 years. > > And the price difference is small enough that I stopped buying AMD 8 > years ago. Intel Mobos and CPUs scream.
How much heavy duty floating point do you do in a day? Have you done any actual benchmarks for floating point performance between Intel and AMD? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net http://electrooptical.net
On Sun, 07 Oct 2012 16:09:14 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>TheQuickBrownFox wrote: >> >> On Sun, 07 Oct 2012 13:26:48 -0400, Phil Hobbs >> <pcdhSpamMeSenseless@electrooptical.net> wrote: >> >> >Jim Thompson wrote: >> >> >> >> On Sun, 07 Oct 2012 09:16:33 -0700, Joerg <invalid@invalid.invalid> >> >> wrote: >> >> >> >> >Jim Thompson wrote: >> >> >> On Sun, 07 Oct 2012 07:29:30 -0700, Joerg <invalid@invalid.invalid> >> >> >> wrote: >> >> >> >> >> >>> Jamie wrote: >> >> >>>> If I create a sub circuit in LTspice, will that circuit's content be >> >> >>>> exported with the main file or do I need to include that along with the >> >> >>>> file? >> >> >>>> I read the help file but it some what does not give me a fuzzy feeling.. >> >> >>>> >> >> >>> If you place the whole subcircuit text into your schematic as a SPICE >> >> >>> directive then it is included. That's how I always do it. Typically to >> >> >>> the left or below so clients have a choice of printing it out along with >> >> >>> the schematic or not. >> >> >>> >> >> >>> Much better than needing two files or having to load library parts. >> >> >> >> >> >> What Joerg suggests is the equivalent of .INCLUDE in other Spice's. >> >> >> Slows down the loading of the input file. .LIB is faster and more >> >> >> efficient. >> >> >> >> >> > >> >> >What I meant is .SUBCKT in the input file. >> >> >> >> OK. I misread your intent. That's equivalent to a .LIB call... only >> >> what you need is loaded. >> >> >> >> >I've never had any speed >> >> >issues, they load in a second or two. What does take forever is sims >> >> >with gapped transformers in there, leakage inductance and all that. And >> >> >then the office temp start to rise and rise and rise. >> >> >> >> Heats my office in winter ;-) >> >> >> >> > >> >> >I've got an Intel 1.6GHz dual core in there. >> >> >> >> That's what I have in my notebook (Thinkpad X61s): 1.60 GHz Intel >> >> Core2 Duo. It runs slower than my old Win2K machine (Analog3) with a >> >> 2.20GHz AMD Athlon 64 and only 1G of RAM :-) >> >> >> >> >Rumors have it that the >> >> >Intel i7 could be almost twice as fast. Have you heard and confirmations >> >> >in that direction? >> >> >> >> Since Analog1 (also 2.20GHz AMD Athlon 64, but WinXP Pro) crashed and >> >> burned, I'm pondering what to replace it with. Mark/qrk is the >> >> resident expert on benchmarking. There's so much Intel malarkey out >> >> there, it's difficult to know what would be best for a simulation >> >> machine. >> >> >> > >> >My main office machine is a nice Supermicro dual 8-core AMD Magny Cours >> >with 32G of RAM and a nice RAID5 disc array. I bought it about a year >> >ago for a bit under $4k. It runs CentOS 6.2 Linux, with kvm/qemu >> >virtual machines for XP/32 and Win7/64. >> > >> >LTspice flies. >> > >> >Cheers >> > >> >Phil Hobbs >> >> It isn't "nice" if it doesn't have USB 3. also needs SATA 3, cause RAID >> 5 on the old interface spec is no gain. >> >> $4k??? Supermicro saw you coming. Or the guy you got to build it for >> you. >> >> I'd go with an EVGA dual XEOM MOBO and fill it with 6 or 12 way (core >> pairs). Put all my money into the CPUs and MOBO. AMD mobos are all >> taking a hit these days, mainly because the idiots embraced and bought >> ATI. >> >> Supermicro makes dual CPU mobos. Oh boy. They have always been hugely >> overpriced and underfunctioned. >> >> EVGA makes MODERN dual CPU motherboards. Supermicro is like Dell. It >> is two year old technology the moment you buy it. With this, even more >> than 2 years. >> >> And the price difference is small enough that I stopped buying AMD 8 >> years ago. Intel Mobos and CPUs scream. > > > >How much heavy duty floating point do you do in a day? Have you done >any actual benchmarks for floating point performance between Intel and >AMD? > > >Cheers > >Phil Hobbs
Yup. The real test is simulation. Intel runs all over AMD with toy apps. AMD kills Intel when it comes to Spice. ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.