summaryrefslogtreecommitdiff
path: root/views/script
diff options
context:
space:
mode:
authoramritaH2016-06-29 01:39:23 +0530
committeramritaH2016-06-29 01:39:23 +0530
commit6cf6929d5c36b964dc6643182059e6f02a910fcc (patch)
tree98cbc2de45d68476fe45e76bc9d3fdc13e10e17b /views/script
parent7b18632ad83bb034655c983bae017d429d574934 (diff)
downloadeSimWebApp-6cf6929d5c36b964dc6643182059e6f02a910fcc.tar.gz
eSimWebApp-6cf6929d5c36b964dc6643182059e6f02a910fcc.tar.bz2
eSimWebApp-6cf6929d5c36b964dc6643182059e6f02a910fcc.zip
Hybridmodels,deletekeypress added
Diffstat (limited to 'views/script')
-rw-r--r--views/script/gui.js438
-rw-r--r--views/script/netlist.js202
2 files changed, 624 insertions, 16 deletions
diff --git a/views/script/gui.js b/views/script/gui.js
index e686d49..a9ea209 100644
--- a/views/script/gui.js
+++ b/views/script/gui.js
@@ -24,7 +24,7 @@ var webtronics={
Vlist:/\s*expression|\s*url|.*script/,
Alist:/^(x|y|x1|y1|x2|y2|dx|dy|cx|cy|r|width|height|style|transform|d|id|xml:space|class|fill|stroke|text-anchor|visibility|fill-opacity|stroke-linejoin|stroke-linecap|stroke-opacity|stroke-width|xmlns|xmlns:wtx|connects|partvalue|flippable|spice|index|font-size|font-weight|font-style|font-family)$/,
- Elist:/^(path|circle|rect|line|text|g|tspan|svg|wtx:limitswitch|wtx:irev|wtx:rbreak|wtx:inoffset|wtx:gain|wtx:outoffset|wtx:ingain|wtx:outgain|wtx:denoffset|wtx:dengain|wtx:numoffset|wtx:numgain|wtx:fraction|wtx:dendomain|wtx:denlowerlimit|wtx:outlowerlimit|wtx:outupperlimit|wtx:limitrange|wtx:upperdelta|wtx:lowerdelta|wtx:indomain|wtx:xarr|wtx:yarr|wtx:amodel|wtx:coff|wtx:con|wtx:roff|wtx:ron|wtx:log|wtx:vbreak|wtx:ibreak|wtx:isat|wtx:nfor|wtx:rsource|wtx:rsink|wtx:ilimitsource|wtx:ilimitsink|wtx:vpwr|wtx:isource|wtx:isink|wtx:routdomain|wtx:inlow|wtx:inhigh|wtx:hyst|wtx:outic|wtx:numcoeff|wtx:dencoeff|wtx:intic|wtx:denormfreq|wtx:riseslope|wtx:fallslope|wtx:outlow|wtx:outhigh|wtx:cntlarr|wtx:freqarr|wtx:duty|wtx:risetime|wtx:falltime|wtx:clktrig|wtx:pwarr|wtx:ptrig|wtx:rdelay|wtx:fdelay|wtx:rmax|wtx:rmin|wtx:rinit|wtx:vt|wtx:alpha|wtx:beta|wtx:eval1|wtx:eval2|wtx:eval3|wtx:eval4|wtx:eval5|wtx:eval6|wtx:pwlval1|wtx:pwlval2|wtx:pwlval3|wtx:pwlval4|wtx:pwlval5|wtx:pwlval6|wtx:pwlval7|wtx:pwlval8|wtx:pulval1|wtx:pulval2|wtx:pulval3|wtx:pulval4|wtx:pulval5|wtx:pulval6|wtx:pulval7|wtx:amplitude|wtx:phase|wtx:offsetvoltage|wtx:voltageamplitude|wtx:frequency|wtx:delaytime|wtx:dampingfactor|wtx:part|wtx:pins|wtx:analog|wtx:digital|wtx:node|wtx:id|wtx:type|wtx:name|wtx:category|wtx:value|wtx:label|wtx:spice|wtx:risedelay|wtx:inputload|wtx:falldelay|wtx:flip|wtx:model|wtx:measure|metadata|)$/,
+ Elist:/^(path|circle|rect|line|text|g|tspan|svg|wtx:limitswitch|wtx:irev|wtx:rbreak|wtx:inoffset|wtx:gain|wtx:outoffset|wtx:outundef|wtx:ingain|wtx:outgain|wtx:denoffset|wtx:dengain|wtx:numoffset|wtx:numgain|wtx:fraction|wtx:dendomain|wtx:denlowerlimit|wtx:outlowerlimit|wtx:outupperlimit|wtx:limitrange|wtx:upperdelta|wtx:lowerdelta|wtx:indomain|wtx:xarr|wtx:yarr|wtx:amodel|wtx:coff|wtx:con|wtx:roff|wtx:ron|wtx:log|wtx:vbreak|wtx:ibreak|wtx:isat|wtx:nfor|wtx:rsource|wtx:rsink|wtx:ilimitsource|wtx:ilimitsink|wtx:vpwr|wtx:isource|wtx:isink|wtx:routdomain|wtx:inlow|wtx:inhigh|wtx:hyst|wtx:outic|wtx:numcoeff|wtx:dencoeff|wtx:intic|wtx:denormfreq|wtx:riseslope|wtx:fallslope|wtx:outlow|wtx:outhigh|wtx:cntlarr|wtx:freqarr|wtx:duty|wtx:risetime|wtx:falltime|wtx:clktrig|wtx:pwarr|wtx:ptrig|wtx:rdelay|wtx:fdelay|wtx:rmax|wtx:rmin|wtx:rinit|wtx:vt|wtx:alpha|wtx:beta|wtx:eval1|wtx:eval2|wtx:eval3|wtx:eval4|wtx:eval5|wtx:eval6|wtx:pwlval1|wtx:pwlval2|wtx:pwlval3|wtx:pwlval4|wtx:pwlval5|wtx:pwlval6|wtx:pwlval7|wtx:pwlval8|wtx:pulval1|wtx:pulval2|wtx:pulval3|wtx:pulval4|wtx:pulval5|wtx:pulval6|wtx:pulval7|wtx:amplitude|wtx:phase|wtx:offsetvoltage|wtx:voltageamplitude|wtx:frequency|wtx:delaytime|wtx:dampingfactor|wtx:part|wtx:pins|wtx:analog|wtx:digital|wtx:node|wtx:id|wtx:type|wtx:name|wtx:category|wtx:value|wtx:label|wtx:spice|wtx:risedelay|wtx:inputload|wtx:falldelay|wtx:flip|wtx:model|wtx:measure|metadata|)$/,
/* .lib files contain spice .model devices .mod devices contain .subckt devices and the id must begin with x*/
// serverurls:["http://logical.github.io/webtronix/webtronix_server"],
serverurls:["webtronix_server"],
@@ -155,6 +155,7 @@ openProperties:function(){
var type=netlistcreator.readwtx(this.circuit.selected[0],"type");
var category=netlistcreator.readwtx(this.circuit.selected[0],"category");
jQuery(".analog").hide();
+jQuery(".digital").hide();
$("models").style.display='block'
$("webtronics_risedelay").style.display='none';
@@ -499,7 +500,237 @@ jQuery(".analog").hide();
$("webtronics_amplitude").style.display='none'
$("webtronics_phase").style.display='none'
}
-
+
+ else if(category=="digitalmodels")
+ {
+ $("models").style.display='none'
+ if(c=="dff"){
+ $("webtronics_clkdelay").style.display='block'
+ $("webtronics_setdelay").style.display='block'
+ $("webtronics_resetdelay").style.display='block'
+ $("webtronics_ic").style.display='block'
+ $("webtronics_dataload").style.display='block'
+ $("webtronics_clkload").style.display='block'
+ $("webtronics_setload").style.display='block'
+ $("webtronics_resetload").style.display='block'
+ $("webtronics_risedelay").style.display='block'
+ $("webtronics_falldelay").style.display='block'
+
+ var clkdelay = netlistcreator.readwtx(this.circuit.selected[0],"clkdelay");
+ if(clkdelay!=""){$(webtronics_clkdelay_value).value=clkdelay;}
+ var setdelay = netlistcreator.readwtx(this.circuit.selected[0],"setdelay");
+ if(setdelay!=""){$(webtronics_setdelay_value).value=setdelay;}
+ var resetdelay = netlistcreator.readwtx(this.circuit.selected[0],"resetdelay");
+ if(resetdelay!=""){$(webtronics_resetdelay_value).value=resetdelay;}
+ var ic = netlistcreator.readwtx(this.circuit.selected[0],"ic");
+ if(ic!=""){$(webtronics_ic_value).value=ic;}
+ var dataload = netlistcreator.readwtx(this.circuit.selected[0],"dataload");
+ if(dataload!=""){$(webtronics_dataload_value).value=dataload;}
+ var clkload = netlistcreator.readwtx(this.circuit.selected[0],"clkload");
+ if(clkload!=""){$(webtronics_clkload_value).value=clkload;}
+ var setload = netlistcreator.readwtx(this.circuit.selected[0],"setload");
+ if(setload!=""){$(webtronics_setload_value).value=setload;}
+ var resetload = netlistcreator.readwtx(this.circuit.selected[0],"resetload");
+ if(resetload!=""){$(webtronics_resetload_value).value=resetload;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
+ if(c=="jkff"){
+ $("webtronics_clkdelay").style.display='block'
+ $("webtronics_setdelay").style.display='block'
+ $("webtronics_resetdelay").style.display='block'
+ $("webtronics_ic").style.display='block'
+ $("webtronics_jkload").style.display='block'
+ $("webtronics_clkload").style.display='block'
+ $("webtronics_setload").style.display='block'
+ $("webtronics_resetload").style.display='block'
+ $("webtronics_risedelay").style.display='block'
+ $("webtronics_falldelay").style.display='block'
+
+ var clkdelay = netlistcreator.readwtx(this.circuit.selected[0],"clkdelay");
+ if(clkdelay!=""){$(webtronics_clkdelay_value).value=clkdelay;}
+ var setdelay = netlistcreator.readwtx(this.circuit.selected[0],"setdelay");
+ if(setdelay!=""){$(webtronics_setdelay_value).value=setdelay;}
+ var resetdelay = netlistcreator.readwtx(this.circuit.selected[0],"resetdelay");
+ if(resetdelay!=""){$(webtronics_resetdelay_value).value=resetdelay;}
+ var ic = netlistcreator.readwtx(this.circuit.selected[0],"ic");
+ if(ic!=""){$(webtronics_ic_value).value=ic;}
+ var jkload = netlistcreator.readwtx(this.circuit.selected[0],"jkload");
+ if(jkload!=""){$(webtronics_jkload_value).value=jkload;}
+ var clkload = netlistcreator.readwtx(this.circuit.selected[0],"clkload");
+ if(clkload!=""){$(webtronics_clkload_value).value=clkload;}
+ var setload = netlistcreator.readwtx(this.circuit.selected[0],"setload");
+ if(setload!=""){$(webtronics_setload_value).value=setload;}
+ var resetload = netlistcreator.readwtx(this.circuit.selected[0],"resetload");
+ if(resetload!=""){$(webtronics_resetload_value).value=resetload;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
+ if(c=="tff"){
+ $("webtronics_clkdelay").style.display='block'
+ $("webtronics_setdelay").style.display='block'
+ $("webtronics_resetdelay").style.display='block'
+ $("webtronics_ic").style.display='block'
+ $("webtronics_tload").style.display='block'
+ $("webtronics_clkload").style.display='block'
+ $("webtronics_setload").style.display='block'
+ $("webtronics_resetload").style.display='block'
+ $("webtronics_risedelay").style.display='block'
+ $("webtronics_falldelay").style.display='block'
+
+ var clkdelay = netlistcreator.readwtx(this.circuit.selected[0],"clkdelay");
+ if(clkdelay!=""){$(webtronics_clkdelay_value).value=clkdelay;}
+ var setdelay = netlistcreator.readwtx(this.circuit.selected[0],"setdelay");
+ if(setdelay!=""){$(webtronics_setdelay_value).value=setdelay;}
+ var resetdelay = netlistcreator.readwtx(this.circuit.selected[0],"resetdelay");
+ if(resetdelay!=""){$(webtronics_resetdelay_value).value=resetdelay;}
+ var ic = netlistcreator.readwtx(this.circuit.selected[0],"ic");
+ if(ic!=""){$(webtronics_ic_value).value=ic;}
+ var tload = netlistcreator.readwtx(this.circuit.selected[0],"tload");
+ if(tload!=""){$(webtronics_tload_value).value=tload;}
+ var clkload = netlistcreator.readwtx(this.circuit.selected[0],"clkload");
+ if(clkload!=""){$(webtronics_clkload_value).value=clkload;}
+ var setload = netlistcreator.readwtx(this.circuit.selected[0],"setload");
+ if(setload!=""){$(webtronics_setload_value).value=setload;}
+ var resetload = netlistcreator.readwtx(this.circuit.selected[0],"resetload");
+ if(resetload!=""){$(webtronics_resetload_value).value=resetload;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
+ if(c=="srff"){
+ $("webtronics_clkdelay").style.display='block'
+ $("webtronics_setdelay").style.display='block'
+ $("webtronics_resetdelay").style.display='block'
+ $("webtronics_ic").style.display='block'
+ $("webtronics_srload").style.display='block'
+ $("webtronics_clkload").style.display='block'
+ $("webtronics_setload").style.display='block'
+ $("webtronics_resetload").style.display='block'
+ $("webtronics_risedelay").style.display='block'
+ $("webtronics_falldelay").style.display='block'
+
+ var clkdelay = netlistcreator.readwtx(this.circuit.selected[0],"clkdelay");
+ if(clkdelay!=""){$(webtronics_clkdelay_value).value=clkdelay;}
+ var setdelay = netlistcreator.readwtx(this.circuit.selected[0],"setdelay");
+ if(setdelay!=""){$(webtronics_setdelay_value).value=setdelay;}
+ var resetdelay = netlistcreator.readwtx(this.circuit.selected[0],"resetdelay");
+ if(resetdelay!=""){$(webtronics_resetdelay_value).value=resetdelay;}
+ var ic = netlistcreator.readwtx(this.circuit.selected[0],"ic");
+ if(ic!=""){$(webtronics_ic_value).value=ic;}
+ var srload = netlistcreator.readwtx(this.circuit.selected[0],"srload");
+ if(srload!=""){$(webtronics_srload_value).value=srload;}
+ var clkload = netlistcreator.readwtx(this.circuit.selected[0],"clkload");
+ if(clkload!=""){$(webtronics_clkload_value).value=clkload;}
+ var setload = netlistcreator.readwtx(this.circuit.selected[0],"setload");
+ if(setload!=""){$(webtronics_setload_value).value=setload;}
+ var resetload = netlistcreator.readwtx(this.circuit.selected[0],"resetload");
+ if(resetload!=""){$(webtronics_resetload_value).value=resetload;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
+ if(c=="dlatch"){
+ $("webtronics_datadelay").style.display='block'
+ $("webtronics_setdelay").style.display='block'
+ $("webtronics_resetdelay").style.display='block'
+ $("webtronics_ic").style.display='block'
+ $("webtronics_enabledelay").style.display='block'
+ $("webtronics_dataload").style.display='block'
+ $("webtronics_enableload").style.display='block'
+ $("webtronics_setload").style.display='block'
+ $("webtronics_resetload").style.display='block'
+ $("webtronics_risedelay").style.display='block'
+ $("webtronics_falldelay").style.display='block'
+
+ var datadelay = netlistcreator.readwtx(this.circuit.selected[0],"datadelay");
+ if(datadelay!=""){$(webtronics_datadelay_value).value=datadelay;}
+ var setdelay = netlistcreator.readwtx(this.circuit.selected[0],"setdelay");
+ if(setdelay!=""){$(webtronics_setdelay_value).value=setdelay;}
+ var resetdelay = netlistcreator.readwtx(this.circuit.selected[0],"resetdelay");
+ if(resetdelay!=""){$(webtronics_resetdelay_value).value=resetdelay;}
+ var ic = netlistcreator.readwtx(this.circuit.selected[0],"ic");
+ if(ic!=""){$(webtronics_ic_value).value=ic;}
+ var enabledelay = netlistcreator.readwtx(this.circuit.selected[0],"enabledelay");
+ if(enabledelay!=""){$(webtronics_enabledelay_value).value=enabledelay;}
+ var dataload = netlistcreator.readwtx(this.circuit.selected[0],"dataload");
+ if(dataload!=""){$(webtronics_dataload_value).value=dataload;}
+ var enableload = netlistcreator.readwtx(this.circuit.selected[0],"enableload");
+ if(enableload!=""){$(webtronics_enableload_value).value=enableload;}
+ var setload = netlistcreator.readwtx(this.circuit.selected[0],"setload");
+ if(setload!=""){$(webtronics_setload_value).value=setload;}
+ var resetload = netlistcreator.readwtx(this.circuit.selected[0],"resetload");
+ if(resetload!=""){$(webtronics_resetload_value).value=resetload;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
+ if(c=="srlatch"){
+ $("webtronics_srdelay").style.display='block'
+ $("webtronics_setdelay").style.display='block'
+ $("webtronics_resetdelay").style.display='block'
+ $("webtronics_ic").style.display='block'
+ $("webtronics_enabledelay").style.display='block'
+ $("webtronics_srload").style.display='block'
+ $("webtronics_enableload").style.display='block'
+ $("webtronics_setload").style.display='block'
+ $("webtronics_resetload").style.display='block'
+ $("webtronics_risedelay").style.display='block'
+ $("webtronics_falldelay").style.display='block'
+
+ var srdelay = netlistcreator.readwtx(this.circuit.selected[0],"srdelay");
+ if(srdelay!=""){$(webtronics_srdelay_value).value=srdelay;}
+ var setdelay = netlistcreator.readwtx(this.circuit.selected[0],"setdelay");
+ if(setdelay!=""){$(webtronics_setdelay_value).value=setdelay;}
+ var resetdelay = netlistcreator.readwtx(this.circuit.selected[0],"resetdelay");
+ if(resetdelay!=""){$(webtronics_resetdelay_value).value=resetdelay;}
+ var ic = netlistcreator.readwtx(this.circuit.selected[0],"ic");
+ if(ic!=""){$(webtronics_ic_value).value=ic;}
+ var enabledelay = netlistcreator.readwtx(this.circuit.selected[0],"enabledelay");
+ if(enabledelay!=""){$(webtronics_enabledelay_value).value=enabledelay;}
+ var srload = netlistcreator.readwtx(this.circuit.selected[0],"srload");
+ if(srload!=""){$(webtronics_srload_value).value=srload;}
+ var enableload = netlistcreator.readwtx(this.circuit.selected[0],"enableload");
+ if(enableload!=""){$(webtronics_enableload_value).value=enableload;}
+ var setload = netlistcreator.readwtx(this.circuit.selected[0],"setload");
+ if(setload!=""){$(webtronics_setload_value).value=setload;}
+ var resetload = netlistcreator.readwtx(this.circuit.selected[0],"resetload");
+ if(resetload!=""){$(webtronics_resetload_value).value=resetload;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
+
+ if(c=='and'|| c=='not'|| c=='nand'|| c=='or'||c=='nor'||c=='xor'||c=='xnor')
+ {
+
+ $("webtronics_risedelay").style.display='block';
+ $("webtronics_falldelay").style.display='block';
+ $("webtronics_inputload").style.display='block';
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_part_risedelay).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_part_falldelay).value=falldelay;}
+ var inputload = netlistcreator.readwtx(this.circuit.selected[0],"inputload");
+ if(inputload!=""){$(webtronics_part_inputload).value=inputload;}
+
+ }
+ }
+
else if(category=="analogmodels"){
$("models").style.display='none'
if(c=="gains"){
@@ -960,25 +1191,81 @@ jQuery(".analog").hide();
var value=netlistcreator.readwtx(this.circuit.selected[0],"value");
if(value!=""){$('webtronics_part_value').value=value;}
- if(c=='and'|| c=='not'|| c=='nand'|| c=='or'||c=='nor'||c=='xor'||c=='xnor')
+ if(c=="dac_bridge")
+ {
+ $("webtronics_outlow").style.display='table-row'
+ $("webtronics_outhigh").style.display='table-row'
+ $("webtronics_outundef").style.display='table-row'
+ $("webtronics_inputload").style.display='block';
+ $("webtronics_falltime").style.display='table-row'
+ $("webtronics_risetime").style.display='table-row'
+ $("valuemodel").style.display='none'
+ var outlow = netlistcreator.readwtx(this.circuit.selected[0],"outlow");
+ if(outlow!=""){$(webtronics_outlow_value).value=outlow;}
+ var outhigh = netlistcreator.readwtx(this.circuit.selected[0],"outhigh");
+ if(outhigh!=""){$(webtronics_outhigh_value).value=outhigh;}
+ var outundef = netlistcreator.readwtx(this.circuit.selected[0],"outundef");
+ if(outundef!=""){$(webtronics_outundef_value).value=outundef;}
+ var inputload = netlistcreator.readwtx(this.circuit.selected[0],"inputload");
+ if(inputload!=""){$(webtronics_inputload_value).value=inputload;}
+ var risetime = netlistcreator.readwtx(this.circuit.selected[0],"risetime");
+ if(risetime!=""){$(webtronics_risetime_value).value=risetime;}
+ var falltime = netlistcreator.readwtx(this.circuit.selected[0],"falltime");
+ if(falltime!=""){$(webtronics_falltime_value).value=falltime;}
+
+ }
+
+ if(c=="adc_bridge")
{
+ $("webtronics_outundef").style.display='none'
+ $("webtronics_inlow").style.display='table-row'
+ $("webtronics_inhigh").style.display='table-row'
+ $("webtronics_risedelay").style.display='block';
+ $("webtronics_falldelay").style.display='block';
+ $("valuemodel").style.display='none'
+ var inlow = netlistcreator.readwtx(this.circuit.selected[0],"inlow");
+ if(inlow!=""){$(webtronics_inlow_value).value=inlow;}
+ var inhigh = netlistcreator.readwtx(this.circuit.selected[0],"inhigh");
+ if(inhigh!=""){$(webtronics_inhigh_value).value=inhigh;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
- $("webtronics_risedelay").style.display='block';
- $("webtronics_falldelay").style.display='block';
- $("webtronics_inputload").style.display='block';
- var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
- if(risedelay!=""){$(webtronics_part_risedelay).value=risedelay;}
- var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
- if(falldelay!=""){$(webtronics_part_falldelay).value=falldelay;}
- var inputload = netlistcreator.readwtx(this.circuit.selected[0],"inputload");
- if(inputload!=""){$(webtronics_part_inputload).value=inputload;}
+
+
}
+ if(c=="cdo")
+ {
+ $("webtronics_cntlarr").style.display='table-row'
+ $("webtronics_freqarr").style.display='table-row'
+ $("webtronics_duty").style.display='table-row'
+ $("webtronics_phase").style.display='table-row'
+ $("webtronics_risedelay").style.display='block';
+ $("webtronics_falldelay").style.display='block';
+ $("valuemodel").style.display='none';
+ $("webtronics_outundef").style.display='none'
+
+ var cntlarr = netlistcreator.readwtx(this.circuit.selected[0],"cntlarr");
+ if(cntlarr!=""){$(webtronics_cntlarr_value).value=cntlarr;}
+ var freqarr = netlistcreator.readwtx(this.circuit.selected[0],"freqarr");
+ if(freqarr!=""){$(webtronics_freqarr_value).value=freqarr;}
+ var duty = netlistcreator.readwtx(this.circuit.selected[0],"duty");
+ if(duty!=""){$(webtronics_duty_value).value=duty;}
+ var phase = netlistcreator.readwtx(this.circuit.selected[0],"phase");
+ if(phase!=""){$(webtronics_phase_value).value=phase;}
+ var risedelay = netlistcreator.readwtx(this.circuit.selected[0],"risedelay");
+ if(risedelay!=""){$(webtronics_risedelay_value).value=risedelay;}
+ var falldelay = netlistcreator.readwtx(this.circuit.selected[0],"falldelay");
+ if(falldelay!=""){$(webtronics_falldelay_value).value=falldelay;}
+ }
+
}
if(category=="mosfets"||category=="transistors"){
- $("directive").style.display='block';
+ $("directive").style.display='block';
}
if(c=="diode")$("directive").style.display='block'
@@ -1137,7 +1424,16 @@ file_new:function(){
}
}.bind(this));
-
+ Event.observe(this.circuit.container,'keydown',function(e){
+ if(e.keyCode == 46) {
+ // alert('Delete Key Pressed');
+ webtronics.circuit.clearinfo();
+ webtronics.circuit.addhistory();
+ webtronics.circuit.deleteSelection();
+ }
+
+ }.bind(this));
+
},
formatnetlist:function(spice1,spice2){
@@ -1499,6 +1795,15 @@ if($("webtronics_select"))Event.observe($('webtronics_select'), 'click', functio
webtronics.circuit.addhistory();
webtronics.circuit.deleteSelection();
});
+
+ Event.observe($(document), 'keydown', function(e) {
+ if(e.keyCode == 46) {
+ webtronics.circuit.clearinfo();
+ webtronics.circuit.addhistory();
+ webtronics.circuit.deleteSelection();
+ }
+ });
+
/*
if($('webtronics_save')){
Event.observe($('webtronics_save'), 'click', function() {
@@ -1965,6 +2270,111 @@ else if(modelname=="oneshot"){
netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
netlistcreator.writewtx(model,"inputload",$('webtronics_inputload_value').value);
}
+ else if(modelname=="dff"){
+ netlistcreator.writewtx(model,"clkdelay",$('webtronics_clkdelay_value').value);
+ netlistcreator.writewtx(model,"setdelay",$('webtronics_setdelay_value').value);
+ netlistcreator.writewtx(model,"resetdelay",$('webtronics_resetdelay_value').value);
+ netlistcreator.writewtx(model,"ic",$('webtronics_ic_value').value);
+ netlistcreator.writewtx(model,"dataload",$('webtronics_dataload_value').value);
+ netlistcreator.writewtx(model,"clkload",$('webtronics_clkload_value').value);
+ netlistcreator.writewtx(model,"setload",$('webtronics_seload_value').value);
+ netlistcreator.writewtx(model,"resetload",$('webtronics_resetload_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+
+ }
+ else if(modelname=="jkff"){
+ netlistcreator.writewtx(model,"clkdelay",$('webtronics_clkdelay_value').value);
+ netlistcreator.writewtx(model,"setdelay",$('webtronics_setdelay_value').value);
+ netlistcreator.writewtx(model,"resetdelay",$('webtronics_resetdelay_value').value);
+ netlistcreator.writewtx(model,"ic",$('webtronics_ic_value').value);
+ netlistcreator.writewtx(model,"jkload",$('webtronics_jkload_value').value);
+ netlistcreator.writewtx(model,"clkload",$('webtronics_clkload_value').value);
+ netlistcreator.writewtx(model,"setload",$('webtronics_seload_value').value);
+ netlistcreator.writewtx(model,"resetload",$('webtronics_resetload_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+ }
+ else if(modelname=="tff"){
+ netlistcreator.writewtx(model,"clkdelay",$('webtronics_clkdelay_value').value);
+ netlistcreator.writewtx(model,"setdelay",$('webtronics_setdelay_value').value);
+ netlistcreator.writewtx(model,"resetdelay",$('webtronics_resetdelay_value').value);
+ netlistcreator.writewtx(model,"ic",$('webtronics_ic_value').value);
+ netlistcreator.writewtx(model,"tload",$('webtronics_tload_value').value);
+ netlistcreator.writewtx(model,"clkload",$('webtronics_clkload_value').value);
+ netlistcreator.writewtx(model,"setload",$('webtronics_seload_value').value);
+ netlistcreator.writewtx(model,"resetload",$('webtronics_resetload_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+ }
+ else if(modelname=="srff"){
+ netlistcreator.writewtx(model,"clkdelay",$('webtronics_clkdelay_value').value);
+ netlistcreator.writewtx(model,"setdelay",$('webtronics_setdelay_value').value);
+ netlistcreator.writewtx(model,"resetdelay",$('webtronics_resetdelay_value').value);
+ netlistcreator.writewtx(model,"ic",$('webtronics_ic_value').value);
+ netlistcreator.writewtx(model,"srload",$('webtronics_srload_value').value);
+ netlistcreator.writewtx(model,"clkload",$('webtronics_clkload_value').value);
+ netlistcreator.writewtx(model,"setload",$('webtronics_seload_value').value);
+ netlistcreator.writewtx(model,"resetload",$('webtronics_resetload_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+ }
+ else if(modelname=="dlatch"){
+ netlistcreator.writewtx(model,"datadelay",$('webtronics_datadelay_value').value);
+ netlistcreator.writewtx(model,"enabledelay",$('webtronics_enabledelay_value').value);
+ netlistcreator.writewtx(model,"setdelay",$('webtronics_setdelay_value').value);
+ netlistcreator.writewtx(model,"resetdelay",$('webtronics_resetdelay_value').value);
+ netlistcreator.writewtx(model,"ic",$('webtronics_ic_value').value);
+ netlistcreator.writewtx(model,"dataload",$('webtronics_dataload_value').value);
+ netlistcreator.writewtx(model,"enableload",$('webtronics_enableload_value').value);
+ netlistcreator.writewtx(model,"setload",$('webtronics_seload_value').value);
+ netlistcreator.writewtx(model,"resetload",$('webtronics_resetload_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+ }
+ else if(modelname=="srlatch"){
+ netlistcreator.writewtx(model,"datadelay",$('webtronics_datadelay_value').value);
+ netlistcreator.writewtx(model,"enabledelay",$('webtronics_enabledelay_value').value);
+ netlistcreator.writewtx(model,"setdelay",$('webtronics_setdelay_value').value);
+ netlistcreator.writewtx(model,"resetdelay",$('webtronics_resetdelay_value').value);
+ netlistcreator.writewtx(model,"ic",$('webtronics_ic_value').value);
+ netlistcreator.writewtx(model,"srload",$('webtronics_srload_value').value);
+ netlistcreator.writewtx(model,"enableload",$('webtronics_enableload_value').value);
+ netlistcreator.writewtx(model,"setload",$('webtronics_seload_value').value);
+ netlistcreator.writewtx(model,"resetload",$('webtronics_resetload_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+ }
+
+ else if(modelname=="cdo"){
+ netlistcreator.writewtx(model,"cntlarr",$('webtronics_cntlarr_value').value);
+ netlistcreator.writewtx(model,"freqarr",$('webtronics_freqarr_value').value);
+ netlistcreator.writewtx(model,"duty",$('webtronics_duty_value').value);
+ netlistcreator.writewtx(model,"phase",$('webtronics_phase_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+
+ }
+
+ else if(modelname=="adc_bridge"){
+ netlistcreator.writewtx(model,"inlow",$('webtronics_inlow_value').value);
+ netlistcreator.writewtx(model,"inhigh",$('webtronics_inhigh_value').value);
+ netlistcreator.writewtx(model,"risedelay",$('webtronics_risedelay_value').value);
+ netlistcreator.writewtx(model,"falldelay",$('webtronics_falldelay_value').value);
+
+ }
+
+ else if(modelname=="dac_bridge")
+ {
+ netlistcreator.writewtx(model,"outlow",$('webtronics_outlow_value').value);
+ netlistcreator.writewtx(model,"outhigh",$('webtronics_outhigh_value').value);
+ netlistcreator.writewtx(model,"outundef",$('webtronics_outundef_value').value);
+ netlistcreator.writewtx(model,"inputload",$('webtronics_inputload_value').value);
+ netlistcreator.writewtx(model,"outlow",$('webtronics_risetime_value').value);
+ netlistcreator.writewtx(model,"falltime",$('webtronics_falltime_value').value);
+ }
+
+
webtronics.circuit.createvalue(webtronics.circuit.selected[0]);
});
diff --git a/views/script/netlist.js b/views/script/netlist.js
index d8a3655..f5876d7 100644
--- a/views/script/netlist.js
+++ b/views/script/netlist.js
@@ -210,7 +210,7 @@ tovector:function(pin,nodenumber){
for(var i=0;i<parts.length;i++){
var part={error:"", elem:{}, analogpins:[],digitalpins:[],amplitude:"",phase:"",offsetvoltage:"",voltageamplitude:"",frequency:"",delaytime:"",dampingfactor:"",type:"", name:"", category:"", value:"", spice:"", model:"",measure:"", risedelay:"", falldelay:"", pulval1:"", pulval2:"", pulval3:"", pulval4:"", pulval5:"", pulval6:"", pulval7:"", eval1:"", eval2:"", eval3:"", eval4:"", eval5:"", eval6:"", pwlval1:"", pwlval2:"", pwlval3:"", pwlval4:"", pwlval5:"", pwlval6:"", pwlval7:"", pwlval8:"",
inoffset:"",gain:"",outoffset:"",ingain:"",outgain:"",denoffset:"",dengain:"",numoffset:"",numgain:"",fraction:"",dendomain:"",denlowerlimit:"",outlowerlimit:"",outupperlimit:"",limitrange:"",upperdelta:"",lowerdelta:"",indomain:"",xarr:"",yarr:"",amodel:"",coff:"",con:"",irev:"",rbreak:"",limitswitch:"",roff:"",ron:"",log:"",vbreak:"",ibreak:"",isat:"",nfor:"",rsource:"",rsink:"",ilimitsource:"",ilimitsink:"",vpwr:"",isource:"",isink:"",routdomain:"",inlow:"",inhigh:"",hyst:"",outic:"",numcoeff:"",dencoeff:"",intic:"",denormfreq:"",
- riseslope:"",fallslope:"",outlow:"",outhigh:"",cntlarr:"",freqarr:"",duty:"",risetime:"",falltime:"",clktrig:"",pwarr:"",ptrig:"",rdelay:"",fdelay:"",rmax:"",rmin:"",rinit:"",vt:"",alpha:"",beta:""
+ riseslope:"",fallslope:"",outlow:"",outhigh:"",cntlarr:"",freqarr:"",duty:"",risetime:"",falltime:"",clktrig:"",pwarr:"",ptrig:"",rdelay:"",fdelay:"",rmax:"",rmin:"",rinit:"",vt:"",alpha:"",beta:"", clkdelay:"", setdelay:"", resetdelay:"", ic:"", dataload:"", jkload:"", tload:"", srload:"", clkload:"", setload:"", resetload:"", datadelay:"", enableload:"",srdelay:"", enabledelay:"", outundef:""
}
@@ -654,8 +654,60 @@ catch(e){ part.error="wtx:alpha not found"; }
try{ part.beta=this.readwtx(parts[i],'beta'); }
catch(e){ part.error="wtx:beta not found"; }
+try{ part.clkdelay=this.readwtx(parts[i],'clkdelay'); }
+catch(e){ part.error="wtx:clkdelay not found"; }
+try{ part.setdelay=this.readwtx(parts[i],'setdelay'); }
+catch(e){ part.error="wtx:setdelay not found"; }
+try{ part.resetdelay=this.readwtx(parts[i],'resetdelay'); }
+catch(e){ part.error="wtx:resetdelay not found"; }
+
+try{ part.ic=this.readwtx(parts[i],'ic'); }
+catch(e){ part.error="wtx:ic not found"; }
+
+try{ part.dataload=this.readwtx(parts[i],'dataload'); }
+catch(e){ part.error="wtx:dataload 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.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.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"; }
@@ -824,7 +876,7 @@ getnodes:function(parts){
delaytime:parts[i].delaytime,dampingfactor:parts[i].dampingfactor,eval1:parts[i].eval1,eval2:parts[i].eval2,eval3:parts[i].eval3,eval4:parts[i].eval4,eval5:parts[i].eval5,eval6:parts[i].eval6,
inoffset:parts[i].inoffset,gain:parts[i].gain,outoffset:parts[i].outoffset,ingain:parts[i].ingain,outgain:parts[i].outgain,denoffset:parts[i].denoffset,dengain:parts[i].dengain,numoffset:parts[i].numoffset,numgain:parts[i].numgain,fraction:parts[i].fraction,dendomain:parts[i].dendomain,denlowerlimit:parts[i].denlowerlimit,outlowerlimit:parts[i].outlowerlimit,outupperlimit:parts[i].outupperlimit,limitrange:parts[i].limitrange,upperdelta:parts[i].upperdelta,lowerdelta:parts[i].lowerdelta,
indomain:parts[i].indomain,xarr:parts[i].xarr,yarr:parts[i].yarr,amodel:parts[i].amodel,coff:parts[i].coff,con:parts[i].con,irev:parts[i].irev,rbreak:parts[i].rbreak,limitswitch:parts[i].limitswitch,roff:parts[i].roff,ron:parts[i].ron,log:parts[i].log,vbreak:parts[i].vbreak,ibreak:parts[i].ibreak,isat:parts[i].isat,nfor:parts[i].nfor,rsource:parts[i].rsource,rsink:parts[i].rsink,ilimitsource:parts[i].ilimitsource,ilimitsink:parts[i].ilimitsink,vpwr:parts[i].vpwr,isource:parts[i].isource,isink:parts[i].isink,routdomain:parts[i].routdomain,inlow:parts[i].inlow,inhigh:parts[i].inhigh,hyst:parts[i].hyst,outic:parts[i].outic,
- numcoeff:parts[i].numcoeff,dencoeff:parts[i].dencoeff,intic:parts[i].intic,denormfreq:parts[i].denormfreq,riseslope:parts[i].riseslope,fallslope:parts[i].fallslope,outlow:parts[i].outlow,outhigh:parts[i].outhigh,cntlarr:parts[i].cntlarr,freqarr:parts[i].freqarr,duty:parts[i].duty,risetime:parts[i].risetime,falltime:parts[i].falltime,clktrig:parts[i].clktrig,pwarr:parts[i].pwarr,ptrig:parts[i].ptrig,rdelay:parts[i].rdelay,fdelay:parts[i].fdelay,rmax:parts[i].rmax,rmin:parts[i].rmin,rinit:parts[i].rinit,vt:parts[i].vt,alpha:parts[i].alpha,beta:parts[i].beta
+ numcoeff:parts[i].numcoeff,dencoeff:parts[i].dencoeff,intic:parts[i].intic,denormfreq:parts[i].denormfreq,riseslope:parts[i].riseslope,fallslope:parts[i].fallslope,outlow:parts[i].outlow,outhigh:parts[i].outhigh,cntlarr:parts[i].cntlarr,freqarr:parts[i].freqarr,duty:parts[i].duty,risetime:parts[i].risetime,falltime:parts[i].falltime,clktrig:parts[i].clktrig,pwarr:parts[i].pwarr,ptrig:parts[i].ptrig,rdelay:parts[i].rdelay,fdelay:parts[i].fdelay,rmax:parts[i].rmax,rmin:parts[i].rmin,rinit:parts[i].rinit,vt:parts[i].vt,alpha:parts[i].alpha,beta:parts[i].beta, outundef:parts[i].outundef
};
if(net!=null)sections.netlist.push(net);
@@ -1094,6 +1146,152 @@ else if(sections.netlist[i].name=="memristor"){
var oh=sections.netlist[i].vt;
command+=" ref_"+pid+"\n"+".model ref_"+pid+" memristor(rmin="+ct+" rmax="+pw+" rinit="+ctg+" alpha="+pt+" beta="+ol+" vt="+oh+")\n";
}
+
+else if(sections.netlist[i].name=="dff"){
+ var cd=sections.netlist[i].clkdelay;
+ var sd=sections.netlist[i].setdelay;
+ var rd=sections.netlist[i].resetdelay;
+ var ic=sections.netlist[i].ic;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+="flop_"+pid+"\n.model flop_"+pid+ "d_dff(clk_delay = "+cd+" set_delay = "+sd+"+reset_delay = "+rd+" ic = "+ic+" rise_delay = "+rised+"+ fall_delay = "+falld+")";
+}
+
+else if(sections.netlist[i].name=="jkff"){
+ var cd=sections.netlist[i].clkdelay;
+ var sd=sections.netlist[i].setdelay;
+ var rd=sections.netlist[i].resetdelay;
+ var ic=sections.netlist[i].ic;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+="flop_"+pid+"\n.model flop_"+pid+ "d_jkff(clk_delay = "+cd+" set_delay = "+sd+"+reset_delay = "+rd+" ic = "+ic+" rise_delay = "+rised+"+ fall_delay = "+falld+")";
+}
+
+else if(sections.netlist[i].name=="tff"){
+ var cd=sections.netlist[i].clkdelay;
+ var sd=sections.netlist[i].setdelay;
+ var rd=sections.netlist[i].resetdelay;
+ var ic=sections.netlist[i].ic;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+="flop_"+pid+"\n.model flop_"+pid+ "d_tff(clk_delay = "+cd+" set_delay = "+sd+"+reset_delay = "+rd+" ic = "+ic+" rise_delay = "+rised+"+ fall_delay = "+falld+")";
+}
+
+else if(sections.netlist[i].name=="srff"){
+ var cd=sections.netlist[i].clkdelay;
+ var sd=sections.netlist[i].setdelay;
+ var rd=sections.netlist[i].resetdelay;
+ var ic=sections.netlist[i].ic;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+="flop_"+pid+"\n.model flop_"+pid+ "d_srff(clk_delay = "+cd+" set_delay = "+sd+"+reset_delay = "+rd+" ic = "+ic+" rise_delay = "+rised+"+ fall_delay = "+falld+")";
+}
+
+
+else if(sections.netlist[i].name=="dlatch"){
+ var dd=sections.netlist[i].datadelay;
+ var ed=sections.netlist[i].enabledelay;
+ var sd=sections.netlist[i].setdelay;
+ var rd=sections.netlist[i].resetdelay;
+ var ic=sections.netlist[i].ic;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+="latch_"+pid+"\n.model latch_"+pid+ "d_dlatch(data_delay = "+dd+" enable_delay "+ed+" set_delay = "+sd+"+reset_delay = "+rd+" ic = "+ic+" rise_delay = "+rised+"+ fall_delay = "+falld+")";
+}
+
+else if(sections.netlist[i].name=="srlatch"){
+ var srd=sections.netlist[i].srdelay;
+ var ed=sections.netlist[i].enabledelay;
+ var sd=sections.netlist[i].setdelay;
+ var rd=sections.netlist[i].resetdelay;
+ var ic=sections.netlist[i].ic;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+="latch_"+pid+"\n.model latch_"+pid+ "d_dlatch(sr_delay = "+srd+" enable_delay "+ed+" set_delay = "+sd+"+reset_delay = "+rd+" ic = "+ic+" rise_delay = "+rised+"+ fall_delay = "+falld+")";
+}
+else if(sections.netlist[i].name=="not")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_inverter(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+else if(sections.netlist[i].name=="nor")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_nor(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+else if(sections.netlist[i].name=="xnor")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_xnor(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+else if(sections.netlist[i].name=="or")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_or(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+else if(sections.netlist[i].name=="and")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_and(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+else if(sections.netlist[i].name=="nand")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_nand(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+else if(sections.netlist[i].name=="xor")
+{
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ var rd=sections.netlist[i].inputload;
+ command+=" ref_"+pid+"\n.model ref_"+pid+" d_xor(rise_delay ="+rised+" fall_delay = "+falld+" input_load = "+rd+")\n";
+}
+
+else if(sections.netlist[i].name=="dac_bridge")
+{
+ var ol=sections.netlist[i].outlow;
+ var oh=sections.netlist[i].outhigh;
+ var ou=sections.netlist[i].outundef;
+ var rd=sections.netlist[i].inputload;
+ var rt=sections.netlist[i].risetime;
+ var ft=sections.netlist[i].falltime;
+ command+=" dac_"+pid+"\n.model dac_"+pid+" dac_bridge(out_low ="+ol+" out_high = "+oh+" out_undef = "+ou+" input_load = "+rd+" t_rise = "+rt+"t_fall"+ft+")\n";
+}
+
+else if(sections.netlist[i].name=="adc_bridge")
+{
+ var il=sections.netlist[i].inlow;
+ var ih=sections.netlist[i].inhigh;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+=" adcbridge_"+pid+"\n.model adc_buff_"+pid+" adcbridge(in_low ="+il+" in_high = "+ih+")\n";
+}
+
+
+else if(sections.netlist[i].name=="cdo")
+{
+
+ var ca=sections.netlist[i].cntlarr;
+ var fa=sections.netlist[i].freqarr;
+ var dt=sections.netlist[i].duty;
+ var p=sections.netlist[i].phase;
+ var rised=sections.netlist[i].risedelay;
+ var falld=sections.netlist[i].falldelay;
+ command+=" var_clock"+pid+"\n.model var_clock"+pid+" d_osc(cntl_array = [ "+ca+"] freq_array = [ "+fa+" ] duty_cycle = "+dt+" initphase = "+p+" rise_delay = "+rised+" fall_delay = "+falld+")\n";
+}
+
else{
command+=" "+sections.netlist[i].model;