ADS学习日志
来源:互联网 发布:皮鞋设计软件 编辑:程序博客网 时间:2024/06/05 14:28
ADS学习日志
AEL脚本
decl CKT_BATCH_QUEUE_STATE;decl CKT_NUM = 0;decl i = 0;decl j = 0;decl k = 0;defun mybatch_simulation(){ if(ckt_simulaion_is_running()) { de_info("A circuit simulation is currently running.\nPlease wait until this simulation is done."); return; } // desim_use_queued_simulators() was introduced in ADS 2004A // This line makes sure the code works in earlier versions if ( ! is_word( find_word( "desim_use_queued_simulators" ) ) ) execute( "defun desim_use_queued_simulators( ) { return FALSE; }" ); // Save the queue state CKT_BATCH_QUEUE_STATE = desim_use_queued_simulators(FALSE); mybatch_simulate_design(); }defun mybatch_simulate_design(){ k = CKT_NUM%5; j = ((CKT_NUM-k)/5)%4; i = (((CKT_NUM-k)/5-j)/4)%2; // Open desired schematic //de_open_design("mybatch_test",FALSE); // Tweak to desired name.. de_set_window_by_sequence(0, 0); de_open_workspace("E:\ADS\LTE\QYL_LTE_TESTwrk"); //de_bring_view_to_top_or_open_new_window("QYL_LTE_TESTwrk1_lib_1", "LTE", "schematic", 3); de_get_design_context_from_name("QYL_LTE_TESTwrk1_lib:LTE:schematic"); decl itemInfo0SP=de_edit_item("VAR2"); de_set_item_id(itemInfo0SP, "VAR2"); de_set_item_parameters(itemInfo0SP, list(list(prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","CType1"),prm_ex("ads_datacmps","VarValueForm",i)),prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","CType"),prm_ex("ads_datacmps","VarValueForm","if (CType1==0) then 0 elseif (CType1==1) then 2 else 0 endif"))))); de_end_edit_item(itemInfo0SP); itemInfo0SP=de_free_item(itemInfo0SP); decl itemInfo1SP=de_edit_item("SNR_Computation1"); de_set_item_id(itemInfo1SP, "SNR_Computation1"); de_set_item_parameters(itemInfo1SP, list(list(prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","SNR1"),prm_ex("ads_datacmps","VarValueForm",j)),prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","RS_EPRE"),prm_ex("ads_datacmps","VarValueForm","-25")),prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","NDensity"),prm_ex("ads_datacmps","VarValueForm","RS_EPRE-10*log10(15e3)-SNR")),prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","SNR"),prm_ex("ads_datacmps","VarValueForm","if (SNR1==0) then 0 elseif (SNR1==1) then -10 elseif (SNR1==2) then -20 elseif (SNR1==3) then -30 else 0 endif"))))); de_end_edit_item(itemInfo1SP); itemInfo1SP=de_free_item(itemInfo1SP); decl itemInfo2SP=de_edit_item("VAR1"); de_set_item_id(itemInfo2SP, "VAR1"); de_set_item_parameters(itemInfo2SP, list(list(prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","LoFreq"),prm_ex("ads_datacmps","VarValueForm","1895e6+LoFreq2 Hz")),prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","LoFreq1"),prm_ex("ads_datacmps","VarValueForm",k)),prm_ex("ads_datacmps","VarFormEditcompPowerVar",prm_ex("ads_datacmps","VarNameForm","LoFreq2"),prm_ex("ads_datacmps","VarValueForm","if (LoFreq1==0) then 0 elseif (LoFreq1==1) then 100 elseif (LoFreq1==2) then 1000 elseif (LoFreq1==3) then 10000 elseif (LoFreq1==4) then 100000 else 0 endif"))))); de_end_edit_item(itemInfo2SP); itemInfo2SP=de_free_item(itemInfo2SP); // Simulate it decl wInst=api_get_current_window(); de_analyze(); // Wait for the simulation to finish // install a timer function api_set_timer("cktSimTimer", // timer name 1000, // number of milliseconds b/n calls 1, // auto repeat "ckt_sim_check_timer_cb", // callback NULL); // cbData of callback}defun ckt_sim_check_timer_cb (cbData, callData) { if (!ckt_simulaion_is_running()) { // make sure to remove timer function api_remove_timer("cktSimTimer"); // Increase Design Number CKT_NUM++; // More designs to simulate? if ( CKT_NUM <= 39 ) mybatch_simulate_design(); else { // Reset the queue state desim_use_queued_simulators(CKT_BATCH_QUEUE_STATE); de_info("Done!"); } }}defun ckt_simulaion_is_running(){ //decl dsnDir = de_current_design_name(); //decl workDir = de_mom_get_working_dir(db_get_design(dsnDir)); if (desim_foreground_simulation_running()) { return TRUE; } else { return FALSE; } }mybatch_simulation();
阅读全文
0 0
- ADS学习日志
- ADS学习1:破解ADS安装程序
- ADS射频电路学习笔记
- ADS学习2 阻抗匹配调试
- Ads
- ADS
- ads
- ADS
- ads
- ADS
- ok6410 学习1-----关于ads VIC_MODE定义
- 阿里分析型数据库ads学习记录
- ads学习链接(火烽主讲
- Agilent ADS中Verilog-A学习
- ARM&LINUX学习笔记(5)-----ADS建立工程
- LPC2368学习笔记(二)、移植ADS工程
- 学习日志
- 学习日志
- 创建多线程
- Myeclipse工具使用小技巧
- WordPress中简单的wp-config.php配置
- python 脚本 通过解析 DDL 更新PDM
- LED
- ADS学习日志
- pdf 添加骑缝章
- unity人物模型换装系统浅析
- 强烈推荐 | 程序员七大生产力工具
- mt2503 [ShapeEngine]泰语音标字符发生偏移
- Caffe 的可视化 (四) 特征图的可视化
- 如何解决stack overflow打开缓慢,并且不能登录
- 关于RXJava2的知识点描述
- Form表单实现导出Excel后实时去掉遮罩层解决方案