diff options
Diffstat (limited to 'js/Electrical/PMOS.js')
-rw-r--r-- | js/Electrical/PMOS.js | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js index 0f01116c..4a314521 100644 --- a/js/Electrical/PMOS.js +++ b/js/Electrical/PMOS.js @@ -24,29 +24,30 @@ function PMOS() { model.out = ones(size(mo.outputs,"*"),1); exprs = [[string(W)],[string(L)],[string(Beta)],[string(Vt)],[string(K2)],[string(K5)],[string(dW)],[string(dL)],[string(RDS)]]; gr_i = []; - x = standard_define([2,2],model,exprs,gr_i); - x.graphics.in_implicit = ["I"]; - x.graphics.out_implicit = [["I"],["I"],["I"]]; + this.x = standard_define([2,2],model,exprs,gr_i); + this.x.graphics.in_implicit = ["I"]; + this.x.graphics.out_implicit = [["I"],["I"],["I"]]; } PMOS.prototype.details = function PMOS() { + return this.x; } PMOS.prototype.get = function PMOS() { } PMOS.prototype.set = function PMOS() { - x = arg1; + this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",[["Width [m]"],["Length [m]"],["Transconductance parameter [A/(V*V)]"],["Zero bias threshold voltage [V]"],["Bulk threshold parameter"],["Reduction of pinch-off region"],["Narrowing of channel [m]"],["Shortening of channel [m]"],["Drain-Source-Resistance [Ohm]"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); - if (!ok) { -break; -} - model.equations.parameters[2-1] = list(W,L,Beta,Vt,K2,K5,dW,dL,RDS); - graphics.exprs = exprs; - x.graphics = graphics; - x.model = model; -break; -} + [ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs] = scicos_getvalue("Set PMOS Transistor parameters",[["Width [m]"],["Length [m]"],["Transconductance parameter [A/(V*V)]"],["Zero bias threshold voltage [V]"],["Bulk threshold parameter"],["Reduction of pinch-off region"],["Narrowing of channel [m]"],["Shortening of channel [m]"],["Drain-Source-Resistance [Ohm]"]],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); + if (!ok) { + break; + } + model.equations.parameters[2-1] = list(W,L,Beta,Vt,K2,K5,dW,dL,RDS); + graphics.exprs = exprs; + this.x.graphics = graphics; + this.x.model = model; + break; + } } } |