User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Any hspice gurus here? Page [1]  
Fail Boat
Suspended
3567 Posts
user info
edit post

So, when I went through undergrad, I got paired up with a guy that loved spice and decided if I wanted to do all the physical parts of the lab and measurements, he would do all the spice work. This was after I snoozed through a spice lecture or two and was bored to death having to work with him on trying to figure it out. So, I have a hole in my education when it comes to spice. Now I am having to use it again and wondering if anyone here can short circuit my manual reading.

This is a basic working program we got to check our hspice install, and it works for me

LCLINE    *  Test Program
*
* R.J. Evans 5/11/00
*
*
*
* Example 5.3.2 T-Line Segment Variations
*
*
*
.SUBCKT XTMODEL 11 12
* Case 1 RLC segments
L1 11 15 25NH
L2 15 12 25NH
C 15 0 10PF
*
.ENDS XTMODEL
*
*
* Main program
*
*
XLINE0 100 180 XTMODEL
*
* Dummy Resistor for end of line open
*
RT 180 0 100meg
*
* Excitation
*
* Vstart Vend delay Tr Tf PW Period
VIN 90 0 PULSE( 0 1 0PS .2NS .2NS 20NS 40NS)
*
* Source Resistance
*
RS 90 100 70.7
*
*
.OPTIONS POST=2 PROBE TNOM=25 DELMAX=2PS RMIN=1E-12 BRIEF NOMOD
.TRAN 100PS 8NS
.WIDTH OUT=80
.PLOT TRAN V(180) V(100) (0. ,1. )
.PRINT TRAN V(180) V(100)
.END LCLINE

From the little bit of reading I've done, I get the gist with all the nodes. We're putting in a 1V pulse into node 90 which is a 70.7 ohm resistor, its output node 100 us connected to XLINE (transmission line) which has as external nodes 180 and the subcircuit XTMODEL. Hung off of the end of the transmission line at node 180 we have another resistor of 100megohm to ground.

What I am trying to figure out is how the subcircuit XTMODEL is connected or a part of this simulation as I see no where that nodes 11, 12, and 15 connect to anything. I tried commenting the .SUBCKT block out as well as removing XTMODEL from the XLINE statement and I get an error.

It makes since that this transmission line can have these L and C segments, but I can't see how this is is intuitive to the transmission line via the spice.

6/10/2009 4:43:51 PM

Fail Boat
Suspended
3567 Posts
user info
edit post

Just took a little reading

http://www.5spice.com/Subckts.htm

Quote :
" Calling your Subcircuit

In schematic based simulators like 5Spice, the schematic symbol automatically calls the subcircuit linked to the symbol. If you are using traditional Spice or calling a subcircuit from another subcircuit, write the call as follows:

X Node1 Node2 Node3 ... SubName

example: Xamp 5 4 2 ACamplifier

The identifier must start with the letter X. SubName is the subcircuit's name. Node identifiers Node1, Node2, etc. are the node numbers/names in the calling circuit that connect to the subcircuit. The number of nodes on the call line must match the number listed in the .subckt line of SubName. Spice connects the nodes from the call line to the subcircuit in the order they are listed."


[Edited on June 10, 2009 at 5:21 PM. Reason : .]

6/10/2009 5:20:50 PM

evan
All American
27701 Posts
user info
edit post

duh, my little sister could have told you that node identifiers Node1, Node2, etc. are the node numbers/names in the calling circuit that connect to the subcircuit.

6/10/2009 5:34:16 PM

Fail Boat
Suspended
3567 Posts
user info
edit post

Yeah, it would have been infinitely more intuitive if the call from XLINE0 would have been

XLINE0 XTMODEL(100,180)

This would have immediately flagged as parameter passing in my head.

6/10/2009 5:45:53 PM

 Message Boards » Tech Talk » Any hspice gurus here? Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.