summaryrefslogtreecommitdiff
path: root/views/script
diff options
context:
space:
mode:
Diffstat (limited to 'views/script')
-rw-r--r--views/script/gui.js137
-rw-r--r--views/script/savenetlist.js280
2 files changed, 353 insertions, 64 deletions
diff --git a/views/script/gui.js b/views/script/gui.js
index d9e1ea2..5fc62b1 100644
--- a/views/script/gui.js
+++ b/views/script/gui.js
@@ -5,6 +5,7 @@
str1="";
str2="";
str3="";
+str4="";
final_str="";
globalVariable=0;
@@ -1860,42 +1861,42 @@ if($("webtronics_select"))Event.observe($('webtronics_select'), 'click', functio
//console.log("out")
- if (change_val == "0")
- {
- Flag = jQuery("#webtronics_netlist_text_area").val();
+if (change_val == "0")
+{
+ Flag = jQuery("#webtronics_netlist_text_area").val();
-jQuery("#webtronics_netlist_text_area").val("");
-/*-------------------------------------------------------------------------------------------------------------------------------------
- Here are the conditions concatenated to give final netlist values for dc all cases
- ---------------------------------------------------------------------------------------------------------------------------------------------*/
- if (analysis_type == "1")
- {
-
- str1='\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n";
- jQuery("#webtronics_netlist_text_area").val(Flag + str1 );
- final_str=str1;
- change_val = "1";
- //console.log(jQuery("#analysis_selectbox").val());
-}
+ jQuery("#webtronics_netlist_text_area").val("");
+ /*-------------------------------------------------------------------------------------------------------------------------------------
+ Here are the conditions concatenated to give final netlist values for dc all cases
+ ---------------------------------------------------------------------------------------------------------------------------------------------*/
+ if (analysis_type == "1")
+ {
+
+ str1='\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n";
+ jQuery("#webtronics_netlist_text_area").val(Flag + str1 );
+ final_str=str1;
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all AC Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
-else if (analysis_type == "2")
-{
- str2='\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ;
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all AC Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ else if (analysis_type == "2")
+ {
+ str2='\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ;
- jQuery("#webtronics_netlist_text_area").val(Flag +str2 );
- final_str=str2;
- change_val = "1";
- //console.log(jQuery("#webtronics_netlist_text_area").val());
- console.log("from 00");
-}
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all Transiet Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
- //else if (analysis_type == "3" && time == "1")
+ jQuery("#webtronics_netlist_text_area").val(Flag +str2 );
+ final_str=str2;
+ change_val = "1";
+ //console.log(jQuery("#webtronics_netlist_text_area").val());
+ console.log("from 00");
+ }
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all Transiet Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ //else if (analysis_type == "3" && time == "1")
else if (analysis_type== "3")
{
str3='\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n";
@@ -1906,41 +1907,51 @@ Here are the all Transiet Cases for generating final netlist values
}
+ else if (analysis_type == "4")
+ {
+
+ str4='\n'+ ".dc" + " " + source1 + " " + start1 + "e" + "-" + start_dc_unit1 + " " + stop1 + "e" + "-" + stop_dc_unit1 + " " + increment1 + "e" + "-" + increment_dc_unit1 + " " + source2 + " " + start2 + "e" + "-" + start_dc_unit2 + " " + stop2 + "e" + "-" + stop_dc_unit2 + " " + increment2 + "e" + "-" + increment_dc_unit2 + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n";
+ jQuery("#webtronics_netlist_text_area").val(Flag + str4 );
+ final_str=str4;
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
+
}
else if (change_val == "1")
- {
+{
-jQuery("#webtronics_netlist_text_area").val("");
+ jQuery("#webtronics_netlist_text_area").val("");
-/*-------------------------------------------------------------------------------------------------------------------------------------
- Here are the conditions concatenated to give final netlist values for dc all cases
- ---------------------------------------------------------------------------------------------------------------------------------------------*/
- if (analysis_type == "1")
- {
+ /*-------------------------------------------------------------------------------------------------------------------------------------
+ Here are the conditions concatenated to give final netlist values for dc all cases
+ ---------------------------------------------------------------------------------------------------------------------------------------------*/
+ if (analysis_type == "1")
+ {
- jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
- change_val = "1";
- //console.log(jQuery("#analysis_selectbox").val());
-}
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all AC Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
-else if (analysis_type == "2")
-{
- jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all AC Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ else if (analysis_type == "2")
+ {
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
- change_val = "1";
+ change_val = "1";
-}
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all Transiet Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
- //else if (analysis_type == "3" && time == "1")
+ }
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all Transiet Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ //else if (analysis_type == "3" && time == "1")
else if (analysis_type== "3")
{
jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" );
@@ -1949,19 +1960,27 @@ Here are the all Transiet Cases for generating final netlist values
}
- console.log(jQuery("#webtronics_netlist_text_area").val());
- console.log("deepblueSea");
+ else if (analysis_type == "4")
+ {
+
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source1 + " " + start1 + "e" + "-" + start_dc_unit1 + " " + stop1 + "e" + "-" + stop_dc_unit1 + " " + increment1 + "e" + "-" + increment_dc_unit1 + " " + source2 + " " + start2 + "e" + "-" + start_dc_unit2 + " " + stop2 + "e" + "-" + stop_dc_unit2 + " " + increment2 + "e" + "-" + increment_dc_unit2 + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
+
+ console.log(jQuery("#webtronics_netlist_text_area").val());
+ console.log("deepblueSea");
}
}
+
else {
alert("Analysis information is not available !");
-
-
}
diff --git a/views/script/savenetlist.js b/views/script/savenetlist.js
index baf494f..dca3110 100644
--- a/views/script/savenetlist.js
+++ b/views/script/savenetlist.js
@@ -129,14 +129,16 @@ jQuery(function(){
jQuery("#dc_menu").hide();
jQuery("#ac_menu").hide();
jQuery("#transient_menu").show();
+ jQuery("#dc_sweep_menu").hide();
jQuery("#analysis_selectbox").change(function(){
- if (jQuery(this).val() == "4")
+ if (jQuery(this).val() == "5")
{
jQuery("#select").show();
jQuery("#transient_menu").hide();
jQuery("#dc_menu").hide();
jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
else if (jQuery(this).val() == "1")
@@ -145,6 +147,7 @@ jQuery(function(){
jQuery("#dc_menu").show();
jQuery("#ac_menu").hide();
jQuery("#transient_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
else if (jQuery(this).val() == "2")
{
@@ -152,6 +155,7 @@ jQuery(function(){
jQuery("#ac_menu").show();
jQuery("#dc_menu").hide();
jQuery("#transient_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
else if (jQuery(this).val() == "3")
{
@@ -159,8 +163,17 @@ jQuery(function(){
jQuery("#transient_menu").show();
jQuery("#dc_menu").hide();
jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
+ else if (jQuery(this).val() == "4")
+ {
+ jQuery("#select").hide();
+ jQuery("#transient_menu").hide();
+ jQuery("#dc_menu").hide();
+ jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").show();
+ }
//$("#preview").change(function(){
@@ -182,6 +195,14 @@ var savedtransval1="";
var savedtransval2="";
var savedtransval3="";
+var savedsweepval1="";
+var savedsweepval2="";
+var savedsweepval3="";
+var savedsweepval4="";
+var savedsweepval5="";
+var savedsweepval6="";
+
+
/*------------------------------------------------------------------------------------------------------------------------------------------------
Ac netlist variable for ac
------------------------------------------------------------------------------------------------------------------------------------------------*/
@@ -314,8 +335,8 @@ jQuery("#savedc").click(function(){
start = jQuery("#startval").val();
increment = jQuery("#Incrementval").val();
stop = jQuery("#stopval").val();
- //console.log(source,start,increment,stop);
- //console.log(start);
+ // console.log(source,start,increment,stop);
+ // console.log(start);
if (source == "")
{
alert("Please enter Source Name");
@@ -440,6 +461,256 @@ jQuery("#stop_volt_selectbox").change(function(){
console.log(stop_dc_unit);
});
+
+
+/*------------------------------------------------------------------------------------------------------------------------------------------------
+DC netlist variable for dc sweep
+------------------------------------------------------------------------------------------------------------------------------------------------*/
+jQuery("#savedcs").click(function(){
+ source1 = jQuery("#sourceval1").val();
+ start1 = jQuery("#startval1").val();
+ increment1 = jQuery("#Incrementval1").val();
+ stop1 = jQuery("#stopval1").val();
+ source2 = jQuery("#sourceval2").val();
+ start2 = jQuery("#startval2").val();
+ increment2 = jQuery("#Incrementval2").val();
+ stop2 = jQuery("#stopval2").val();
+ //console.log(source1,start1,increment1,stop1);
+ //console.log(start1);
+ if (source1 == "")
+ {
+ alert("Please enter Source Name");
+ }
+ else if (start1 == "")
+ {
+ alert("Please enter Start Time");
+ }
+ else if (increment1 == "")
+ {
+ alert("Please enter the increment value");
+ }
+ else if (stop1 == "")
+ {
+ alert("Please enter the Stop Time");
+ }
+ else if (source2 == "")
+ {
+ alert("Please enter Source Name");
+ }
+ else if (start2 == "")
+ {
+ alert("Please enter Start Time");
+ }
+ else if (increment2 == "")
+ {
+ alert("Please enter the increment value");
+ }
+ else if (stop2 == "")
+ {
+ alert("Please enter the Stop Time");
+ }
+
+ else{
+ jQuery("#webtronics_netlist_analysis").hide();
+ jQuery("#webtronics_disable").hide();
+ }
+
+ start_dc_unit1=savedsweepval1;
+ if(start_dc_unit1==""){
+ start_dc_unit1="00";
+ }
+ increment_dc_unit1=savedsweepval2;
+ if(increment_dc_unit1==""){
+ increment_dc_unit1="00";
+ }
+ stop_dc_unit1=savedsweepval3;
+ if(stop_dc_unit1==""){
+ stop_dc_unit1="00";
+ }
+
+ start_dc_unit2=savedsweepval4;
+ if(start_dc_unit2==""){
+ start_dc_unit2="00";
+ }
+ increment_dc_unit2=savedsweepval5;
+ if(increment_dc_unit2==""){
+ increment_dc_unit2="00";
+ }
+ stop_dc_unit2=savedsweepval6;
+ if(stop_dc_unit2==""){
+ stop_dc_unit2="00";
+ }
+
+});
+
+jQuery("#start_volt_selectbox1").change(function(){
+
+ dc_start_time1 = jQuery(this).val();
+
+ if (dc_start_time1 == "1")
+ {
+ start_dc_unit1 = "00";
+ }
+ else if (dc_start_time1 == "2")
+ {
+ start_dc_unit1 = "03";
+ }
+ if (dc_start_time1 == "3")
+ {
+ start_dc_unit1 = "06";
+ }
+ else if (dc_start_time1 == "4")
+ {
+ start_dc_unit1 = "09";
+ }
+ else if (dc_start_time1 == "5")
+ {
+ start_dc_unit1 = "12";
+ }
+ savedsweepval1=start_dc_unit1;
+ console.log(start_dc_unit1);
+});
+
+jQuery("#inc_volt_selectbox1").change(function(){
+ dc_increment_time1 = jQuery(this).val();
+
+ if (dc_increment_time1 == "1")
+ {
+ increment_dc_unit1 = "00";
+ }
+ else if (dc_increment_time1 == "2")
+ {
+ increment_dc_unit1 = "03";
+ }
+ if (dc_increment_time1 == "3")
+ {
+ increment_dc_unit1 = "06";
+ }
+ else if (dc_increment_time1 == "4")
+ {
+ increment_dc_unit1 = "09";
+ }
+ else if (dc_increment_time1 == "5")
+ {
+ increment_dc_unit1 = "12";
+ }
+ savedsweepval2=increment_dc_unit1;
+ console.log(increment_dc_unit1);
+});
+
+jQuery("#stop_volt_selectbox1").change(function(){
+
+ dc_stop_time1 = jQuery(this).val();
+
+ if (dc_stop_time1 == "1")
+ {
+ stop_dc_unit1 = "00";
+ }
+ else if (dc_stop_time1 == "2")
+ {
+ stop_dc_unit1 = "03";
+ }
+ if (dc_stop_time1 == "3")
+ {
+ stop_dc_unit1 = "06";
+ }
+ else if (dc_stop_time1 == "4")
+ {
+ stop_dc_unit1 = "09";
+ }
+ else if (dc_stop_time1 == "5")
+ {
+ stop_dc_unit1 = "12";
+ }
+ savedsweepval3=stop_dc_unit1;
+ console.log(stop_dc_unit1);
+});
+
+
+jQuery("#start_volt_selectbox2").change(function(){
+
+ dc_start_time2 = jQuery(this).val();
+
+ if (dc_start_time2 == "1")
+ {
+ start_dc_unit2 = "00";
+ }
+ else if (dc_start_time2 == "2")
+ {
+ start_dc_unit2 = "03";
+ }
+ if (dc_start_time2 == "3")
+ {
+ start_dc_unit2 = "06";
+ }
+ else if (dc_start_time2 == "4")
+ {
+ start_dc_unit2 = "09";
+ }
+ else if (dc_start_time2 == "5")
+ {
+ start_dc_unit2 = "12";
+ }
+ savedsweepval4=start_dc_unit2;
+ console.log(start_dc_unit2);
+});
+
+jQuery("#inc_volt_selectbox2").change(function(){
+ dc_increment_time2 = jQuery(this).val();
+
+ if (dc_increment_time2 == "1")
+ {
+ increment_dc_unit2 = "00";
+ }
+ else if (dc_increment_time2 == "2")
+ {
+ increment_dc_unit2 = "03";
+ }
+ if (dc_increment_time2 == "3")
+ {
+ increment_dc_unit2 = "06";
+ }
+ else if (dc_increment_time2 == "4")
+ {
+ increment_dc_unit2 = "09";
+ }
+ else if (dc_increment_time2 == "5")
+ {
+ increment_dc_unit2 = "12";
+ }
+ savedsweepval5=increment_dc_unit2;
+ console.log(increment_dc_unit2);
+});
+
+jQuery("#stop_volt_selectbox2").change(function(){
+
+ dc_stop_time2 = jQuery(this).val();
+
+ if (dc_stop_time2 == "1")
+ {
+ stop_dc_unit2 = "00";
+ }
+ else if (dc_stop_time2 == "2")
+ {
+ stop_dc_unit2 = "03";
+ }
+ if (dc_stop_time2 == "3")
+ {
+ stop_dc_unit2 = "06";
+ }
+ else if (dc_stop_time2 == "4")
+ {
+ stop_dc_unit2 = "09";
+ }
+ else if (dc_stop_time2 == "5")
+ {
+ stop_dc_unit2 = "12";
+ }
+ savedsweepval6=stop_dc_unit2;
+ console.log(stop_dc_unit2);
+});
+
+
/*------------------------------------------------------------------------------------------------------------------------------------------------
@@ -451,8 +722,7 @@ jQuery("#savetransient").click(function(){
step_trans = jQuery("#step_time").val();
stop_trans = jQuery("#stop_time").val();
//console.log(start_trans, step_trans, stop_trans);
- console
-
+
if (start_trans == "")
{
alert("Please enter Start Time")