I need to properly run de_analyze() back-to-back.
I am looking at Mats' example of "batch simulation" (Example ID: 8610 in knowledge center). I am not sure how you did solve time issue between simulations in a batch sequence. What I am trying to do is to set a variable twice, and run de_analyze() after each setting.
The code is something like below. It seems to me ADS run everything except de_analyze() first, because I saw variable being changed from 0 (default start number) to 1 (my 1st setting) then 2 (my 2nd setting) before invoke any de_analyze.
**************************************************************************
defun test()
{
decl itemInfo0SP=de_edit_item("INPUT_VAR2");
de_set_item_id(itemInfo0SP, "INPUT_VAR2");
de_set_item_parameters(itemInfo0SP,list(list(prm("VarFormStdForm",prm("VarNameForm","specINDEX"),prm("VarValueForm","7")),prm("VarFormStdForm",prm("VarNameForm","specList"),prm("VarValueForm","\"Datafiles.txt\"")))));
de_end_edit_item(itemInfo0SP);
itemInfo0SP=de_free_item(itemInfo0SP);
de_analyze();
decl itemInfo0SP=de_edit_item("INPUT_VAR2");
de_set_item_id(itemInfo0SP, "INPUT_VAR2");
de_set_item_parameters(itemInfo0SP,list(list(prm("VarFormStdForm",prm("VarNameForm","specINDEX"),prm("VarValueForm","8")),prm("VarFormStdForm",prm("VarNameForm","specList"),prm("VarValueForm","\"Datafiles.txt\"")))));
de_end_edit_item(itemInfo0SP);
itemInfo0SP=de_free_item(itemInfo0SP);
de_analyze();
}
**************************************************************
Also, I cannot find out the function "desim_foreground_simulation_running()" in the last function call, "ckt_simulation_is_running()" from any reference. Is it some internal function?
Thanks,
Xu Zhu
I am looking at Mats' example of "batch simulation" (Example ID: 8610 in knowledge center). I am not sure how you did solve time issue between simulations in a batch sequence. What I am trying to do is to set a variable twice, and run de_analyze() after each setting.
The code is something like below. It seems to me ADS run everything except de_analyze() first, because I saw variable being changed from 0 (default start number) to 1 (my 1st setting) then 2 (my 2nd setting) before invoke any de_analyze.
**************************************************************************
defun test()
{
decl itemInfo0SP=de_edit_item("INPUT_VAR2");
de_set_item_id(itemInfo0SP, "INPUT_VAR2");
de_set_item_parameters(itemInfo0SP,list(list(prm("VarFormStdForm",prm("VarNameForm","specINDEX"),prm("VarValueForm","7")),prm("VarFormStdForm",prm("VarNameForm","specList"),prm("VarValueForm","\"Datafiles.txt\"")))));
de_end_edit_item(itemInfo0SP);
itemInfo0SP=de_free_item(itemInfo0SP);
de_analyze();
decl itemInfo0SP=de_edit_item("INPUT_VAR2");
de_set_item_id(itemInfo0SP, "INPUT_VAR2");
de_set_item_parameters(itemInfo0SP,list(list(prm("VarFormStdForm",prm("VarNameForm","specINDEX"),prm("VarValueForm","8")),prm("VarFormStdForm",prm("VarNameForm","specList"),prm("VarValueForm","\"Datafiles.txt\"")))));
de_end_edit_item(itemInfo0SP);
itemInfo0SP=de_free_item(itemInfo0SP);
de_analyze();
}
**************************************************************
Also, I cannot find out the function "desim_foreground_simulation_running()" in the last function call, "ckt_simulation_is_running()" from any reference. Is it some internal function?
Thanks,
Xu Zhu
desim_foreground_simulation_running() is an undocumented function which returns TRUE if a simulation is running.
I tweaked the batch simulation code a bit to do something like what you want to do. See below.
One thing you probably want to add is to change the dataset name between the two simulations, otherwise the second simulation will overwrite the first.
-Mats