1. Field
This disclosure relates generally to design, analysis, and/or simulation of a circuit or a network and, more specifically, to circuit/network simulation using scattering parameters (s-parameters).
2. Description
Traditionally, passive circuits are analyzed and simulated as networks of linear lumped devices. For example, a circuit may be modeled using only resistors or combinations of resistors, capacitors, and inductors. One advantage of such lumped network models is that they are simple and relatively easy to simulate. For a complex circuit, however, such a lumped device approach may result in a network model too complex for a simulator. When this situation occurs, the circuit may have to be first partitioned into smaller sub-circuits and each sub-circuit is then individually simulated. The simulation results from individual sub-circuits are finally patched together. Although the patched-together result may provide some characteristics of the original complex circuit, the coupling effects among different sub-circuits will have to be approximated or entirely ignored. Thus, it may be difficult to obtain accurate overall characteristics of a complex circuit using lumped network approaches. Additionally, although lumped network models may work well at lower frequencies, they may not fully capture the physical phenomena of a target circuit at higher frequencies. This is partly because coupling effects between components in the target circuit can become more significant at high frequencies than at low frequencies.
To better capture the characteristics of certain circuits/networks (e.g., bus structures or power grids) at high frequencies, transmission line models are often used to represent the circuit/network. Using this model, voltage, current, and power are naturally in the form of traveling waves along transmission lines, which in turn are represented in terms of resistance (R), capacitance (C), inductance (L), and admittance (G) networks. Although transmission line based models may be more accurate for modeling certain networks at high frequencies than the lumped device models, they do not work well for a network involving true three dimensional effects. For a large network, partitioning the network can be difficult using this model; thus, the capacity limit can be quickly reached in a practical application.
The features and advantages of the disclosed subject matter will become apparent from the following detailed description of the present disclosure in which:
An S-parameter based model is known to be capable of characterizing the high-frequency behavior of passive circuits. Once measured at any designated network terminals or pins of interest, the s-parameter model can be used to represent the network incorporating the coupling effects without approximations. Therefore, a complex circuit may not need to be partitioned geometrically. It is this unparalleled advantage that has motivated a number of explorations using s-parameters for network modeling in the literature in past years. However, when a circuit size increases, a large number of ports are needed at different frequencies to obtain a complete representation of the system characteristics. Consequently, a large amount of computing resources (e.g., memory, disk storage, and CPU time) must be consumed to characterize a complex circuit. These requirements for computing resources make the analysis/simulation of a large and complex circuit system using an s-parameter based approach impractical or even impossible in practice. Additionally, measuring s-parameters for a large circuit/network (e.g., on-chip bus structure and power grid in a microprocessor) is a big challenge for the state-of-the-art measuring devices, which can only measure s-parameters between a very limited number of ports (e.g., 2, 4 and 8). Thus, software-based measurement of s-parameters may still be needed in many cases, especially for the large circuit/network.
According to an embodiment of techniques disclosed in the present application, a device under test (“DUT”) such as the on-chip bus structure and power grid may be first represented using a lumped device based network, a transmission line based network, or other network models. Second, the observation nodes of interest may then be selected in the network representing the DUT. Third, s-parameters between the selected observation nodes may be measured through software-based frequency domain analysis, whose linear characteristics makes it orders of magnitude more efficient than its transient counterpart. Finally, the original large network will be replaced with the measured s-parameters of the DUT corresponding to the observation nodes of interest to be submitted to a generic circuit simulator (e.g., a SPICE simulator) for time-domain analysis.
Additionally, according to an embodiment of techniques disclosed in the present application, a precision space (“p-space”) concept may be used to address the aforementioned challenges associated with s-parameter models. The p-space is a one-dimensional (1 D) space that is mapped onto a continuous domain between [Min, Max], where Min and Max are the minimum and maximum values of s-parameters to be represented. The p-space may be divided into multiple slots and the number of slots is governed by the s-parameter permissible precision. As a result, 2D s-parameters may be mapped onto a 1D p-space efficiently. Furthermore, in many practical applications, a random yet common pattern may be embedded within the s-parameter data with respect to the port (observation node) indexing. Such a common pattern may be exploited to realize the efficient pattern partitioning through the space projection process and achieve the desirable reduction in data storage. This significant reduction of storage space for s-parameters in turn reduces the requirement of other computing resources (e.g., CPU speed, memory, etc.) and hence makes it feasible for a typical analyzer/simulator to analyze/simulate a complex circuit/network using s-parameters.
Reference in the specification to “one embodiment” or “an embodiment” of the disclosed subject matter means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrase “in one embodiment” appearing in various places throughout the specification are not necessarily all referring to the same embodiment.
An s-parameter based simulation approach may address the challenging issue encountered by the lumped device approach or the transmission line network approach for simulating a large circuit/network. Once measured at any designated network terminals or pins of interest, the s-parameter model, thus measured, can be used to represent the network incorporating the entire coupling effects without approximations. Therefore, a complex circuit may not need to be partitioned geometrically.
Network 200 in
S11 and S21 are measured by terminating the output port (220) of network 200. S11 is the input reflection coefficient of network 200, and S21 is the forward transmission coefficient through the network. S22 and S12 are measured by terminating the input port (210) of network 200. S22 is the output port reflection coefficient of network 200, and S21 is the coefficient of the reverse transmission (from output to input).
Some circuit simulators cannot directly import s-parameters, but they may be able to directly accept other types of parameters such as y-parameters (admittance parameters).
D=((1+s11)×(1+s22)−s12×s21), (5)
y11=((1−s11)×(1+s22)+s12×s21)/D, (6)
y21=−2×s21/D, (7)
y22=((1+s11)×(1−s22)+s12×s21)/D, (8)
y12=−2×s12/D. (9)
The concepts of defining s-parameters for a two-port network can be expanded to multiple-port networks. For example, if there are N ports in a target network, an s-parameter matrix will contain N×N entries. Each element in the matrix may be measured in a way similar to that used to measure elements in matrix 270 as shown in
Similarly, y-parameters of the same N-port network may be obtained by converting from corresponding s-parameters.
To use a software-based measuring tool, DUT 300 needs to be first represented in terms of some types of models. Typically, lumped device models (e.g., resistor only models or models based on a combination of resistors, capacitors, and inductors) or transmission line models may be used. To represent the original DUT as accurately as possible, there may need to be a large number of such linear device models, each model representing only a very small portion of the DUT. A resulting representation of the DUT may be a large-scale network of such models. A software-based s-parameter measuring tool uses this resulting representation of the DUT as an input parameter and measures s-parameters among the selected observation nodes.
The measured s-parameters between the selected observation nodes may then be submitted to a generic circuit simulator such as a SPICE for complicated transient analysis. The simulator may be able to accept s-parameters directly. The simulator may only be able to accept other types of network parameters (e.g., y-parameters). In that case, the measured s-parameters may be converted into the type of parameters acceptable to the simulator.
To obtain enough s-parameter samples that reflect circuit characteristics in the entire frequency domain, s-parameters at different frequency points need to be measured. When s-parameters measured from different frequencies are put together, the amount of data can increase rapidly even with a modest number of observation nodes. For example, 500 or more observation nodes (ports) may be needed to analyze an on-chip bus structure or a power grid in modern microprocessor technology. At each measuring frequency, there would be 500×500 entries in an s-parameter matrix. Assuming that 1,000 frequency points are measured and each s-parameter value requires 8-bytes storage, the total amount of storage needed for all the s-parameters would be 2 Gigabytes (GB). It is possible for a state-of-the-art simulator to process such an amount of data, but it requires a lot of computational resources (e.g., memory and processor speed). A careful analysis of these s-parameters can reveal that it is not always necessary to store such an amount of data. To improve the speed and efficiency of a simulator, it is desirable to use the minimal information for a large amount of s-parameters so that the requirement for a large storage space and computing power can be avoided.
According to one embodiment of techniques disclosed in the present application, a 1D p-space may be used to represent s-parameters in 2D s-parameter matrices. Values of s-parameters typically fall within a certain range. For a passive circuit, for example, this range is between −1 and 1. The magnitudes of s-parameters are normally measured in decibel (dB), which is 20×log (magnitude). In practice, there is permissible precision associated with s-parameters, especially when s-parameters are measured by a physical device. For example, the precision in a range from 40 dB (10−2) to −60 dB (10−3) may require careful calibrations during measurement; the precision between −60 dB (10−3) and −80 dB (10−4) may fall in the uncertainty of a typical s-parameter measurement instrument setup; and the precision below −80 dB (10−4) or −100 dB (10−5) may be beyond the practical measuring techniques. In other words, all of the s-parameter magnitudes of a circuit/network should fall within a certain value range with a given permissible precision. The concept of a p-space, P{M}, as disclosed herein, takes advantage of this characteristic of s-parameters. It uses a 1D space whose value range corresponds to the magnitude value range of s-parameters (assuming the p-space range is from Min to Max). The space is equally divided into M slots, where M is determined as follows,
where SPrecision represents the permissible precision of s-parameter magnitudes, and PScale is the scale of the p-space. For example, if the magnitude value range of s-parameters is from −1 to 1 and the permissible precision is 10−4, a corresponding p-space will also have a value range from −1 to 1 that is equally divided into 2×104 slots. Using the p-space so designed, the magnitude of any s-parameter can be represented by a unique slot in the p-space. Note that in some embodiments, a p-space may be divided into a number of slots, which are not necessarily uniform over the range.
The process of mapping a 2D s-parameter matrix to a 1D p-space is equivalent to partitioning the 2D s-parameter matrix into M patterns with each pattern projecting into one slot in the p-space; where M is the total number of slots in the p-space.
S-parameters that fall into the same p-space slot typically have the same or similar physical characteristics. For example, they may represent a coupling relationship between two ports of geometrically similar networks. Thus, the partitioning process helps identify those s-parameters that have the same or similar coupling effects. Since the relative relationships in terms of certain geometrical characteristics typically do not change from one frequency to another, it may not be necessary to partition every s-parameter matrix at every measuring frequency. Normally, only the s-parameter matrix at a critical frequency point (e.g., frequency=0 Hz) or a combination of the representative samples is partitioned. The resulting partitioning patterns may apply to s-parameter matrices at other measuring frequency points. Therefore, the p-space helps obtain the common partitioning patterns for s-parameter matrices at different measuring frequency points. However, the same partitioning patterns across different frequencies do not imply that s-parameters in each pattern always have the same single value at different frequencies. In other words, partitioning patterns may remain the same for different frequencies, and s-parameters in a particular pattern may have sufficiently the same value at a measuring frequency point, but the s-parameter value corresponding to this particular pattern may change from one frequency to another.
The common partitioning patterns across different measuring frequency points may be stored in a table or other types of data structure such as the one shown in box 520 of
One function of the mapping relationship between one s-parameter matrix at a particular frequency and the p-space is to reduce the storage space required for original s-parameters. Since all the s-parameters in a partitioning pattern that map to the same p-space slot have substantially the same value (there may be some minor variations from one s-parameter to another partly due to permissible measuring errors), it is necessary to store only one value for all the s-parameters in this partitioning pattern. Thus, instead of storing N×N s-parameters, only M values of s-parameters may need to be stored, where N is the number of ports of the target circuit and M is the number of slots in the p-space. For an s-parameter matrix at a measuring frequency point other than the particular frequency used to obtain the mapping relationship, the same mapping relationship applies and only M values of s-parameter, rather than N×N s-parameters, need to be stored. As a result, a total number of N×N×K s-parameters are converted into a total number of M×K p-space representations of s-parameters, where K is the number of measuring frequency points.
The M×K p-space representations of s-parameters may be stored in a pointer array or any other data structure. If a pointer array is used, a pointer in the array may represent a p-space slot and the data pointed to by the pointer includes s-parameter representations of all the s-parameters in a partitioning pattern corresponding to the p-space slot at different measuring frequencies. An s-parameter representation is the common value of all the s-parameters in a partitioning pattern at a measuring frequency point. One advantage of p-space representations of s-parameters is that there is little approximation for original s-parameters. The basic idea of p-space representations is to identify those s-parameters that have substantially the same value and to store only this common value for them.
The p-space representations can significantly reduce the storage space required for original s-parameters. For example, for a passive circuit/network with 500 observation nodes (ports) and 1,000 measuring frequency points, it may require 2 GB storage space for s-parameters (assuming 8 bytes for each s-parameter). In contrast, using a p-space with a scale of 104 (i.e., the permissible precision of s-parameter is 10−4), the total space required to store p-space representations of original s-parameters is 160M bytes (2×104×1,000×8 bytes, assuming the value range of the p-space is from −1 to 1). The ratio of the total storage using p-space representation over that using the conventional storage is about 1:12.5 in this case. Note that the more observation nodes are selected, the larger storage saving ratio can be attained using a p-space technique.
Modeling mechanism 720 may use a network of selected models (e.g., lumped device models or transmission line models) to represent the DUT. To represent the DUT as accurately as possible, the DUT may be divided into a large number of small sections with each section being represented by a model. The modeling mechanism may use some automatic tools to perform the modeling process. For example, the DUT may be described using one high level hardware description language and a modeling tool may produce a representation of the DUT using the selected models based on the description. Other methods may also be used to produce a representation of the DUT. The modeling mechanism may also need to coordinate with the observation node selector to identify nodes corresponding to the selected observation nodes in the DUT representation.
S-parameter measuring mechanism 730 may measure s-parameters among the observation nodes selected by observation node selector 710. In one embodiment, s-parameters may be measured directly from the DUT. In such a case, it might not be necessary to use a network of models to represent the DUT. In another embodiment, a software-based measuring tool may be used to measure s-parameters on the selected nodes according to s-parameter definition as shown in Equations (1)-(4) and (10). When a software-based measuring tool is used, the resulting s-parameters may have a higher precision than those measured by a physical device. The s-parameter measuring mechanism may measure the s-parameters at different measuring frequency points. At each measuring frequency point, the s-parameters obtained may fill an N×N matrix, where N is the number of selected observation nodes. All the s-parameters obtained by the s-parameter measuring mechanism may be stored in storage 740.
P-space constructor 750 may construct a 1D p-space based on s-parameters stored in 740. A critical s-parameter matrix (e.g., the one at DC frequency) or a combination of the representative s-parameter matrices may be selected to obtain the mapping relationship from s-parameter matrices to the p-space. The value range of the p-space reflects the value range of s-parameters in the selected s-parameter matrix. The scale of the p-space is determined based at least in part on the permissible precision of s-parameters in the selected s-parameter matrix. In one embodiment, the p-space may be divided equally into multiple slots, where the number of slots may be determined according to Equation (11). In another embodiment, slots might not be linearly uniform. For example, a certain sub-range of values in the p-space may be more finely divided than others if this sub-range corresponds to many more s-parameters than others. Additionally, a p-space may be divided logarithmically equally into multiple slots. An array of pointers may be used to represent multiple slots in the p-space.
Mapping mechanism 760 may generate a mapping relationship between the selected s-parameter matrix and the p-space constructed by p-space constructor 750. The mapping relationship may be obtained by a partitioning component (not shown in
The mapping mechanism may also comprise a projection component (not shown in
At block 840, a p-space may be constructed based on a selected s-parameter matrix from s-parameters obtained at block 830. For example, the s-parameter matrix at frequency 0, the highest frequency, or a combination of frequency samples, may be selected. The value range of the p-space corresponds to the value range of s-parameters in the selected s-parameter matrix. The scale of the p-space may be determined by the permissible precision of s-parameters according to Equation (12). In one embodiment, a precision not so fine as the finest precision of the s-parameters may be used to determine the p-space scale if the number of s-parameters corresponding to the finest precision is small. As described along with
At block 850, the selected s-parameter matrix may be used to obtain a mapping relationship between s-parameters and the p-space. First, the selected s-parameter matrix may be partitioned into patterns by scanning each entry in the matrix, mapping the entry to a p-space slot, and pointing the p-space slot to the index of the entry. Second, the mapping relationship between a p-space slot and indices of those s-parameters in the selected matrix may be stored using a pointer array or other types of data structure such as the one shown in box 520 of
At block 870, the DUT may be simulated using p-space representations of original s-parameters of the DUT. The simulation process involves backward projection from a p-space representation to original s-parameters in a matrix. The backward projection may be performed by looking up the mapping relationship obtained at block 850. Simulation results may be obtained at block 880. Since the storage space needed for p-space representations of s-parameters is much smaller than original s-parameters, less memory and other computing power is required for simulating the target circuit/network. Thus, a typical simulator may be well equipped for such a simulation task, and the simulation process can be completed faster with p-space representations of s-parameters than with s-parameters directly.
Although an example embodiment of the disclosed subject matter is described with reference to block and flow diagrams in
In the preceding description, various aspects of the disclosed subject matter have been described. For purposes of explanation, specific numbers, systems and configurations were set forth in order to provide a thorough understanding of the subject matter. However, it is apparent to one skilled in the art having the benefit of this disclosure that the subject matter may be practiced without the specific details. In other instances, well-known features, components, or modules were omitted, simplified, combined, or split in order not to obscure the disclosed subject matter.
Various embodiments of the disclosed subject matter may be implemented in hardware, firmware, software, or combination thereof, and may be described by reference to or in conjunction with program code, such as instructions, functions, procedures, data structures, logic, application programs, design representations or formats for simulation, emulation, and fabrication of a design, which when accessed by a machine results in the machine performing tasks, defining abstract data types or low-level hardware contexts, or producing a result.
For simulations, program code may represent hardware using a hardware description language or another functional description language which essentially provides a model of how designed hardware is expected to perform. Program code may be assembly or machine language, or data that may be compiled and/or interpreted. Furthermore, it is common in the art to speak of software, in one form or another as taking an action or causing a result. Such expressions are merely a shorthand way of stating execution of program code by a processing system which causes a processor to perform an action or produce a result.
Program code may be stored in, for example, volatile and/or non-volatile memory, such as storage devices and/or an associated machine readable or machine accessible medium including solid-state memory, hard-drives, floppy-disks, optical storage, tapes, flash memory, memory sticks, digital video disks, digital versatile discs (DVDs), etc., as well as more exotic mediums such as machine-accessible biological state preserving storage. A machine readable medium may include any mechanism for storing, transmitting, or receiving information in a form readable by a machine, and the medium may include a tangible medium through which electrical, optical, acoustical or other form of propagated signals or carrier wave encoding the program code may pass, such as antennas, optical fibers, communications interfaces, etc. Program code may be transmitted in the form of packets, serial data, parallel data, propagated signals, etc., and may be used in a compressed or encrypted format.
Program code may be implemented in programs executing on programmable machines such as mobile or stationary computers, personal digital assistants, set top boxes, cellular telephones and pagers, and other electronic devices, each including a processor, volatile and/or non-volatile memory readable by the processor, at least one input device and/or one or more output devices. Program code may be applied to the data entered using the input device to perform the described embodiments and to generate output information. The output information may be applied to one or more output devices. One of ordinary skill in the art may appreciate that embodiments of the disclosed subject matter can be practiced with various computer system configurations, including multiprocessor or multiple-core processor systems, minicomputers, mainframe computers, as well as pervasive or miniature computers or processors that may be embedded into virtually any device. Embodiments of the disclosed subject matter can also be practiced in distributed computing environments where tasks may be performed by remote processing devices that are linked through a communications network.
Although operations may be described as a sequential process, some of the operations may in fact be performed in parallel, concurrently, and/or in a distributed environment, and with program code stored locally and/or remotely for access by single or multi-processor machines. In addition, in some embodiments the order of operations may be rearranged without departing from the scope of the disclosed subject matter. Program code may be used by or in conjunction with embedded controllers.
While the disclosed subject matter has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications of the illustrative embodiments, as well as other embodiments of the subject matter, which are apparent to persons skilled in the art to which the disclosed subject matter pertains are deemed to lie within the scope of the disclosed subject matter.