From 9098a9b314e0fa7e4d41457c7b1d45f370e34f64 Mon Sep 17 00:00:00 2001 From: fahim-oscad Date: Fri, 15 Jul 2016 12:46:12 +0530 Subject: Subject:Indenting netlist.js Description:Indenting netlist.js --- views/script/netlist.js | 1829 +++++++++++++++++++++++------------------------ 1 file changed, 897 insertions(+), 932 deletions(-) (limited to 'views/script') diff --git a/views/script/netlist.js b/views/script/netlist.js index fc16d4f..dd09724 100644 --- a/views/script/netlist.js +++ b/views/script/netlist.js @@ -1,4 +1,5 @@ var netlistcreator={ + matrixxform:function(point,matrix){ var pin=webtronics.circuit.svgRoot.createSVGPoint(); pin.x=point.x; @@ -154,37 +155,36 @@ var netlistcreator={ /* draws wires to namewire ports with the same id*/ connectnamewires:function(list){ - for(var i=0;i @@ -205,521 +205,520 @@ tovector:function(pin,nodenumber){ */ - getwtxdata:function(parts){ - list=[]; - for(var i=0;i b.name)return 1;if (a.name < b.name)return -1;return 0;}); + getwtxdata:function(parts){ + list=[]; + for(var i=0;i b.name)return 1;if (a.name < b.name)return -1;return 0;}); - } - catch(e){console.log("no digital pins found");} - try{ - part.id=this.readwtx(parts[i],'id'); - if(part.type=="gnd"){part.id=part.type;this.writewtx(parts[i],'id',part.id);console.log(this.readwtx(parts[i],'id')+" sfd ");} - } - catch(e){part.error="wtx:id not found";} - try{ - part.type=this.readwtx(parts[i],'type'); - } - catch(e){ - part.error="wtx:type not found"; - } - try{ - part.name=this.readwtx(parts[i],'name'); - } - catch(e){part.error="wtx:name not found";} - try{ - part.category=this.readwtx(parts[i],'category'); - } - catch(e){part.error="wtx:category not found";} - try{ - part.value=this.readwtx(parts[i],'value'); - - } - catch(e){part.error="wtx:value not found";} - try{ - part.spice=this.readwtx(parts[i],'spice'); - } - catch(e){part.error="wtx:spice not found";} - try{ - part.model=this.readwtx(parts[i],'model'); - } - catch(e){part.error="wtx:model not found";} - //for ac voltage source - try{ - part.amplitude=this.readwtx(parts[i],'amplitude'); - - - } - - catch(e){part.error="wtx:amplitude not found";} - try{ - part.phase=this.readwtx(parts[i],'phase'); - } - catch(e){part.error="wtx:phase not found";} - - //for sinusoidal voltage source - - try{ - part.offsetvoltage=this.readwtx(parts[i],'offsetvoltage'); - } - catch(e){part.error="wtx:offsetvoltage not found";} - - try{ - part.voltageamplitude=this.readwtx(parts[i],'voltageamplitude'); - } - catch(e){part.error="wtx:voltageamplitude not found";} - try{ - part.frequency=this.readwtx(parts[i],'frequency'); - } - catch(e){part.error="wtx:frequency not found";} - try{ - part.delaytime=this.readwtx(parts[i],'delaytime'); - } - catch(e){part.error="wtx:delaytime not found";} - try{ - part.dampingfactor=this.readwtx(parts[i],'dampingfactor'); - } - catch(e){part.error="wtx:dampingfactor not found";} - - // FOR pulse volatge source - try{ - part.pulval1=this.readwtx(parts[i],'pulval1'); - } - catch(e){part.error="wtx:Initial Value not found";} - - try{ - part.pulval2=this.readwtx(parts[i],'pulval2'); - } - catch(e){part.error="wtx:Pulse Value not found";} - try{ - part.pulval3=this.readwtx(parts[i],'pulval3'); - } - catch(e){part.error="wtx:Delay Time not found";} - try{ - part.pulval4=this.readwtx(parts[i],'pulval4'); - } - catch(e){part.error="wtx:Rise Time not found";} - - try{ - part.pulval5=this.readwtx(parts[i],'pulval5'); - } - catch(e){part.error="wtx:Fall Time not found";} - try{ - part.pulval6=this.readwtx(parts[i],'pulval6'); - } - catch(e){part.error="wtx:Pulse Period not found";} - try{ - part.pulval7=this.readwtx(parts[i],'pulval7'); - } - catch(e){part.error="wtx:Pulse Width not found";} - - //FOR pwl volatge source - try{ - part.pwlval1=this.readwtx(parts[i],'pwlval1'); - } - catch(e){part.error="wtx:Time T1 Value not found";} - - try{ - part.pwlval2=this.readwtx(parts[i],'pwlval2'); - } - catch(e){part.error="wtx:Voltage V1 Value not found";} - try{ - part.pwlval3=this.readwtx(parts[i],'pwlval3'); - } - catch(e){part.error="wtx:Time T2 Value not found";} - try{ - part.pwlval4=this.readwtx(parts[i],'pwlval4'); - } - catch(e){part.error="wtx:Voltage V2 value not found";} - - try{ - part.pwlval5=this.readwtx(parts[i],'pwlval5'); - } - catch(e){part.error="wtx:Time T3 value not found";} - try{ - part.pwlval6=this.readwtx(parts[i],'pwlval6'); - } - catch(e){part.error="wtx:Voltage V3 value not found";} - try{ - part.pwlval7=this.readwtx(parts[i],'pwlval7'); - } - catch(e){part.error="wtx:Time T4 Value not found";} - try{ - part.pwlval8=this.readwtx(parts[i],'pwlval8'); - } - catch(e){part.error="wtx:Voltage V4 Value not found";} - -//FOR exponential volatge source -try{ - part.eval1=this.readwtx(parts[i],'eval1'); -} -catch(e){part.error="wtx:Initial Value not found";} - -try{ - part.eval2=this.readwtx(parts[i],'eval2'); -} -catch(e){part.error="wtx:Pulse Value not found";} -try{ - part.eval3=this.readwtx(parts[i],'eval3'); -} -catch(e){part.error="wtx:Rise Time Delay value not found";} -try{ - part.eval4=this.readwtx(parts[i],'eval4'); -} -catch(e){part.error="wtx:Rise Time Constant value not found";} - -try{ - part.eval5=this.readwtx(parts[i],'eval5'); -} -catch(e){part.error="wtx:Fall Time Delay value not found";} -try{ - part.eval6=this.readwtx(parts[i],'eval6'); -} -catch(e){part.error="wtx:Fall Time Constan value not found";} - -//digital and - try{ - part.risedelay=this.readwtx(parts[i],'risedelay'); - } -catch(e){ - part.error="wtx:risedelay not found";} - -try{ - part.falldelay=this.readwtx(parts[i],'falldelay'); - } -catch(e){ - part.error="wtx:risedelay not found";} - -try{ - part.inputload=this.readwtx(parts[i],'inputload'); - } -catch(e){ - part.error="wtx:inputload not found";} + catch{part.error="wtx:pins not found"} + */ + part.elem=parts[i]; + + try{ + var category=webtronics.circuit.getwtxtagname(parts[i],"analog")[0]; + var nodes = webtronics.circuit.getwtxtagname(category,"node"); + for(var j=0;j b.name)return 1;if (a.name < b.name)return -1;return 0;}); + } + catch(e){console.log("no analog pins found");} + + try{ + var category=webtronics.circuit.getwtxtagname(parts[i],"digital")[0]; + var nodes = webtronics.circuit.getwtxtagname(category,"node"); + for(var j=0;j b.name)return 1;if (a.name < b.name)return -1;return 0;}); + } + catch(e){console.log("no digital pins found");} + + try{ + part.id=this.readwtx(parts[i],'id'); + if(part.type=="gnd"){ + part.id=part.type;this.writewtx(parts[i],'id',part.id);console.log(this.readwtx(parts[i],'id')+" sfd "); + } + } + catch(e){part.error="wtx:id not found";} + + try{ + part.type=this.readwtx(parts[i],'type'); + } + catch(e){part.error="wtx:type not found";} + + try{ + part.name=this.readwtx(parts[i],'name'); + } + catch(e){part.error="wtx:name not found";} + + try{ + part.category=this.readwtx(parts[i],'category'); + } + catch(e){part.error="wtx:category not found";} + + try{ + part.value=this.readwtx(parts[i],'value'); + } + catch(e){part.error="wtx:value not found";} + + try{ + part.spice=this.readwtx(parts[i],'spice'); + } + catch(e){part.error="wtx:spice not found";} + + try{ + part.model=this.readwtx(parts[i],'model'); + } + catch(e){part.error="wtx:model not found";} + + //for ac voltage source + try{ + part.amplitude=this.readwtx(parts[i],'amplitude'); + } + catch(e){part.error="wtx:amplitude not found";} + + try{ + part.phase=this.readwtx(parts[i],'phase'); + } + catch(e){part.error="wtx:phase not found";} + //for sinusoidal voltage source + try{ + part.offsetvoltage=this.readwtx(parts[i],'offsetvoltage'); + } + catch(e){part.error="wtx:offsetvoltage not found";} - //special tag for parts that do simulation - try{ - part.measure=this.readwtx(parts[i],'measure'); - } - catch(e){} + try{ + part.voltageamplitude=this.readwtx(parts[i],'voltageamplitude'); + } + catch(e){part.error="wtx:voltageamplitude not found";} + + try{ + part.frequency=this.readwtx(parts[i],'frequency'); + } + catch(e){part.error="wtx:frequency not found";} + + try{ + part.delaytime=this.readwtx(parts[i],'delaytime'); + } + catch(e){part.error="wtx:delaytime not found";} + + try{ + part.dampingfactor=this.readwtx(parts[i],'dampingfactor'); + } + catch(e){part.error="wtx:dampingfactor not found";} -try{ part.inoffset=this.readwtx(parts[i],'inoffset'); } -catch(e){ part.error="wtx:inoffset not found"; } + // FOR pulse volatge source + try{ + part.pulval1=this.readwtx(parts[i],'pulval1'); + } + catch(e){part.error="wtx:Initial Value not found";} + try{ + part.pulval2=this.readwtx(parts[i],'pulval2'); + } + catch(e){part.error="wtx:Pulse Value not found";} + + try{ + part.pulval3=this.readwtx(parts[i],'pulval3'); + } + catch(e){part.error="wtx:Delay Time not found";} + + try{ + part.pulval4=this.readwtx(parts[i],'pulval4'); + } + catch(e){part.error="wtx:Rise Time not found";} -try{ part.gain=this.readwtx(parts[i],'gain'); } -catch(e){ part.error="wtx:gain not found"; } + try{ + part.pulval5=this.readwtx(parts[i],'pulval5'); + } + catch(e){part.error="wtx:Fall Time not found";} + + try{ + part.pulval6=this.readwtx(parts[i],'pulval6'); + } + catch(e){part.error="wtx:Pulse Period not found";} + + try{ + part.pulval7=this.readwtx(parts[i],'pulval7'); + } + catch(e){part.error="wtx:Pulse Width not found";} + //FOR pwl volatge source + try{ + part.pwlval1=this.readwtx(parts[i],'pwlval1'); + } + catch(e){part.error="wtx:Time T1 Value not found";} -try{ part.outoffset=this.readwtx(parts[i],'outoffset'); } -catch(e){ part.error="wtx:outoffset not found"; } + try{ + part.pwlval2=this.readwtx(parts[i],'pwlval2'); + } + catch(e){part.error="wtx:Voltage V1 Value not found";} + + try{ + part.pwlval3=this.readwtx(parts[i],'pwlval3'); + } + catch(e){part.error="wtx:Time T2 Value not found";} + + try{ + part.pwlval4=this.readwtx(parts[i],'pwlval4'); + } + catch(e){part.error="wtx:Voltage V2 value not found";} -try{ part.ingain=this.readwtx(parts[i],'ingain'); } -catch(e){ part.error="wtx:ingain not found"; } + try{ + part.pwlval5=this.readwtx(parts[i],'pwlval5'); + } + catch(e){part.error="wtx:Time T3 value not found";} + + try{ + part.pwlval6=this.readwtx(parts[i],'pwlval6'); + } + catch(e){part.error="wtx:Voltage V3 value not found";} + + try{ + part.pwlval7=this.readwtx(parts[i],'pwlval7'); + } + catch(e){part.error="wtx:Time T4 Value not found";} + + try{ + part.pwlval8=this.readwtx(parts[i],'pwlval8'); + } + catch(e){part.error="wtx:Voltage V4 Value not found";} -try{ part.outgain=this.readwtx(parts[i],'outgain'); } -catch(e){ part.error="wtx:outgain not found"; } + //FOR exponential volatge source + try{ + part.eval1=this.readwtx(parts[i],'eval1'); + } + catch(e){part.error="wtx:Initial Value not found";} -try{ part.denoffset=this.readwtx(parts[i],'denoffset'); } -catch(e){ part.error="wtx:denoffset not found"; } + try{ + part.eval2=this.readwtx(parts[i],'eval2'); + } + catch(e){part.error="wtx:Pulse Value not found";} + + try{ + part.eval3=this.readwtx(parts[i],'eval3'); + } + catch(e){part.error="wtx:Rise Time Delay value not found";} + + try{ + part.eval4=this.readwtx(parts[i],'eval4'); + } + catch(e){part.error="wtx:Rise Time Constant value not found";} -try{ part.dengain=this.readwtx(parts[i],'dengain'); } -catch(e){ part.error="wtx:dengain not found"; } + try{ + part.eval5=this.readwtx(parts[i],'eval5'); + } + catch(e){part.error="wtx:Fall Time Delay value not found";} + + try{ + part.eval6=this.readwtx(parts[i],'eval6'); + } + catch(e){part.error="wtx:Fall Time Constan value not found";} -try{ part.numoffset=this.readwtx(parts[i],'numoffset'); } -catch(e){ part.error="wtx:numoffset not found"; } + //digital and + try{ + part.risedelay=this.readwtx(parts[i],'risedelay'); + } + catch(e){part.error="wtx:risedelay not found";} -try{ part.numgain=this.readwtx(parts[i],'numgain'); } -catch(e){ part.error="wtx:numgain not found"; } + try{ + part.falldelay=this.readwtx(parts[i],'falldelay'); + } + catch(e){part.error="wtx:risedelay not found";} -try{ part.fraction=this.readwtx(parts[i],'fraction'); } -catch(e){ part.error="wtx:fraction not found"; } + try{ + part.inputload=this.readwtx(parts[i],'inputload'); + } + catch(e){part.error="wtx:inputload not found";} -try{ part.dendomain=this.readwtx(parts[i],'dendomain'); } -catch(e){ part.error="wtx:dendomain not found"; } + //special tag for parts that do simulation + try{ + part.measure=this.readwtx(parts[i],'measure'); + } + catch(e){part.error="wtx:measure not found";} -try{ part.denlowerlimit=this.readwtx(parts[i],'denlowerlimit'); } -catch(e){ part.error="wtx:denlowerlimit not found"; } + try{ part.inoffset=this.readwtx(parts[i],'inoffset'); } + catch(e){ part.error="wtx:inoffset not found"; } -try{ part.outlowerlimit=this.readwtx(parts[i],'outlowerlimit'); } -catch(e){ part.error="wtx:outlowerlimit not found"; } + try{ part.gain=this.readwtx(parts[i],'gain'); } + catch(e){ part.error="wtx:gain not found"; } -try{ part.outupperlimit=this.readwtx(parts[i],'outupperlimit'); } -catch(e){ part.error="wtx:outupperlimit not found"; } + try{ part.outoffset=this.readwtx(parts[i],'outoffset'); } + catch(e){ part.error="wtx:outoffset not found"; } + try{ part.ingain=this.readwtx(parts[i],'ingain'); } + catch(e){ part.error="wtx:ingain not found"; } -try{ part.limitrange=this.readwtx(parts[i],'limitrange'); } -catch(e){ part.error="wtx:limitrange not found"; } + try{ part.outgain=this.readwtx(parts[i],'outgain'); } + catch(e){ part.error="wtx:outgain not found"; } + try{ part.denoffset=this.readwtx(parts[i],'denoffset'); } + catch(e){ part.error="wtx:denoffset not found"; } -try{ part.upperdelta=this.readwtx(parts[i],'upperdelta'); } -catch(e){ part.error="wtx:upperdelta not found"; } + try{ part.dengain=this.readwtx(parts[i],'dengain'); } + catch(e){ part.error="wtx:dengain not found"; } -try{ part.lowerdelta=this.readwtx(parts[i],'lowerdelta'); } -catch(e){ part.error="wtx:lowerdelta not found"; } + try{ part.numoffset=this.readwtx(parts[i],'numoffset'); } + catch(e){ part.error="wtx:numoffset not found"; } -try{ part.indomain=this.readwtx(parts[i],'indomain'); } -catch(e){ part.error="wtx:indomain not found"; } + try{ part.numgain=this.readwtx(parts[i],'numgain'); } + catch(e){ part.error="wtx:numgain not found"; } -try{ part.xarr=this.readwtx(parts[i],'xarr'); } -catch(e){ part.error="wtx:xarr not found"; } + try{ part.fraction=this.readwtx(parts[i],'fraction'); } + catch(e){ part.error="wtx:fraction not found"; } -try{ part.yarr=this.readwtx(parts[i],'yarr'); } -catch(e){ part.error="wtx:yarr not found"; } + try{ part.dendomain=this.readwtx(parts[i],'dendomain'); } + catch(e){ part.error="wtx:dendomain not found"; } -try{ part.amodel=this.readwtx(parts[i],'amodel'); } -catch(e){ part.error="wtx:amodel not found"; } + try{ part.denlowerlimit=this.readwtx(parts[i],'denlowerlimit'); } + catch(e){ part.error="wtx:denlowerlimit not found"; } -try{ part.coff=this.readwtx(parts[i],'coff'); } -catch(e){ part.error="wtx:coff not found"; } + try{ part.outlowerlimit=this.readwtx(parts[i],'outlowerlimit'); } + catch(e){ part.error="wtx:outlowerlimit not found"; } -try{ part.con=this.readwtx(parts[i],'con'); } -catch(e){ part.error="wtx:con not found"; } + try{ part.outupperlimit=this.readwtx(parts[i],'outupperlimit'); } + catch(e){ part.error="wtx:outupperlimit not found"; } -try{ part.roff=this.readwtx(parts[i],'roff'); } -catch(e){ part.error="wtx:roff not found"; } + try{ part.limitrange=this.readwtx(parts[i],'limitrange'); } + catch(e){ part.error="wtx:limitrange not found"; } + try{ part.upperdelta=this.readwtx(parts[i],'upperdelta'); } + catch(e){ part.error="wtx:upperdelta not found"; } -try{ part.irev=this.readwtx(parts[i],'irev'); } -catch(e){ part.error="wtx:irev not found"; } + try{ part.lowerdelta=this.readwtx(parts[i],'lowerdelta'); } + catch(e){ part.error="wtx:lowerdelta not found"; } -try{ part.rbreak=this.readwtx(parts[i],'rbreak'); } -catch(e){ part.error="wtx:rbreak not found"; } + try{ part.indomain=this.readwtx(parts[i],'indomain'); } + catch(e){ part.error="wtx:indomain not found"; } -try{ part.limitswitch=this.readwtx(parts[i],'limitswitch'); } -catch(e){ part.error="wtx:limitswitch not found"; } + try{ part.xarr=this.readwtx(parts[i],'xarr'); } + catch(e){ part.error="wtx:xarr not found"; } -try{ part.ron=this.readwtx(parts[i],'ron'); } -catch(e){ part.error="wtx:ron not found"; } + try{ part.yarr=this.readwtx(parts[i],'yarr'); } + catch(e){ part.error="wtx:yarr not found"; } -try{ part.log=this.readwtx(parts[i],'log'); } -catch(e){ part.error="wtx:log not found"; } + try{ part.amodel=this.readwtx(parts[i],'amodel'); } + catch(e){ part.error="wtx:amodel not found"; } -try{ part.vbreak=this.readwtx(parts[i],'vbreak'); } -catch(e){ part.error="wtx:vbreak not found"; } + try{ part.coff=this.readwtx(parts[i],'coff'); } + catch(e){ part.error="wtx:coff not found"; } + try{ part.con=this.readwtx(parts[i],'con'); } + catch(e){ part.error="wtx:con not found"; } -try{ part.ibreak=this.readwtx(parts[i],'ibreak'); } -catch(e){ part.error="wtx:ibreak not found"; } + try{ part.roff=this.readwtx(parts[i],'roff'); } + catch(e){ part.error="wtx:roff not found"; } -try{ part.isat=this.readwtx(parts[i],'isat'); } -catch(e){ part.error="wtx:isat not found"; } -try{ part.nfor=this.readwtx(parts[i],'nfor'); } -catch(e){ part.error="wtx:nfor not found"; } + try{ part.irev=this.readwtx(parts[i],'irev'); } + catch(e){ part.error="wtx:irev not found"; } -try{ part.rsource=this.readwtx(parts[i],'rsource'); } -catch(e){ part.error="wtx:rsource not found"; } + try{ part.rbreak=this.readwtx(parts[i],'rbreak'); } + catch(e){ part.error="wtx:rbreak not found"; } -try{ part.rsink=this.readwtx(parts[i],'rsink'); } -catch(e){ part.error="wtx:rsink not found"; } + try{ part.limitswitch=this.readwtx(parts[i],'limitswitch'); } + catch(e){ part.error="wtx:limitswitch not found"; } -try{ part.ilimitsink=this.readwtx(parts[i],'ilimitsink'); } -catch(e){ part.error="wtx:ilimitsink not found"; } + try{ part.ron=this.readwtx(parts[i],'ron'); } + catch(e){ part.error="wtx:ron not found"; } -try{ part.ilimitsource=this.readwtx(parts[i],'ilimitsource'); } -catch(e){ part.error="wtx:ilimitsource not found"; } + try{ part.log=this.readwtx(parts[i],'log'); } + catch(e){ part.error="wtx:log not found"; } -try{ part.vpwr=this.readwtx(parts[i],'vpwr'); } -catch(e){ part.error="wtx:vpwr not found"; } + try{ part.vbreak=this.readwtx(parts[i],'vbreak'); } + catch(e){ part.error="wtx:vbreak not found"; } -try{ part.isource=this.readwtx(parts[i],'isource'); } -catch(e){ part.error="wtx:isource not found"; } -try{ part.isink=this.readwtx(parts[i],'isink'); } -catch(e){ part.error="wtx:isink not found"; } + try{ part.ibreak=this.readwtx(parts[i],'ibreak'); } + catch(e){ part.error="wtx:ibreak not found"; } -try{ part.routdomain=this.readwtx(parts[i],'routdomain'); } -catch(e){ part.error="wtx:routdomain not found"; } + try{ part.isat=this.readwtx(parts[i],'isat'); } + catch(e){ part.error="wtx:isat not found"; } -try{ part.inlow=this.readwtx(parts[i],'inlow'); } -catch(e){ part.error="wtx:inlow not found"; } + try{ part.nfor=this.readwtx(parts[i],'nfor'); } + catch(e){ part.error="wtx:nfor not found"; } -try{ part.inhigh=this.readwtx(parts[i],'inhigh'); } -catch(e){ part.error="wtx:inhigh not found"; } + try{ part.rsource=this.readwtx(parts[i],'rsource'); } + catch(e){ part.error="wtx:rsource not found"; } -try{ part.hyst=this.readwtx(parts[i],'hyst'); } -catch(e){ part.error="wtx:hyst not found"; } + try{ part.rsink=this.readwtx(parts[i],'rsink'); } + catch(e){ part.error="wtx:rsink not found"; } -try{ part.outic=this.readwtx(parts[i],'outic'); } -catch(e){ part.error="wtx:outic not found"; } + try{ part.ilimitsink=this.readwtx(parts[i],'ilimitsink'); } + catch(e){ part.error="wtx:ilimitsink not found"; } + try{ part.ilimitsource=this.readwtx(parts[i],'ilimitsource'); } + catch(e){ part.error="wtx:ilimitsource not found"; } -try{ part.numcoeff=this.readwtx(parts[i],'numcoeff'); } -catch(e){ part.error="wtx:numcoeff not found"; } + try{ part.vpwr=this.readwtx(parts[i],'vpwr'); } + catch(e){ part.error="wtx:vpwr not found"; } + try{ part.isource=this.readwtx(parts[i],'isource'); } + catch(e){ part.error="wtx:isource not found"; } -try{ part.dencoeff=this.readwtx(parts[i],'dencoeff'); } -catch(e){ part.error="wtx:dencoeff not found"; } + try{ part.isink=this.readwtx(parts[i],'isink'); } + catch(e){ part.error="wtx:isink not found"; } -try{ part.lowerdelta=this.readwtx(parts[i],'lowerdelta'); } -catch(e){ part.error="wtx:lowerdelta not found"; } + try{ part.routdomain=this.readwtx(parts[i],'routdomain'); } + catch(e){ part.error="wtx:routdomain not found"; } -try{ part.intic=this.readwtx(parts[i],'intic'); } -catch(e){ part.error="wtx:intic not found"; } + try{ part.inlow=this.readwtx(parts[i],'inlow'); } + catch(e){ part.error="wtx:inlow not found"; } -try{ part.denormfreq=this.readwtx(parts[i],'denormfreq'); } -catch(e){ part.error="wtx:denormfreq not found"; } + try{ part.inhigh=this.readwtx(parts[i],'inhigh'); } + catch(e){ part.error="wtx:inhigh not found"; } -try{ part.riseslope=this.readwtx(parts[i],'riseslope'); } -catch(e){ part.error="wtx:riseslope not found"; } + try{ part.hyst=this.readwtx(parts[i],'hyst'); } + catch(e){ part.error="wtx:hyst not found"; } -try{ part.fallslope=this.readwtx(parts[i],'fallslope'); } -catch(e){ part.error="wtx:fallslope not found"; } + try{ part.outic=this.readwtx(parts[i],'outic'); } + catch(e){ part.error="wtx:outic not found"; } -try{ part.outlow=this.readwtx(parts[i],'outlow'); } -catch(e){ part.error="wtx:outlow not found"; } -try{ part.outhigh=this.readwtx(parts[i],'outhigh'); } -catch(e){ part.error="wtx:outhigh not found"; } + try{ part.numcoeff=this.readwtx(parts[i],'numcoeff'); } + catch(e){ part.error="wtx:numcoeff not found"; } -try{ part.cntlarr=this.readwtx(parts[i],'cntlarr'); } -catch(e){ part.error="wtx:cntlarr not found"; } -try{ part.freqarr=this.readwtx(parts[i],'freqarr'); } -catch(e){ part.error="wtx:freqarr not found"; } + try{ part.dencoeff=this.readwtx(parts[i],'dencoeff'); } + catch(e){ part.error="wtx:dencoeff not found"; } -try{ part.duty=this.readwtx(parts[i],'duty'); } -catch(e){ part.error="wtx:duty not found"; } + try{ part.lowerdelta=this.readwtx(parts[i],'lowerdelta'); } + catch(e){ part.error="wtx:lowerdelta not found"; } -try{ part.risetime=this.readwtx(parts[i],'risetime'); } -catch(e){ part.error="wtx:risetime not found"; } + try{ part.intic=this.readwtx(parts[i],'intic'); } + catch(e){ part.error="wtx:intic not found"; } + try{ part.denormfreq=this.readwtx(parts[i],'denormfreq'); } + catch(e){ part.error="wtx:denormfreq not found"; } -try{ part.falltime=this.readwtx(parts[i],'falltime'); } -catch(e){ part.error="wtx:falltime not found"; } + try{ part.riseslope=this.readwtx(parts[i],'riseslope'); } + catch(e){ part.error="wtx:riseslope not found"; } -try{ part.clktrig=this.readwtx(parts[i],'clktrig'); } -catch(e){ part.error="wtx:clktrig not found"; } + try{ part.fallslope=this.readwtx(parts[i],'fallslope'); } + catch(e){ part.error="wtx:fallslope not found"; } -try{ part.pwarr=this.readwtx(parts[i],'pwarr'); } -catch(e){ part.error="wtx:pwarr not found"; } + try{ part.outlow=this.readwtx(parts[i],'outlow'); } + catch(e){ part.error="wtx:outlow not found"; } -try{ part.ptrig=this.readwtx(parts[i],'ptrig'); } -catch(e){ part.error="wtx:ptrig not found"; } + try{ part.outhigh=this.readwtx(parts[i],'outhigh'); } + catch(e){ part.error="wtx:outhigh not found"; } -try{ part.rdelay=this.readwtx(parts[i],'rdelay'); } -catch(e){ part.error="wtx:rdelay not found"; } + try{ part.cntlarr=this.readwtx(parts[i],'cntlarr'); } + catch(e){ part.error="wtx:cntlarr not found"; } -try{ part.fdelay=this.readwtx(parts[i],'fdelay'); } -catch(e){ part.error="wtx:fdelay not found"; } + try{ part.freqarr=this.readwtx(parts[i],'freqarr'); } + catch(e){ part.error="wtx:freqarr not found"; } -try{ part.rmax=this.readwtx(parts[i],'rmax'); } -catch(e){ part.error="wtx:rmax not found"; } + try{ part.duty=this.readwtx(parts[i],'duty'); } + catch(e){ part.error="wtx:duty not found"; } -try{ part.rmin=this.readwtx(parts[i],'rmin'); } -catch(e){ part.error="wtx:rmin not found"; } + try{ part.risetime=this.readwtx(parts[i],'risetime'); } + catch(e){ part.error="wtx:risetime not found"; } -try{ part.rinit=this.readwtx(parts[i],'isource'); } -catch(e){ part.error="wtx:isource not found"; } -try{ part.vt=this.readwtx(parts[i],'vt'); } -catch(e){ part.error="wtx:vt not found"; } + try{ part.falltime=this.readwtx(parts[i],'falltime'); } + catch(e){ part.error="wtx:falltime not found"; } -try{ part.alpha=this.readwtx(parts[i],'alpha'); } -catch(e){ part.error="wtx:alpha not found"; } + try{ part.clktrig=this.readwtx(parts[i],'clktrig'); } + catch(e){ part.error="wtx:clktrig not found"; } -try{ part.beta=this.readwtx(parts[i],'beta'); } -catch(e){ part.error="wtx:beta not found"; } + try{ part.pwarr=this.readwtx(parts[i],'pwarr'); } + catch(e){ part.error="wtx:pwarr not found"; } -try{ part.clkdelay=this.readwtx(parts[i],'clkdelay'); } -catch(e){ part.error="wtx:clkdelay not found"; } + try{ part.ptrig=this.readwtx(parts[i],'ptrig'); } + catch(e){ part.error="wtx:ptrig not found"; } -try{ part.setdelay=this.readwtx(parts[i],'setdelay'); } -catch(e){ part.error="wtx:setdelay not found"; } + try{ part.rdelay=this.readwtx(parts[i],'rdelay'); } + catch(e){ part.error="wtx:rdelay not found"; } -try{ part.resetdelay=this.readwtx(parts[i],'resetdelay'); } -catch(e){ part.error="wtx:resetdelay not found"; } + try{ part.fdelay=this.readwtx(parts[i],'fdelay'); } + catch(e){ part.error="wtx:fdelay not found"; } -try{ part.ic=this.readwtx(parts[i],'ic'); } -catch(e){ part.error="wtx:ic not found"; } + try{ part.rmax=this.readwtx(parts[i],'rmax'); } + catch(e){ part.error="wtx:rmax not found"; } -try{ part.dataload=this.readwtx(parts[i],'dataload'); } -catch(e){ part.error="wtx:dataload not found"; } + try{ part.rmin=this.readwtx(parts[i],'rmin'); } + catch(e){ part.error="wtx:rmin not found"; } -try{ part.jkload=this.readwtx(parts[i],'jkload'); } -catch(e){ part.error="wtx:jkload not found"; } + try{ part.rinit=this.readwtx(parts[i],'isource'); } + catch(e){ part.error="wtx:isource not found"; } -try{ part.tload=this.readwtx(parts[i],'tload'); } -catch(e){ part.error="wtx:tload not found"; } + try{ part.vt=this.readwtx(parts[i],'vt'); } + catch(e){ part.error="wtx:vt not found"; } -try{ part.srload=this.readwtx(parts[i],'srload'); } -catch(e){ part.error="wtx:srload not found"; } + try{ part.alpha=this.readwtx(parts[i],'alpha'); } + catch(e){ part.error="wtx:alpha not found"; } -try{ part.clkload=this.readwtx(parts[i],'clkload'); } -catch(e){ part.error="wtx:clkload not found"; } + try{ part.beta=this.readwtx(parts[i],'beta'); } + catch(e){ part.error="wtx:beta not found"; } -try{ part.setload=this.readwtx(parts[i],'setload'); } -catch(e){ part.error="wtx:setload not found"; } + try{ part.clkdelay=this.readwtx(parts[i],'clkdelay'); } + catch(e){ part.error="wtx:clkdelay not found"; } -try{ part.resetload=this.readwtx(parts[i],'resetload'); } -catch(e){ part.error="wtx:resetload not found"; } + try{ part.setdelay=this.readwtx(parts[i],'setdelay'); } + catch(e){ part.error="wtx:setdelay not found"; } -try{ part.enableload=this.readwtx(parts[i],'enableload'); } -catch(e){ part.error="wtx:enableload not found"; } + try{ part.resetdelay=this.readwtx(parts[i],'resetdelay'); } + catch(e){ part.error="wtx:resetdelay not found"; } -try{ part.datadelay=this.readwtx(parts[i],'datadelay'); } -catch(e){ part.error="wtx:datadelay not found"; } + try{ part.ic=this.readwtx(parts[i],'ic'); } + catch(e){ part.error="wtx:ic not found"; } -try{ part.enabledelay=this.readwtx(parts[i],'enabledelay'); } -catch(e){ part.error="wtx:enabledelay not found"; } + try{ part.dataload=this.readwtx(parts[i],'dataload'); } + catch(e){ part.error="wtx:dataload not found"; } -try{ part.srdelay=this.readwtx(parts[i],'srdelay'); } -catch(e){ part.error="wtx:srdelay load not found"; } + try{ part.jkload=this.readwtx(parts[i],'jkload'); } + catch(e){ part.error="wtx:jkload not found"; } + try{ part.tload=this.readwtx(parts[i],'tload'); } + catch(e){ part.error="wtx:tload not found"; } + try{ part.srload=this.readwtx(parts[i],'srload'); } + catch(e){ part.error="wtx:srload not found"; } + try{ part.clkload=this.readwtx(parts[i],'clkload'); } + catch(e){ part.error="wtx:clkload not found"; } -try{ part.srdelay=this.readwtx(parts[i],'srdelay'); } -catch(e){ part.error="wtx:srdelay load not found"; } + try{ part.setload=this.readwtx(parts[i],'setload'); } + catch(e){ part.error="wtx:setload not found"; } + try{ part.resetload=this.readwtx(parts[i],'resetload'); } + catch(e){ part.error="wtx:resetload not found"; } -try{ part.outdef=this.readwtx(parts[i],'outdef'); } -catch(e){ part.error="wtx:outdef load not found"; } + try{ part.enableload=this.readwtx(parts[i],'enableload'); } + catch(e){ part.error="wtx:enableload not found"; } + try{ part.datadelay=this.readwtx(parts[i],'datadelay'); } + catch(e){ part.error="wtx:datadelay not found"; } + try{ part.enabledelay=this.readwtx(parts[i],'enabledelay'); } + catch(e){ part.error="wtx:enabledelay not found"; } + try{ part.srdelay=this.readwtx(parts[i],'srdelay'); } + catch(e){ part.error="wtx:srdelay load not found"; } + try{ part.srdelay=this.readwtx(parts[i],'srdelay'); } + catch(e){ part.error="wtx:srdelay load not found"; } + try{ part.outdef=this.readwtx(parts[i],'outdef'); } + catch(e){ part.error="wtx:outdef load not found"; } - list.push(part); + list.push(part); } return list; - }, + /*detect analog and digital mix*/ mixedsignals:function(analogwires,digitalwires){ @@ -830,8 +829,8 @@ if(parts[i].analogpins!=undefined){ /* creates all netlist data from parts data*/ getnodes:function(parts){ - var sections={netlist:[],coupling:[],firstdir:[],simulation:[],lastdir:[]}; - + var sections={netlist:[],coupling:[],firstdir:[],simulation:[],lastdir:[]}; + //if(this.numberwires(parts))return {firstdir:[],netlist:[{error:"pin is both analog and digital"}],lastdir:[],plot:[]}; this.numberwires(parts); for(var i=0;i g'); if(parts.length<1){ @@ -897,11 +894,8 @@ createnetlist:function(responsefunc){ return; } - - var partswtx=this.sortnetlist(this.getwtxdata(parts)); - if(partswtx[0].type.toLowerCase()!='gnd'){ responsefunc('no ground node'); return; @@ -917,406 +911,399 @@ createnetlist:function(responsefunc){ var command=""; for(var i=0;i b.index? 1:a.index < b.index?-1:0;}) -// console.log(pins); -for(var j=0;j b.index? 1:a.index < b.index?-1:0;}) + //console.log(pins); + for(var j=0;j .webtronics_namewire_connector') -for(var i=0;i .webtronics_namewire_connector') + for(var i=0;i