Manuals >Reference >ADS Simulator Print version of this Book (PDF file) |
![]() ![]() |
|
|
Data Access ComponentThe Data Access Component provides a clean, unified way to access tabular data from within a simulation. The data may reside in either a text file of a supported, documented format (e.g. discrete MDIF, model MDIF, Touchstone, CITIfile), or a dataset. It provides a variety of access methods, including lookup by index/value, as well as linear, cubic spline and cubic interpolation modes, with support for derivatives. The Data Access Component provides a "handle" with which one may access data from either a text file or dataset for use in a simulation. The DAC is implemented as a cktlib subcircuit fragment with internally known expressions names (e.g. _DAC, _TREE) that are assigned via VarEqn calls such as read_data() and access_all_data(). The accessed data can be used by other components (including models, devices, variables, subcircuit calls and other DAC instances) in the netlist, either by the specific file syntax or via the VarEqn function dep_data(). The DAC can also be used to supply parameters to device and model components from text files and datasets. In this case, the AllParams device/model parameter is used to refer to a DAC component. The component's parameters will then be accessed from the DAC and supplied to the instance. Care is taken to ensure that only matching (between parameter names in the component definition and DAC dependent column names) data is used. Also, parameter data can be assigned "inline" - as is usually done - in which case the inline data takes precedence over the DAC data. As the DAC component is composed of just a parameterized subcircuit, it allows alterations (sweep, tune, optimize, yield) of its parameters. Consequently any component that uses DAC data via file, dep_data() or AllParams will automatically be updated when a DAC parameter is altered. A caveat with sweeping over files using AllParams is that all the files must contain the same number of dependent columns of data. Below is an example definition of a simple DAC component that accesses discrete values from a text file: #uselib "ckt" , "DAC" DAC:DAC1 File="C:\jeffm\ADS_testing\ADS13_test_prj/ .\data\SweptData.ds" Type="dataset" Block="S" InterpMode="linear" InterpDom="ri" iVar1="X" iVal1=X iVar2="freq" iVal2=freq S_Port:S2P1 _net1 0 _net6 0 S[1,1]=file{DAC1, "S[1,1]"} S[1,2]=file{DAC1,"S[1,2]"} S[2,1]=1 S[2,2]=0 Recip=no dindex = 1 DAC:atc1 File="vdcr.mdf" Type="dscr" \ InterpMode="index_lookup" iVar1=1 iVal1=dindex And its use to provide the resistance value to a pair of circuit components: R:R1 n1 0 R=file{atc1, "R"} kOhm R:R2 n1 0 R=dep_data(atc1, "R") kOhm Here, it provides the value to a variable: V1 = file{atc1, "Vdc"} V1 could be used elsewhere in the circuit, as expected. In this example, a scaling factor applied to the result of a DAC access is shown: File = "atc.mdf" Type = "dscr" Mode="index_lookup" Cnom = "Cnom" DAC:atc_s File=File Type=Type InterpMode=Mode iVar1=1 iVal1 = Cs_row C:Cs n1 n2 C=file{atc_s, Cnom} Pf In this example, a use of AllParams is shown to enter model parameters from a text file: File = "c:\gemini\vdcr.mdf" Type = "dscr" Mode="index_lookup" DAC:dac1 File=File Type=Type InterpMode=Mode iVar1=1 iVal1 = ix model rm1 R_Model R=0 AllParams = dac1._DAC rm1:rm1i1 n3 0 |
|
|
|
![]() ![]() |