Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

About the user-defined Function in Hspice???

Status
Not open for further replies.

newhand

Member level 1
Member level 1
Joined
Dec 7, 2004
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
332
hapice user-defined function

I have read the 'user-defined' section in the star-hspice guide,but the example of
user-defined functon which is as follows seems not to work,I don't know why?
example from the hspice guide :f(a,b)=a+a*b

Does anyone know how to coustruct the function???
Help,3xs~~
 

.func hspice

Hi.
This function is about what? I have just examined the HSpice manual and I find out that if e.g. you wanna define a source voltage which has a voltage controlled by a nonLinear function of two other differential voltages (I have copied and pasted the exact words from manual):

For example, generate a voltage controlled source that gives the controlled
voltage, V(1,0), as:
V(1, 0) = 3 × V(3,2) + 4 × V(7,6)^2
To implement this function, use the following controlled source element
statement:
E1 1 0 POLY(2) 3 2 7 6 0 3 0 0 0 4
This specifies a controlled voltage source connected between nodes 1 and 0 that
is controlled by two differential voltages: the voltage difference between nodes
3 and 2 and the voltage difference between nodes 7 and 6, that is, FA=V(3,2) and
FB=V(7,6). The polynomial coefficients are P0=0, P1=3, P2=0, P3=0, P4=0,
and P5=4.

Regards,
EZT
 

hspice .func

Thanks for your telling,ezt.
But the user-defined function is the not the voltage controlled source you mentioned,it only performs the calculation using the given argument.
Such as:
f(a,b)=a*b;** "f" is the function name ,and "a,b" is argument.

Once I define the funciton ,I can use it in my netlist.
Such as:
R1 1 0 f(1,2) ***the f(1,2) will calcute the resistance value by the 1,2

I have known in the Pspice ,we can define function,like this:
.FUNC f(a,b) {a*b}

however,I don't know how to do in hspice???

Regards all~~
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top