淘宝官方店 推荐课程 在线工具 联系方式 关于我们 | |
微波射频仿真设计 Ansoft Designer 中文培训教程 | HFSS视频培训教程套装 |
|
首页 >> Ansoft Designer >> Ansoft Designer在线帮助文档 |
Designer File Formats > Subcircuit ParametersThe subcircuit definition can reference global netlist parameters defined with .PARAM statements external to the subcircuit block. The subcircuit definition can also define one or more local subcircuit parameters for use within the subcircuit statements. The names and values of subcircuit parameters are valid only inside the subcircuit. A subcircuit parameter can be created, or the value of an existing subcircuit parameter can be changed, by the X-element subcircuit instance statement. The subcircuit statements can contain references to global and local parameters. A reference to a global parameter returns the value set in the external netlist. A reference to a local parameter returns the value set by the subcircuit definition or by the subcircuit instance. If both the subcircuit definition and the subcircuit instance assign values to the same local parameter, the value assigned in the subcircuit instance takes precedence. A subcircuit parameter value assigned in a subcircuit instance statement affects all references to that parameter in all subcircuits that are instantiated as a result of the called subcircuit.
The example subcircuits given earlier reference the following parameters: ser_res and par_res for the serial and parallel resistors, ser_ind for the serial inductors, and par_cap for the parallel capacitor. The earlier examples do not show where the parameters get their values. Here is a more complete netlist fragment which gives definitions for all the parameters. * Lossy transmission line fragment with parameters .PARAM ser_res=.05 Xtrans1 send1 GND 10 20 LINESEG Xtrans2 11 21 rcv1 GND LINESEG par_cap=.2 .SUBCKT LINESEG insig inref outsig outref ser_ind=.1 Xleft insig local1 sub1 Xright outsig local1 sub1 Xmid local1 local2 sub3 Rleft inref local2 ser_res Rright local2 outref ser_res .ENDS $ End of LINESEG .SUBCKT sub1 sub1in sub1out R1 sub1in sub1local ser_res L1 sub1local sub1out ser_ind .ENDS $ End of sub1 .SUBCKT sub2 sub2in sub2out par_cap=.5 par_res=.01 C3 sub2in sub2out par_cap R3 sub2in sub2out par_res .ENDS $ End of sub2 .END $ End of Netlist Here is the resulting circuit fragment, with device values: Figure 2. Lossy Transmission Line Segment with Device Values The parallel resistors in subcircuits sub1 and LINESEG all reference the global parameter ser_res, which is set in the .PARAM statement to 0.05 Ohm. The serial inductors in subcircuit sub1 reference local parameter ser_ind, which is given the value 0.1 Henry in the definition of subcircuit LINESEG, which instantiates sub1. The parallel capacitor in subcircuit sub2 references local parameter par_cap. Parameter par_cap is given a default value 0.5 Farad in the definition of subcircuit sub2, and this value is applied in the instance of sub2 that results from the subcircuit instance Xtrans1. However, the subcircuit instance Xtrans2 sets the value of par_cap to 0.2 Farad. The subcircuit instance Xtrans2 instantiates subcircuit LINESEG, which in turn instantiates subcircuit sub2, so the subcircuit instance value of par_cap, 0.2 Farad, overrides the default. The parallel resistor in subcircuit sub3 references local parameter par_res. Parameter par_res is given the value 0.01 Ohm in the definition of subcircuit sub2, and this value is applied in both instances of sub2 that are created. HFSS视频教程 ADS视频教程 CST视频教程 Ansoft Designer 中文教程 |
Copyright © 2006 - 2013 微波EDA网, All Rights Reserved 业务联系:mweda@163.com |