diff options
Diffstat (limited to 'js/IntegerOp')
-rw-r--r-- | js/IntegerOp/BITCLEAR.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/BITCLEAR.pickle | 40 | ||||
-rw-r--r-- | js/IntegerOp/BITSET.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/BITSET.pickle | 40 | ||||
-rw-r--r-- | js/IntegerOp/CONVERT.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/CONVERT.pickle | 44 | ||||
-rw-r--r-- | js/IntegerOp/DFLIPFLOP.js | 3 | ||||
-rw-r--r-- | js/IntegerOp/DFLIPFLOP.pickle | 50 | ||||
-rw-r--r-- | js/IntegerOp/DLATCH.js | 3 | ||||
-rw-r--r-- | js/IntegerOp/DLATCH.pickle | 52 | ||||
-rw-r--r-- | js/IntegerOp/EXTRACTBITS.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/EXTRACTBITS.pickle | 62 | ||||
-rw-r--r-- | js/IntegerOp/INTMUL.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/INTMUL.pickle | 58 | ||||
-rw-r--r-- | js/IntegerOp/JKFLIPFLOP.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/JKFLIPFLOP.pickle | 38 | ||||
-rw-r--r-- | js/IntegerOp/LOGIC.js | 5 | ||||
-rw-r--r-- | js/IntegerOp/LOGIC.pickle | 64 | ||||
-rw-r--r-- | js/IntegerOp/SHIFT.js | 5 | ||||
-rw-r--r-- | js/IntegerOp/SHIFT.pickle | 20 | ||||
-rw-r--r-- | js/IntegerOp/SRFLIPFLOP.js | 7 | ||||
-rw-r--r-- | js/IntegerOp/SRFLIPFLOP.pickle | 30 |
22 files changed, 265 insertions, 298 deletions
diff --git a/js/IntegerOp/BITCLEAR.js b/js/IntegerOp/BITCLEAR.js index 0b74931f..0689e2f5 100644 --- a/js/IntegerOp/BITCLEAR.js +++ b/js/IntegerOp/BITCLEAR.js @@ -3,7 +3,7 @@ function BITCLEAR() { BITCLEAR.prototype.define = function BITCLEAR() { this.model = scicos_model(); this.model.sim = list(new ScilabString(["bit_clear_32"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([1]); + this.model.in = new ScilabDouble([1]); this.model.in2 = new ScilabDouble([1]); this.model.out = new ScilabDouble([1]); this.model.out2 = new ScilabDouble([1]); @@ -31,16 +31,13 @@ function BITCLEAR() { this.Datatype = arguments[0]["Datatype"] this.bit = parseFloat(arguments[0]["bit"]) this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; this.exprs = this.graphics.exprs; - this.model = arg1.model; while (true) { [ok,this.Datatype,this.bit,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITCLEAR")],[" "],["Clear a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),this.exprs); if (!ok) { break; } - var in1 = [this.model.in1,this.model.in2]; + var in1 = [this.model.in,this.model.in2]; if (floor(this.bit)!=this.bit) { block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer."); var ok = false; diff --git a/js/IntegerOp/BITCLEAR.pickle b/js/IntegerOp/BITCLEAR.pickle index c8ab7e1e..b1c2bf88 100644 --- a/js/IntegerOp/BITCLEAR.pickle +++ b/js/IntegerOp/BITCLEAR.pickle @@ -31,37 +31,37 @@ p4 NsS'x.model' p5 g2 -sS'model.intyp' +sS'model.out' p6 S'double' p7 -sS'model.out' -p8 -g7 sS'out' -p9 +p8 S'vector' -p10 +p9 sS'model.in2' -p11 +p10 g7 -sS'model.in1' -p12 +sS'model.intyp' +p11 g7 sS'x.graphics' -p13 +p12 g2 sS'model.sim' -p14 +p13 S'list' -p15 +p14 sS'model.out2' -p16 +p15 g7 sS'in1' -p17 -g10 +p16 +g9 sS'model.outtyp' +p17 +g7 +sS'model.in' p18 g7 sS'graphics.exprs' @@ -71,10 +71,10 @@ p20 g7 sS'typ' p21 -g10 +g9 sS'model.opar' p22 -g15 +g14 sS'ok' p23 S'boolean' @@ -85,7 +85,7 @@ S'string' p26 sS'model.dep_ut' p27 -g10 +g9 sS'n' p28 g7 @@ -95,10 +95,10 @@ S'matrix' p30 sS'gr_i' p31 -g10 +g9 sS'y' p32 -g10 +g9 sS'x' p33 g7 diff --git a/js/IntegerOp/BITSET.js b/js/IntegerOp/BITSET.js index 920214d1..e6b8ea9b 100644 --- a/js/IntegerOp/BITSET.js +++ b/js/IntegerOp/BITSET.js @@ -3,7 +3,7 @@ function BITSET() { BITSET.prototype.define = function BITSET() { this.model = scicos_model(); this.model.sim = list(new ScilabString(["bit_set_32"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([1]); + this.model.in = new ScilabDouble([1]); this.model.in2 = new ScilabDouble([1]); this.model.out = new ScilabDouble([1]); this.model.out2 = new ScilabDouble([1]); @@ -31,16 +31,13 @@ function BITSET() { this.Datatype = arguments[0]["Datatype"] this.bit = parseFloat(arguments[0]["bit"]) this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; this.exprs = this.graphics.exprs; - this.model = arg1.model; while (true) { [ok,this.Datatype,this.bit,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITSET")],[" "],["Set a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),this.exprs); if (!ok) { break; } - var in1 = [this.model.in1,this.model.in2]; + var in1 = [this.model.in,this.model.in2]; if (floor(this.bit)!=this.bit) { block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer."); var ok = false; diff --git a/js/IntegerOp/BITSET.pickle b/js/IntegerOp/BITSET.pickle index c8ab7e1e..b1c2bf88 100644 --- a/js/IntegerOp/BITSET.pickle +++ b/js/IntegerOp/BITSET.pickle @@ -31,37 +31,37 @@ p4 NsS'x.model' p5 g2 -sS'model.intyp' +sS'model.out' p6 S'double' p7 -sS'model.out' -p8 -g7 sS'out' -p9 +p8 S'vector' -p10 +p9 sS'model.in2' -p11 +p10 g7 -sS'model.in1' -p12 +sS'model.intyp' +p11 g7 sS'x.graphics' -p13 +p12 g2 sS'model.sim' -p14 +p13 S'list' -p15 +p14 sS'model.out2' -p16 +p15 g7 sS'in1' -p17 -g10 +p16 +g9 sS'model.outtyp' +p17 +g7 +sS'model.in' p18 g7 sS'graphics.exprs' @@ -71,10 +71,10 @@ p20 g7 sS'typ' p21 -g10 +g9 sS'model.opar' p22 -g15 +g14 sS'ok' p23 S'boolean' @@ -85,7 +85,7 @@ S'string' p26 sS'model.dep_ut' p27 -g10 +g9 sS'n' p28 g7 @@ -95,10 +95,10 @@ S'matrix' p30 sS'gr_i' p31 -g10 +g9 sS'y' p32 -g10 +g9 sS'x' p33 g7 diff --git a/js/IntegerOp/CONVERT.js b/js/IntegerOp/CONVERT.js index 205bf88a..70802f2e 100644 --- a/js/IntegerOp/CONVERT.js +++ b/js/IntegerOp/CONVERT.js @@ -4,7 +4,7 @@ function CONVERT() { var sgn = 2; this.model = scicos_model(); this.model.sim = list(new ScilabString(["convert"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([-1]); + this.model.in = new ScilabDouble([-1]); this.model.out = new ScilabDouble([-1]); this.model.in2 = new ScilabDouble([-2]); this.model.out2 = new ScilabDouble([-2]); @@ -35,9 +35,6 @@ function CONVERT() { this.ot = parseFloat(arguments[0]["ot"]) this.np = arguments[0]["np"] this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; - this.model = arg1.model; this.exprs = this.graphics.exprs; while (true) { [ok,this.it,this.ot,this.np,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONVERT")],[" "],["Type conversion"],[" "]],["Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1,"vec",1),this.exprs); @@ -366,7 +363,7 @@ function CONVERT() { } } } - var in1 = [this.model.in1,this.model.in2]; + var in1 = [this.model.in,this.model.in2]; var out = [this.model.out,this.model.out2]; if (ok) { var tmpvar0 = set_io(this.model,this.graphics,list(in1,this.it),list(out,this.ot),[],[]); diff --git a/js/IntegerOp/CONVERT.pickle b/js/IntegerOp/CONVERT.pickle index aaa410ba..ad446663 100644 --- a/js/IntegerOp/CONVERT.pickle +++ b/js/IntegerOp/CONVERT.pickle @@ -35,42 +35,42 @@ p5 sS'x.model' p6 g2 -sS'model.intyp' -p7 -g5 sS'sgn' -p8 +p7 g5 sS'model.out' -p9 +p8 g5 sS'out' -p10 +p9 S'vector' -p11 +p10 sS'model.in2' -p12 +p11 g5 -sS'model.in1' -p13 +sS'model.intyp' +p12 g5 sS'x.graphics' -p14 +p13 g2 sS'model.sim' -p15 +p14 S'list' -p16 +p15 sS'model.out2' -p17 +p16 g5 sS'in1' -p18 -g11 +p17 +g10 sS'model.rpar' -p19 -g11 +p18 +g10 sS'model.outtyp' +p19 +g5 +sS'model.in' p20 g5 sS'graphics.exprs' @@ -80,7 +80,7 @@ p22 g5 sS'typ' p23 -g11 +g10 sS'ok' p24 S'boolean' @@ -91,17 +91,17 @@ S'string' p27 sS'model.dep_ut' p28 -g11 +g10 sS'exprs' p29 S'matrix' p30 sS'gr_i' p31 -g11 +g10 sS'y' p32 -g11 +g10 sS'x' p33 g5 diff --git a/js/IntegerOp/DFLIPFLOP.js b/js/IntegerOp/DFLIPFLOP.js index da878654..fa98445a 100644 --- a/js/IntegerOp/DFLIPFLOP.js +++ b/js/IntegerOp/DFLIPFLOP.js @@ -78,7 +78,7 @@ function DFLIPFLOP() { scs_m.objs[44-1] = scicos_link(xx=[[279.98293],[279.98293],[325.53038],[325.53038]],yy=[[372.50232],[315.89455],[315.89455],[299.28749]],id="drawlink",thick=[0,0],ct=[5,-1],from=[2,2,0],to=[32,2,1]); this.model = scicos_model(); this.model.sim = new ScilabString(["csuper"]); - this.model.in1 = new ScilabDouble([1],[1],[1]); + this.model.in = new ScilabDouble([1],[1],[1]); this.model.in2 = new ScilabDouble([1],[1],[1]); this.model.out = new ScilabDouble([1],[1]); this.model.out2 = new ScilabDouble([1],[1]); @@ -101,7 +101,6 @@ function DFLIPFLOP() { return options; } DFLIPFLOP.prototype.set = function DFLIPFLOP() { - this.x = arg1; return new BasicBlock(this.x); } } diff --git a/js/IntegerOp/DFLIPFLOP.pickle b/js/IntegerOp/DFLIPFLOP.pickle index 37018580..265b19d6 100644 --- a/js/IntegerOp/DFLIPFLOP.pickle +++ b/js/IntegerOp/DFLIPFLOP.pickle @@ -71,32 +71,32 @@ g2 sS'scs_m_1.objs[12-1]' p20 g2 -sS'model.in1' +sS'model.intyp' p21 -g14 -sS'scs_m.objs[19-1]' +S'vector' p22 +sS'scs_m.objs[19-1]' +p23 g2 sS'scs_m.objs[23-1]' -p23 +p24 g2 sS'scs_m.objs[18-1]' -p24 +p25 g2 sS'scs_m.objs[25-1]' -p25 +p26 g2 sS'scs_m' -p26 +p27 g2 sS'model.firing' -p27 -S'boolean' p28 -sS'gr_i' +S'boolean' p29 -S'vector' +sS'gr_i' p30 +g22 sS'scs_m_1' p31 g2 @@ -136,36 +136,36 @@ g2 sS'model.out2' p43 g14 -sS'model.intyp' -p44 -g30 sS'model.rpar' -p45 +p44 g2 sS'scs_m.objs[3-1]' -p46 +p45 g2 sS'scs_m_1.objs[4-1]' -p47 +p46 g2 sS'scs_m.objs[16-1]' -p48 +p47 g2 sS'scs_m.objs[11-1]' -p49 +p48 g2 sS'scs_m.objs[14-1]' -p50 +p49 g2 sS'scs_m.objs[17-1]' -p51 +p50 g2 +sS'model.in' +p51 +g14 sS'scs_m_1.objs[5-1]' p52 g2 sS'model.outtyp' p53 -g30 +g22 sS'scs_m_1.objs[7-1]' p54 g2 @@ -177,7 +177,7 @@ p56 g2 sS'typ' p57 -g30 +g22 sS'model' p58 S'object' @@ -208,7 +208,7 @@ p67 g2 sS'model.dep_ut' p68 -g30 +g22 sS'scs_m.objs[43-1]' p69 g2 @@ -233,7 +233,7 @@ p76 g72 sS'y' p77 -g30 +g22 sS'x' p78 g2 diff --git a/js/IntegerOp/DLATCH.js b/js/IntegerOp/DLATCH.js index e9df7061..82f671af 100644 --- a/js/IntegerOp/DLATCH.js +++ b/js/IntegerOp/DLATCH.js @@ -23,7 +23,7 @@ function DLATCH() { scs_m.objs[19-1] = scicos_link(xx=[[305.09603],[325.09603]],yy=[[280.83282],[280.83282]],id="drawlink",thick=[0,0],ct=[1,1],from=[10,2,0],to=[18,1,1]); this.model = scicos_model(); this.model.sim = new ScilabString(["csuper"]); - this.model.in1 = new ScilabDouble([1],[1]); + this.model.in = new ScilabDouble([1],[1]); this.model.in2 = new ScilabDouble([1],[1]); this.model.out = new ScilabDouble([1],[1]); this.model.out2 = new ScilabDouble([1],[1]); @@ -46,7 +46,6 @@ function DLATCH() { return options; } DLATCH.prototype.set = function DLATCH() { - this.x = arg1; return new BasicBlock(this.x); } } diff --git a/js/IntegerOp/DLATCH.pickle b/js/IntegerOp/DLATCH.pickle index 214e0a39..9e7002ba 100644 --- a/js/IntegerOp/DLATCH.pickle +++ b/js/IntegerOp/DLATCH.pickle @@ -36,58 +36,58 @@ g6 sS'model.in2' p9 g4 -sS'model.in1' +sS'model.intyp' p10 -g4 -sS'scs_m.objs[19-1]' +S'vector' p11 +sS'scs_m.objs[19-1]' +p12 g6 sS'scs_m.objs[18-1]' -p12 +p13 g6 sS'scs_m' -p13 +p14 g6 sS'scs_m.objs[12-1]' -p14 +p15 g6 sS'scs_m.objs[13-1]' -p15 +p16 g6 sS'scs_m.objs[6-1]' -p16 +p17 g6 sS'scs_m.objs[9-1]' -p17 +p18 g6 sS'model.out2' -p18 -g4 -sS'model.intyp' p19 -S'vector' -p20 +g4 sS'model.rpar' -p21 +p20 g6 sS'scs_m.objs[3-1]' -p22 +p21 g6 sS'model.outtyp' -p23 -g20 +p22 +g11 sS'scs_m.objs[16-1]' -p24 +p23 g6 sS'scs_m.objs[11-1]' -p25 +p24 g6 sS'scs_m.objs[14-1]' -p26 +p25 g6 sS'scs_m.objs[17-1]' -p27 +p26 g6 +sS'model.in' +p27 +g4 sS'scs_m.objs[4-1]' p28 g6 @@ -96,7 +96,7 @@ p29 g6 sS'typ' p30 -g20 +g11 sS'model.blocktype' p31 g2 @@ -108,20 +108,20 @@ p33 g6 sS'model.dep_ut' p34 -g20 +g11 sS'scs_m.objs[1-1]' p35 g6 sS'gr_i' p36 -g20 +g11 sS'model.firing' p37 S'boolean' p38 sS'y' p39 -g20 +g11 sS'x' p40 g6 diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js index 20f3fd8a..0cf1fcea 100644 --- a/js/IntegerOp/EXTRACTBITS.js +++ b/js/IntegerOp/EXTRACTBITS.js @@ -4,7 +4,7 @@ function EXTRACTBITS() { var numb = []; this.model = scicos_model(); this.model.sim = list(new ScilabString(["extract_bit_32_UH0"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([1]); + this.model.in = new ScilabDouble([1]); this.model.in2 = new ScilabDouble([1]); this.model.out = new ScilabDouble([1]); this.model.out2 = new ScilabDouble([1]); @@ -36,10 +36,7 @@ function EXTRACTBITS() { this.bit = parseFloat(arguments[0]["bit"]) this.scal = arguments[0]["scal"] this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; this.exprs = this.graphics.exprs; - this.model = arg1.model; while (true) { [ok,this.Datatype,this.rule,this.bit,this.scal,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","EXTRACTBITS")],[" "],["Bits Extraction"],[" "],[" - Bits to Extract:"],[" 1 Upper Half"],[" 2 Lower Half"],[" 3 Range from MSB"],[" 4 Range to LSB"],[" 5 Range of Bits"],[" - Number of Bits or Index of bit : Index 0 is LSB"],[" If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Bits to extract","Number of Bits or Index of Bit","Treat Bit Field as an Integer (0:No, 1:Yes)"],list("vec",1,"vec",1,"vec",-1,"vec",1),this.exprs); if (!ok) { @@ -53,7 +50,7 @@ function EXTRACTBITS() { block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Treat Bit Field as an Integer",this.scal),msprintf("Must be in the interval %s.","[0, 1]")); var ok = false; } else { - var in1 = [this.model.in1,this.model.in2]; + var in1 = [this.model.in,this.model.in2]; this.bit = int(this.bit); this.rule = int(this.rule); if ((this.rule==3)||(this.rule==4)) { diff --git a/js/IntegerOp/EXTRACTBITS.pickle b/js/IntegerOp/EXTRACTBITS.pickle index e9c13a5f..94754555 100644 --- a/js/IntegerOp/EXTRACTBITS.pickle +++ b/js/IntegerOp/EXTRACTBITS.pickle @@ -23,71 +23,71 @@ p10 atp11 Rp12 .(dp0 -S'arg1' +S'numb' p1 -S'object' +S'vector' p2 -sS'graphics' +sS'arg1' p3 -g2 -sS'it' +S'object' p4 -NsS'x.model' +sS'graphics' p5 -g2 -sS'model.intyp' +g4 +sS'it' p6 -S'double' +NsS'x.model' p7 +g4 sS'model.dep_ut' p8 -S'vector' -p9 +g2 sS'model.out' +p9 +S'double' p10 -g7 sS'out' p11 -g9 +g2 sS'model.in2' p12 -g7 -sS'model.in1' +g10 +sS'model.intyp' p13 -g7 +g10 sS'x.graphics' p14 -g2 +g4 sS'model.sim' p15 S'list' p16 sS'model.out2' p17 -g7 +g10 sS'in1' p18 -g9 +g2 sS'model.outtyp' p19 -g7 -sS'numb' +g10 +sS'model.in' p20 -g9 +g10 sS'graphics.exprs' p21 NsS'bit' p22 -g7 +g10 sS'model.ipar' p23 -g9 +g2 sS'typ' p24 -g9 +g2 sS'bitstr' p25 -g7 +g10 sS'ok' p26 S'boolean' @@ -98,23 +98,23 @@ S'string' p29 sS'rule' p30 -g7 +g10 sS'exprs' p31 S'matrix' p32 sS'gr_i' p33 -g9 +g2 sS'y' p34 -g9 +g2 sS'x' p35 -g7 +g10 sS'model' p36 -g2 +g4 sS'ot' p37 Ns.
\ No newline at end of file diff --git a/js/IntegerOp/INTMUL.js b/js/IntegerOp/INTMUL.js index c0f32924..7e781cf7 100644 --- a/js/IntegerOp/INTMUL.js +++ b/js/IntegerOp/INTMUL.js @@ -4,7 +4,7 @@ function INTMUL() { var sgn = 0; this.model = scicos_model(); this.model.sim = list(new ScilabString(["matmul_i32"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([-1],[-2]); + this.model.in = new ScilabDouble([-1],[-2]); this.model.out = new ScilabDouble([-1]); this.model.in2 = new ScilabDouble([-2],[-3]); this.model.out2 = new ScilabDouble([-3]); @@ -33,9 +33,6 @@ function INTMUL() { this.Datatype = arguments[0]["Datatype"] this.np = arguments[0]["np"] this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; - this.model = arg1.model; this.exprs = this.graphics.exprs; while (true) { [ok,this.Datatype,this.np,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INTMUL")],[" "],["Integer matrix multiplication"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1),this.exprs); @@ -99,7 +96,7 @@ function INTMUL() { block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",ot),msprintf("Must be in the interval %s.","[3, 8]")); var ok = false; } - var in1 = [this.model.in1,this.model.in2]; + var in1 = [this.model.in,this.model.in2]; var out = [this.model.out,this.model.out2]; if (ok) { var tmpvar0 = set_io(this.model,this.graphics,list(in1,it),list(out,ot),[],[]); diff --git a/js/IntegerOp/INTMUL.pickle b/js/IntegerOp/INTMUL.pickle index 28173e09..b83d7e98 100644 --- a/js/IntegerOp/INTMUL.pickle +++ b/js/IntegerOp/INTMUL.pickle @@ -33,54 +33,54 @@ p5 sS'x.model' p6 g2 -sS'model.intyp' +sS'sgn' p7 -S'vector' +S'double' p8 -sS'sgn' +sS'model.out' p9 -S'double' +g8 +sS'out' p10 -sS'model.out' +S'vector' p11 -g10 -sS'out' -p12 -g8 sS'model.in2' -p13 +p12 S'matrix' +p13 +sS'model.intyp' p14 -sS'model.in1' -p15 -g14 +g11 sS'x.graphics' -p16 +p15 g2 sS'model.sim' -p17 +p16 S'list' -p18 +p17 sS'model.out2' -p19 -g10 -sS'in1' -p20 +p18 g8 +sS'in1' +p19 +g11 sS'model.rpar' +p20 +g11 +sS'model.outtyp' p21 g8 -sS'model.outtyp' +sS'model.in' p22 -g10 +g13 sS'graphics.exprs' p23 NsS'model.ipar' p24 -g10 +g8 sS'typ' p25 -g8 +g11 sS'ok' p26 S'boolean' @@ -90,19 +90,19 @@ p28 g5 sS'model.dep_ut' p29 -g8 +g11 sS'exprs' p30 -g14 +g13 sS'gr_i' p31 -g8 +g11 sS'y' p32 -g8 +g11 sS'x' p33 -g10 +g8 sS'model' p34 g2 diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index ddd251c0..69417c73 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -34,7 +34,7 @@ function JKFLIPFLOP() { scs_m.objs[22-1] = scicos_link(xx=[[446.2036],[466.2036]],yy=[[179.25363],[179.25363]],id="drawlink",thick=[0,0],ct=[1,1],from=[9,1,0],to=[21,1,1]); this.model = scicos_model(); this.model.sim = new ScilabString(["csuper"]); - this.model.in1 = new ScilabDouble([1],[1],[1]); + this.model.in = new ScilabDouble([1],[1],[1]); this.model.in2 = new ScilabDouble([1],[1],[1]); this.model.out = new ScilabDouble([1],[1]); this.model.out2 = new ScilabDouble([1],[1]); @@ -59,15 +59,12 @@ function JKFLIPFLOP() { JKFLIPFLOP.prototype.set = function JKFLIPFLOP() { this.init = parseFloat(arguments[0]["init"]) this.exprs0 = arguments[0]["exprs0"] - for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { - var o = arg1.model.rpar.objs[i-1]; if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { var path = i; break; } } var newpar = list(); - var xx = arg1.model.rpar.objs[path-1]; this.exprs = xx.graphics.exprs[1-1]; this.model = xx.model; var init_old = this.model.odstate[1-1]; @@ -85,7 +82,6 @@ function JKFLIPFLOP() { xx.graphics.exprs[1-1] = this.exprs0; this.model.odstate[1-1] = new ScilabDouble([this.init]); xx.model = this.model; - arg1.model.rpar.objs[path-1] = xx; break; } } @@ -94,7 +90,6 @@ function JKFLIPFLOP() { newpar[size(newpar)+1-1] = 1; var needcompile = 2; } - this.x = arg1; var y = needcompile; var typ = newpar; return new BasicBlock(this.x); diff --git a/js/IntegerOp/JKFLIPFLOP.pickle b/js/IntegerOp/JKFLIPFLOP.pickle index f81681e8..cbfae693 100644 --- a/js/IntegerOp/JKFLIPFLOP.pickle +++ b/js/IntegerOp/JKFLIPFLOP.pickle @@ -70,22 +70,22 @@ g7 sS'scs_m' p20 g7 -sS'model.in1' +sS'model.intyp' p21 -g11 -sS'scs_m.objs[19-1]' +S'vector' p22 +sS'scs_m.objs[19-1]' +p23 g7 sS'scs_m.objs[1-1]' -p23 +p24 g7 sS'scs_m.objs[18-1]' -p24 +p25 g7 sS'model.dep_ut' -p25 -S'vector' p26 +g22 sS'newpar[size(newpar)+1-1]' p27 g7 @@ -130,30 +130,30 @@ g7 sS'model.out2' p42 g11 -sS'model.intyp' -p43 -g26 sS'model.rpar' -p44 +p43 g7 sS'scs_m.objs[3-1]' -p45 +p44 g7 sS'scs_m_1.objs[4-1]' -p46 +p45 g7 sS'scs_m.objs[16-1]' -p47 +p46 g7 sS'scs_m.objs[11-1]' -p48 +p47 g7 sS'scs_m.objs[14-1]' -p49 +p48 g7 sS'scs_m.objs[17-1]' -p50 +p49 g7 +sS'model.in' +p50 +g11 sS'scs_m_1.objs[5-1]' p51 g7 @@ -170,7 +170,7 @@ p55 g37 sS'model.outtyp' p56 -g26 +g22 sS'needcompile' p57 g7 @@ -200,7 +200,7 @@ p65 g7 sS'gr_i' p66 -g26 +g22 sS'scs_m.objs[12-1]' p67 g7 diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js index 7a463e3c..2f0cb139 100644 --- a/js/IntegerOp/LOGIC.js +++ b/js/IntegerOp/LOGIC.js @@ -4,7 +4,7 @@ function LOGIC() { this.mat = [[0],[0],[0],[1]]; this.model = scicos_model(); this.model.sim = list(new ScilabString(["logic"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([1],[1]); + this.model.in = new ScilabDouble([1],[1]); this.model.in2 = new ScilabDouble([1],[1]); this.model.out = new ScilabDouble([1]); this.model.out2 = new ScilabDouble([1]); @@ -34,10 +34,7 @@ function LOGIC() { this.mat = inverse(arguments[0]["mat"]) this.herit = arguments[0]["herit"] this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; this.exprs = this.graphics.exprs; - this.model = arg1.model; while (true) { [ok,this.mat,this.herit,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","LOGIC")],[" "],["Combinatorial logic"],[" "],[" Rows of the matrix are the output values"],[" Number of rows must be a power of two."],[" Number of columns gives the number of outputs."],[" "]],["Truth Table (matrix of outputs)","Accepts Inherited Events (0:No, 1:Yes)"],list("mat",[-1,-2],"vec",1),this.exprs); if (!ok) { diff --git a/js/IntegerOp/LOGIC.pickle b/js/IntegerOp/LOGIC.pickle index a7b30e2e..d39f0580 100644 --- a/js/IntegerOp/LOGIC.pickle +++ b/js/IntegerOp/LOGIC.pickle @@ -32,82 +32,82 @@ S'double' p5 sS'x.model' p6 -NsS'model.intyp' +NsS'model.out' p7 -S'vector' -p8 -sS'model.out' -p9 g5 sS'out' -p10 -g8 +p8 +S'vector' +p9 sS'model.in2' -p11 +p10 S'matrix' +p11 +sS'model.intyp' p12 -sS'model.in1' -p13 -g12 +g9 sS'x.graphics' -p14 +p13 g2 sS'u1' -p15 +p14 g5 sS'model.evtin' -p16 +p15 g5 sS'model.firing' -p17 +p16 S'boolean' -p18 +p17 sS'model.sim' -p19 +p18 S'list' -p20 +p19 sS'nin' -p21 +p20 g5 sS'mat' -p22 -g12 +p21 +g11 sS'model.out2' -p23 +p22 g5 sS'in1' -p24 -g8 +p23 +g9 sS'model.outtyp' -p25 +p24 g5 +sS'model.in' +p25 +g11 sS'graphics.exprs' p26 NsS'typ' p27 -g8 +g9 sS'model.opar' p28 -g20 +g19 sS'ok' p29 -g18 +g17 sS'model.blocktype' p30 S'string' p31 sS'model.dep_ut' p32 -g8 +g9 sS'exprs' p33 -g12 +g11 sS'gr_i' p34 -g8 +g9 sS'y' p35 -g8 +g9 sS'x' p36 g5 diff --git a/js/IntegerOp/SHIFT.js b/js/IntegerOp/SHIFT.js index d80d4c1f..19741f29 100644 --- a/js/IntegerOp/SHIFT.js +++ b/js/IntegerOp/SHIFT.js @@ -5,7 +5,7 @@ function SHIFT() { var OPER = 0; this.model = scicos_model(); this.model.sim = list(new ScilabString(["shift_32_LA"]), new ScilabDouble([4])); - this.model.in1 = new ScilabDouble([-1]); + this.model.in = new ScilabDouble([-1]); this.model.out = new ScilabDouble([-1]); this.model.in2 = new ScilabDouble([-2]); this.model.out2 = new ScilabDouble([-2]); @@ -36,9 +36,6 @@ function SHIFT() { this.nb = arguments[0]["nb"] this.np = arguments[0]["np"] this.exprs = arguments[0]["exprs"] - this.x = arg1; - this.graphics = arg1.graphics; - this.model = arg1.model; this.exprs = this.graphics.exprs; while (true) { [ok,this.Datatype,this.nb,this.np,this.exprs] = scicos_getvalue([[msprintf("Set %s block parameters","SHIFT")],[" "],["Shift/Rotates bits"]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Number of Bits to Shift Left (Negative number to shift right)","Shift Type (0:Arithmetic, 1:Circular)"],list("vec",1,"vec",1,"vec",1),this.exprs); diff --git a/js/IntegerOp/SHIFT.pickle b/js/IntegerOp/SHIFT.pickle index 10f24435..076ec6f3 100644 --- a/js/IntegerOp/SHIFT.pickle +++ b/js/IntegerOp/SHIFT.pickle @@ -46,7 +46,7 @@ g2 sS'model.in2' p11 g2 -sS'model.in1' +sS'model.intyp' p12 g2 sS'x.graphics' @@ -59,14 +59,14 @@ p15 sS'model.out2' p16 g2 -sS'model.intyp' -p17 -g2 sS'model.rpar' -p18 +p17 S'vector' -p19 +p18 sS'model.outtyp' +p19 +g2 +sS'model.in' p20 g2 sS'graphics.exprs' @@ -76,7 +76,7 @@ p22 g9 sS'typ' p23 -g19 +g18 sS'ok' p24 S'boolean' @@ -87,16 +87,16 @@ S'string' p27 sS'model.dep_ut' p28 -g19 +g18 sS'exprs' p29 g9 sS'gr_i' p30 -g19 +g18 sS'y' p31 -g19 +g18 sS'x' p32 g2 diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index fd9a0e51..14eca627 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -18,7 +18,7 @@ function SRFLIPFLOP() { scs_m.objs[14-1] = scicos_link(xx=[[363.03733],[383.03733]],yy=[[248.584],[248.584]],id="drawlink",thick=[0,0],ct=[1,1],from=[5,2,0],to=[13,1,1]); this.model = scicos_model(); this.model.sim = new ScilabString(["csuper"]); - this.model.in1 = new ScilabDouble([1],[1]); + this.model.in = new ScilabDouble([1],[1]); this.model.in2 = new ScilabDouble([1],[1]); this.model.out = new ScilabDouble([1],[1]); this.model.out2 = new ScilabDouble([1],[1]); @@ -43,15 +43,12 @@ function SRFLIPFLOP() { SRFLIPFLOP.prototype.set = function SRFLIPFLOP() { this.init = parseFloat(arguments[0]["init"]) this.exprs0 = arguments[0]["exprs0"] - for (i=1;i<=length(arg1.model.rpar.objs);i+=1) { - var o = arg1.model.rpar.objs[i-1]; if (typeof(o)=="Block"&&o.gui=="DOLLAR_m") { var path = i; break; } } var newpar = list(); - var xx = arg1.model.rpar.objs[path-1]; this.exprs = xx.graphics.exprs[1-1]; this.model = xx.model; var init_old = this.model.odstate[1-1]; @@ -69,7 +66,6 @@ function SRFLIPFLOP() { xx.graphics.exprs[1-1] = this.exprs0; this.model.odstate[1-1] = new ScilabDouble([this.init]); xx.model = this.model; - arg1.model.rpar.objs[path-1] = xx; break; } } @@ -78,7 +74,6 @@ function SRFLIPFLOP() { newpar[size(newpar)+1-1] = path; var needcompile = 2; } - this.x = arg1; var y = needcompile; var typ = newpar; return new BasicBlock(this.x); diff --git a/js/IntegerOp/SRFLIPFLOP.pickle b/js/IntegerOp/SRFLIPFLOP.pickle index 4a6405ff..30a56f4d 100644 --- a/js/IntegerOp/SRFLIPFLOP.pickle +++ b/js/IntegerOp/SRFLIPFLOP.pickle @@ -58,16 +58,16 @@ g13 sS'scs_m' p16 g13 -sS'model.in1' +sS'model.intyp' p17 -g8 -sS'scs_m.objs[1-1]' +S'vector' p18 +sS'scs_m.objs[1-1]' +p19 g13 sS'model.dep_ut' -p19 -S'vector' p20 +g18 sS'newpar[size(newpar)+1-1]' p21 NsS'init' @@ -101,24 +101,24 @@ g13 sS'model.out2' p32 g8 -sS'model.intyp' -p33 -g20 sS'model.rpar' -p34 +p33 g13 sS'scs_m.objs[3-1]' -p35 +p34 g13 sS'model.outtyp' -p36 -g20 +p35 +g18 sS'scs_m.objs[11-1]' -p37 +p36 g13 sS'scs_m.objs[14-1]' -p38 +p37 g13 +sS'model.in' +p38 +g8 sS'path' p39 NsS'scs_m.objs[4-1]' @@ -150,7 +150,7 @@ p48 g13 sS'gr_i' p49 -g20 +g18 sS'model.firing' p50 S'boolean' |