Browse Source
odification to parsing function for new device model (BSIM3SOIDD). Prepended
pre-master-46
odification to parsing function for new device model (BSIM3SOIDD). Prepended
pre-master-46
23 changed files with 258 additions and 58 deletions
-
15ChangeLog
-
9DEVICES
-
8configure.in
-
2man/man1/Makefile.am
-
0man/man1/ngnutmeg.1
-
0man/man1/ngsconvert.1
-
0man/man1/ngspice.1
-
28src/Makefile.am
-
2src/include/cktdefs.h
-
0src/nghelp.c
-
0src/ngmultidec.c
-
0src/ngnutmeg.c
-
0src/ngproc2mod.c
-
0src/ngsconvert.c
-
64src/setplot
-
83src/spectrum
-
5src/spicelib/analysis/ChangeLog
-
2src/spicelib/analysis/cktsgen.c
-
1src/spicelib/devices/Makefile.am
-
52src/spicelib/devices/dev.c
-
31src/spicelib/parser/inp2m.c
-
10src/spicelib/parser/inpdomod.c
-
4src/spinit
@ -1,7 +1,7 @@ |
|||
## Process this file with automake to produce Makefile.in
|
|||
|
|||
|
|||
man_MANS = spice.1 nutmeg.1 sconvert.1 |
|||
man_MANS = ngspice.1 ngnutmeg.1 ngsconvert.1 |
|||
|
|||
EXTRA_DIST = $(man_MANS) |
|||
|
|||
|
|||
@ -0,0 +1,64 @@ |
|||
* set the current working plot |
|||
.control |
|||
|
|||
begin |
|||
unset resp |
|||
if $argc |
|||
set resp = $argv[1] |
|||
else |
|||
if $?plots = 0 |
|||
echo Error: there aren\'t any plots currently loaded. |
|||
goto bottom |
|||
else |
|||
if $#plots = 0 |
|||
echo Error: there aren\'t any plots currently loaded. |
|||
goto bottom |
|||
end |
|||
end |
|||
|
|||
if $?resp = 0 |
|||
set oldplot = $curplot |
|||
echo ' Type the name of the desired plot:' |
|||
echo '' |
|||
echo ' new New plot' |
|||
foreach pl $plots |
|||
set curplot = $pl |
|||
strcmp i $pl $oldplot |
|||
if $i = 0 |
|||
echo "Current $pl $curplottitle ({$curplotname})" |
|||
else |
|||
echo " $pl $curplottitle ({$curplotname})" |
|||
end |
|||
end |
|||
set curplot = $oldplot |
|||
echo -n '? ' |
|||
set resp = $< |
|||
end |
|||
end |
|||
|
|||
|
|||
strcmp i $resp "" |
|||
if $i = 0 |
|||
goto bottom |
|||
end |
|||
|
|||
strcmp i $resp new |
|||
if $i = 0 |
|||
set curplot = new |
|||
goto bottom |
|||
end |
|||
|
|||
foreach pl $plots |
|||
strcmp i $resp $pl |
|||
if $i = 0 |
|||
set curplot = $pl |
|||
goto bottom |
|||
end |
|||
end |
|||
|
|||
echo Error: no such plot name $resp |
|||
|
|||
label bottom |
|||
|
|||
unset resp i pl newflag oldplot |
|||
end |
|||
@ -0,0 +1,83 @@ |
|||
* Fourier Series Function for SPICE |
|||
.control |
|||
begin |
|||
if ($argc lt 4) |
|||
echo Error: Too few arguments. |
|||
echo ' 'Spectrum produces a plot containing a fourier series transformation of |
|||
echo ' 'the specified vectors |
|||
echo usage: spectrum startfreq stop step vec [[vec] ...] |
|||
goto bottom |
|||
end |
|||
|
|||
if ( time eq time ) |
|||
foreach vec $argv[4-len] |
|||
if ( $vec eq $vec ) |
|||
else |
|||
goto bottom |
|||
end |
|||
end |
|||
else |
|||
echo ' 'Spectrum can not work without a time vector from a transient analysis. |
|||
goto bottom |
|||
end |
|||
|
|||
set dt=$curplot |
|||
set title=$curplottitle |
|||
set curplot=new |
|||
set scratch=$curplot |
|||
let span={$dt}.time[length({$dt}.time)-1]-{$dt}.time[0] |
|||
if ($argv[3] gt 0.999/span) |
|||
let fpoints= ( $argv[2] - $argv[1] ) / $argv[3] +1 |
|||
if (fpoints < 2) |
|||
echo frequency start stop or step not correctly specified |
|||
goto cleanup |
|||
end |
|||
else |
|||
echo Error: time span is not long enough for a step frequency of $argv[3] Hz |
|||
goto cleanup |
|||
end |
|||
let lent = length({$dt}.time) |
|||
set lent = "$&lent" |
|||
let nyquist = {$lent}/2/span |
|||
if ($argv[2] gt nyquist) |
|||
echo Error: The nyquist limit is exceeded, try a frequency less than "$&nyquist" Hz |
|||
goto cleanup |
|||
end |
|||
set fpoints="$&fpoints" |
|||
set curplot=new |
|||
set spec=$curplot |
|||
set curplottitle=$title |
|||
set curplotname='Spectrum Analysis' |
|||
let frequency=vector( $fpoints )*$argv[3] |
|||
dowhile frequency[1] < ( $argv[1] + 1e-9 ) |
|||
let frequency = frequency + $argv[3] |
|||
end |
|||
foreach vec $argv[4-len] |
|||
let $vec = vector( $fpoints ) + j(vector( $fpoints )) |
|||
reshape $vec [{$fpoints}] |
|||
end |
|||
set curplot=$scratch |
|||
let npers=1 |
|||
let test = span-2/$argv[3] + 1e-9 |
|||
while test > 0 |
|||
let npers = npers + 1 |
|||
let test = test-1/$argv[3] |
|||
end |
|||
let ircle = 2*pi*max(-1,({$dt}.time-{$dt}.time[{$lent}-1])*{$argv[3]}/npers) |
|||
let win = 1 - cos(ircle) |
|||
let ircle = npers*ircle |
|||
let circle = ircle * ({$spec}.frequency[0]/$argv[3] - 1) |
|||
let k=vector( $fpoints ) |
|||
foreach k "$&k" |
|||
let circle = circle + ircle |
|||
foreach vec $argv[4-len] |
|||
let tmp = win*{$dt}.{$vec} |
|||
let {$spec}.{$vec}[{$k}] = 2*(mean(cos(circle)*tmp),mean(sin(circle)*tmp)) |
|||
end |
|||
end |
|||
|
|||
label cleanup |
|||
destroy $scratch |
|||
unset fpoints dt scratch spec vec k title lent |
|||
label bottom |
|||
end |
|||
@ -0,0 +1,4 @@ |
|||
* Standard spice and nutmeg init file |
|||
alias exit quit |
|||
alias acct rusage all |
|||
set x11lineararcs |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue