summaryrefslogtreecommitdiff
path: root/data_structures/NMOS.js
blob: 8e5c23e557eeaea5befaadf82665fc1313fcf2a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function NMOS () {


	var model = scicos_model();

	var W = 20.e-6;

	var L = 6.e-6;

	var Beta = 0.041e-3;

	var Vt = 0.8;

	var K2 = 1.144;

	var K5 = 0.7311;

	var dW = -2.5e-6;

	var dL = -1.5e-6;

	var RDS = 1.e+7;
	model.sim = new ScilabString(["NMOS"]);
	model.blocktype = new ScilabString(["c"]);
	model.dep_ut = new ScilabBoolean([true,false]);

	var mo = modelica();
	mo.model = new ScilabString(["NMOS"]);
	mo.outputs = new ScilabString(["D";"B";"S"]);
	mo.inputs = new ScilabString(["G"]);
	mo.parameters=list(["W";"L";"Beta";"Vt";"K2";"K5";"dW";"dL";"RDS"],[W],[L],[Beta],[Vt],[K2],[K5],[dW],[dL],[RDS]);
	model.equations=mo;
	model.in=ones(size(mo.inputs,"*"),1);
	model.out=ones(size(mo.outputs,"*"),1);

	var exprs = [[W.toString()],[L.toString()],[Beta.toString()],[Vt.toString()],[K2.toString()],[K5.toString()],[dW.toString()],[dL.toString()],[RDS.toString()]];

	var gr_i = [];
	this.x=new standard_define(new ScilabDouble([2,2]),model,exprs,gr_i);
	this.x.graphics.in_implicit = new ScilabString(["I"]);
	this.x.graphics.out_implicit = new ScilabString(["I";"I";"I"]);
}