summaryrefslogtreecommitdiff
path: root/data_structures_correct/MCLOCK_f.js
diff options
context:
space:
mode:
authorChhavi22082016-08-18 23:18:28 +0530
committerChhavi22082016-08-18 23:18:28 +0530
commitce0ad4379d21420c90f1c342ece4966e31e3a554 (patch)
tree746798019c4454b1ec6d3d0ff130be0ba827989e /data_structures_correct/MCLOCK_f.js
parent8ab779b352f17689093605526770519944b64814 (diff)
downloadxcos-on-web-ce0ad4379d21420c90f1c342ece4966e31e3a554.tar.gz
xcos-on-web-ce0ad4379d21420c90f1c342ece4966e31e3a554.tar.bz2
xcos-on-web-ce0ad4379d21420c90f1c342ece4966e31e3a554.zip
JKFLIPFLOP
Diffstat (limited to 'data_structures_correct/MCLOCK_f.js')
-rw-r--r--data_structures_correct/MCLOCK_f.js128
1 files changed, 128 insertions, 0 deletions
diff --git a/data_structures_correct/MCLOCK_f.js b/data_structures_correct/MCLOCK_f.js
new file mode 100644
index 0000000..41ea0a7
--- /dev/null
+++ b/data_structures_correct/MCLOCK_f.js
@@ -0,0 +1,128 @@
+function MCLOCK_f () {
+
+ MCLOCK_f.prototype.define = function MCLOCK_f() {
+ this.nn = 2;
+ this.dt = 0.1;
+ var exprs = new ScilabString([this.dt],[this.nn]);
+
+ var mfclck = new MFCLCK_f().internal();
+ mfclck.graphics.orig = new ScilabDouble([334,199]);
+ mfclck.graphics.sz = new ScilabDouble([40,40]);
+ mfclck.graphics.flip = new ScilabBoolean([true]);
+ mfclck.graphics.exprs=exprs;
+ mfclck.graphics.pein = new ScilabDouble([12]);
+ mfclck.graphics.peout = new ScilabDouble([4],[3]);
+ mfclck.model.rpar = new ScilabDouble([0.1]);
+ mfclck.model.ipar=new ScilabDouble([this.nn]);
+ mfclck.model.firing = new ScilabDouble([-1,0]);
+
+ var clksom = new CLKSOM_f().internal();
+ clksom.graphics.orig = new ScilabDouble([457,161]);
+ clksom.graphics.sz = new ScilabDouble([16.666667,16.666667]);
+ clksom.graphics.flip = new ScilabBoolean([true]);
+ clksom.graphics.exprs = new ScilabString(["0.1"],["0.1"]);
+ clksom.graphics.pein = new ScilabDouble([4],[9],[0]);
+ clksom.graphics.peout = new ScilabDouble([5]);
+
+ var output_port1 = new CLKOUT_f().internal();
+ output_port1.graphics.orig = new ScilabDouble([509,261]);
+ output_port1.graphics.sz = new ScilabDouble([20,20]);
+ output_port1.graphics.flip = new ScilabBoolean([true]);
+ output_port1.graphics.exprs = new ScilabString(["1"]);
+ output_port1.graphics.pein = new ScilabDouble([10]);
+ output_port1.model.ipar = new ScilabDouble([1]);
+
+ var output_port2 = new CLKOUT_f().internal();
+ output_port2.graphics.orig = new ScilabDouble([509,142]);
+ output_port2.graphics.sz = new ScilabDouble([20,20]);
+ output_port2.graphics.flip = new ScilabBoolean([true]);
+ output_port2.graphics.exprs = new ScilabString(["2"]);
+ output_port2.graphics.pein = new ScilabDouble([13]);
+ output_port2.model.ipar = new ScilabDouble([2]);
+
+ var split1 = new CLKSPLIT_f().internal();
+ split1.graphics.orig = new ScilabDouble([411.92504],[169.33333]);
+ split1.graphics.pein = new ScilabDouble([3]);
+ split1.graphics.peout = new ScilabDouble([9],[10]);
+
+ var split2 = new CLKSPLIT_f().internal();
+ split2.graphics.orig = new ScilabDouble([482.45315],[169.33333]);
+ split2.graphics.pein = new ScilabDouble([5]);
+ split2.graphics.peout = new ScilabDouble([12],[13]);
+
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),"MCLOCK_f",sz(1),sz(2));"]);
+
+ var diagram = scicos_diagram();
+ diagram.objs.push(mfclck);
+ diagram.objs.push(clksom);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([360.7],[360.7],[411.9]),
+ yy: new ScilabDouble([193.3],[169.3],[169.3]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([1,2]),
+ to: new ScilabDouble([8,1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([347.3],[347.3],[461.8],[461.8]),
+ yy: new ScilabDouble([193.3],[155.5],[155.5],[161]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([1,1]),
+ to: new ScilabDouble([2,1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([468.9],[482.5]),
+ yy: new ScilabDouble([169.3],[169.3]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([2,1]),
+ to: new ScilabDouble([11,1])
+ }));
+
+ diagram.objs.push(output_port1);
+ diagram.objs.push(output_port2);
+ diagram.objs.push(split1);
+
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([411.9],[457]),
+ yy: new ScilabDouble([169.3],[169.3]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([8,1]),
+ to: new ScilabDouble([2,2])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([411.9],[411.9],[509]),
+ yy: new ScilabDouble([169.3],[271],[271]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([8,2]),
+ to: new ScilabDouble([6,1])
+ }));
+ diagram.objs.push(split2);
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([482.5],[489.6],[489.6],[354],[354]),
+ yy: new ScilabDouble([169.3],[169.3],[338.3],[338.3],[244.7]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([11,1]),
+ to: new ScilabDouble([1,1])
+ }));
+ diagram.objs.push(scicos_link({
+ xx: new ScilabDouble([482.4],[482.4],[509]),
+ yy: new ScilabDouble([169.3],[152],[152]),
+ ct: new ScilabDouble([10,-1]),
+ from: new ScilabDouble([11,2]),
+ to: new ScilabDouble([7,1])
+ }));
+
+ this.x=scicos_block();
+ this.x.gui = new ScilabString(["MCLOCK_f"]);
+ this.x.graphics.sz = new ScilabDouble([3,2]);
+ this.x.graphics.gr_i=gr_i;
+ this.x.model.sim = new ScilabString(["csuper"]);
+ this.x.model.evtout = new ScilabDouble([1],[1]);
+ this.x.model.blocktype = new ScilabString(["h"]);
+ this.x.model.rpar=diagram;
+ this.x.graphics.peout = new ScilabDouble([0],[0]);
+ return new BasicBlock(this.x);
+ }
+ MCLOCK_f.prototype.details = function MCLOCK_f() {
+ return this.x;
+ }
+}