Hints, Tips and Solutions - October 2003

New Functionality – BUS notation in SmartSpice

A new notation has been introduced into SmartSpice to allow a compact expression of a multiple bit wire buss to be used. From this expression the user can simply state the members of a wire bus he wants to generate vectors for or probe. This syntax can be used in conjunction with .SAVE .PROBE

Bus_name<n:m:i>

Bus_name[n – m - i]

Bus_name: an ASCII character string naming the set of wires. N, M, I : a positive integer number < > or [ ] : Indicates the expression to be expanded.

Syntax Num. Bit’s Expanded form
B<0:2>
3
b<0>,b<1>,b<2>
B<0:2:1>
3
b<0,1,2>
B<3:0:2>
2
b<3,1>
B<0:1,2:2>
3
b<0,1,2>

 

DATA<2,1,0> represents DATA<2>,DATA<1>, and DATA<0>

Bus Expression Expanded to the single bit level.

DATA<0:3:2> indicates a 2-bit bus containing elements DATA<0> and DATA<2>

DATA<1:3:2> indicates a 2-bit bus containing elements DATA<1> and DATA<3>

DATA<0:3> indicates a 4-bit bus containing elements DATA<0>, DATA<1>, DATA<2> and DATA<3>

DATA<2:0> indicates a 3-bit bus containing elements DATA<2> , DATA<1> and DATA<0>

The following 2 examples show how the different forms of this abbreviation for a set of bus wires can be used.

Example 1

* Test bus notation in .COMMANDS
V1 1 0 1
R1 1 bus<1> 1
R2 bus<1> bus<2> 1
R3 bus<2> bus<3> 1
R4 bus<3> bus<4> 1
R5 bus<4> 0 1
.options nomod
.tran 1n 5n
.save v(bus<1-4>)
.print v(bus<1:4>)
.print v(bus<1-4-2>)
.print v(bus<4-1-2>)
.print v(bus<1,3:4>)
.end

 

Example 2

* Test bus notation in shell commands
V1 1 0 1
R1 1 bus[1] 1
R2 bus[1] bus[2] 1
R3 bus[2] bus[3] 1
R4 bus[3] bus[4] 1
R5 bus[4] 0 1


.options nomod


.control
save v(bus[1-4])
tran 1n 5n
print v(bus[1:4])
print v(bus[1-4-2])
print v(bus[4-1-2])
print v(bus[1,3:4])


.endc


.end

 

New Functionality – NET statement

A new optional parameter OUTMODE in the .NET analysis statement was added

A new optional parameter OUTMODE=MODEL|DATA was added to NET (Small-Signal Multi-Terminal Network Analysis) statement. The parameter value ‘MODEL’ changes the format and content of the created external file, which contains S- or Y-parameter matrices. When OUTMODE=MODEL the S- or Y-parameter matrices are written as .MODEL SP statement lines, they can be included in .MODEL input statement using .INCLUDE. Default OUTMODE=DATA saves results in the external file in the previouse DATAFILE format.

Example:

File sdata.par with DATAFILE format (OUTMODE=DATA):
* N=6 FSTART=1e+09 FSTOP=1e+10
* SPACING=LINEAR MATRIX=SYMMETRIC VALTYPE=CARTESIAN
*** S - parameters DATAFILE ***
*** ======================= ***
+ 10 $$ - number of data points
*** in 1 n 1 in 2
*** RealData ImaginaryData RealData
*** --- f[0]=1.000000e+09 ----------
3.548139090830e-02 1.681117508985e-03
4.657982349517e-05 4.070485598498e-03 3.547320948755e-02 ...
3.255123897577e-05 2.361486905465e-03 4.774625207240e-05 ...
9.644822616780e-01 -7.860329805485e-03 -2.632056547515e-05 ...
-2.504703481764e-05 -1.766573638517e-03 9.644644984382e-01 ...
-2.744819175282e-05 -1.879679982283e-03 -2.640582770474e-05 ...
*** --- f[1]=2.000000e+09 ----------
3.554542140701e-02 3.360250854423e-03
1.842940723429e-04 8.132855137570e-03 3.550913774506e-02 ...
1.293936542282e-04 4.721282832777e-03 1.845192935379e-04 ...
9.643114004049e-01 -1.571913862632e-02 -9.926995728703e-05 ...
-9.875707611075e-05 -3.523037411001e-03 9.642434342675e-01 ...
-1.097405545596e-04 -3.754516558774e-03 -9.972001067792e-05 ...

.........

can be used in S-device model as:

S1 1 3 5 2 4 6 0 FQMODEL=test_Quest TYPE=s
.model test_Quest SP
+ N=6
+ FSTART=1e9 FSTOP=1e10 NI=10 SPACING=lin
+ MATRIX=SYMMETRIC VALTYPE=CARTESIAN
+ DATAFILE=sdata.par

File smodel.par with MODEL line format (OUTMODE= MODEL):

*** S - parameters DATAFILE ***
+ N=6 FSTART=1e+09 FSTOP=1e+10
+ SPACING=LINEAR MATRIX=SYMMETRIC VALTYPE=CARTESIAN
+ TYPE = S
+ DATA=(
+ 10 $$ - number of data points
22 of 91SILVACO International
*** in 1 in 1 in 2
*** RealData ImaginaryData RealData
*** --- f[0]=1.000000e+09 ---------- +
3.548139090830e-02 1.681117508985e-03 + 4.657982349517e-05 4.070485598498e-03 3.547320948755e-02 ... +
3.255123897577e-05 2.361486905465e-03 4.774625207240e-05 ... + 9.644822616780e-01 -7.860329805485e-03
-2.632056547515e-05 ... + -2.504703481764e-05 -1.766573638517e-03 9.644644984382e-01 ... + -2.744819175282e-05 -1.879679982283e-03
-2.640582770474e-05 ... *** --- f[1]=2.000000e+09 ---------- + 3.554542140701e-02 3.360250854423e-03 + 1.842940723429e-04 8.132855137570e-03
3.550913774506e-02 ... + 1.293936542282e-04 4.721282832777e-03 1.845192935379e-04 ... + 9.643114004049e-01 -1.571913862632e-02
-9.926995728703e-05 ... + -9.875707611075e-05 -3.523037411001e-03 9.642434342675e-01 ... + -1.097405545596e-04 -3.754516558774e-03
-9.972001067792e-05 ... ......... + )

can be used in S-device model as

S1 1 3 5 2 4 6 0 FQMODEL=test_Quest .model test_Quest SP .include smodel.par

 

NET Analysis

In previous versions of SMARTSPICE it was possible to specify only NET analysis specific vectors in output statements (s11, s12, .... , gamax, etc.). Now vectors that can be specified, and are not limited to NET analysis specific vectors. Expressions can be used as well.

Example:

.LET NET rh11=’real(h11)’ rh22m=’real(h22)+2’ foovec=’2+3’

.PRINT NET real(s11) rh11 rh22m rh11+rh22m foovec

 

Download pdf version of this article