The invention relates to circuit analysis, particularly analysis of average power consumption of digital circuits, and to production of digital circuit fabrication instructions.
With the increase in computational complexity of digital circuits, minimization of power consumption is becoming a very important task and poses particular difficulties.
Also, due to the proliferation of battery-operated computing and/or communications devices with embedded (hardware-software) circuits, power consumption became a very hard constraint in the design process. Switching, particularly dynamic switching, is typically a major source of power dissipation. Another major source is short circuit current and leakage current.
Maximum power consumption is related to reliability of the digital system. Although many documents refer to power, in fact they mean energy. Energy E=P*t, where P means power and t is timing, is important as it directly relates to length of battery life. In this specification we use the term “average power consumption” or “average power” to mean energy consumption of the digital circuit over a period of time.
In order to minimize energy consumption it is required to determine both timing and power consumption. Generally these can be only measured once the circuit is being built. Due to fabrication cost issues, it is necessary to estimate efficiently both power and timing throughout the design flow (that is from the initial specification of the functionality until the circuit is fabricated) so that one can choose the best energy-aware option in the design search space.
Solving the estimation problem early in the design process and fast is crucial then to optimize power, timing and hence to minimize energy consumption. However, accurate estimation is difficult and requires considerable processor computational time. This translates into increased time to market or increased cost for the final digital circuit (or “chip”).
The invention is directed towards providing improved electronic circuit analysis with a fast and exact average power estimation.
Another objective is to provide for enhanced circuit design to achieve a circuit with lower power consumption and a shorter design cycle
According to the invention there is provided a method for estimating average power consumption of a target digital circuit, the method being performed by an analysis tool comprising a data input interface, a processor, and a data output interface, the method, comprising the steps of:
In one embodiment, step (a) is performed by automatic analysis of a target circuit netlist
In one embodiment, the step (b) includes analysing input binary strings of each component of the target digital circuit.
In one embodiment, the binary strings are analysed to determine if they comply with the following conditions for randomness-preservation:
In one embodiment, the processor further determines that a component is randomness preserving if the input strings satisfy:
In one embodiment, the processor performs step (e) by:
K(i)=2̂(ni−no)K(i−1) i.
In one embodiment, the processor performs step (e) by performing a weighted addition to generate data representing overall average power consumption of the circuit.
In one embodiment, the weighted addition is performed according to the algorithm:
P(s)=ΣP(i)K(i−1)
In another embodiment, the target digital circuit is an adiabatic circuit.
In another aspect, the invention provides a method of generating fabrication instructions for a target digital circuit, the method being performed by a processor and comprising the steps of:
In a further aspect, the invention provides a design tool for estimating average power consumption of a target digital circuit, the tool comprising an input interface adapted to receive a netlist for the target digital circuit, a processor adapted to perform the steps of a power estimation method as defined above in any embodiment, and an output interface for providing the average power data as an output.
In another aspect, the invention provides a system for generating fabrication instructions for a target digital circuit, the system. comprising a design tool as defined above in any embodiment, and a processor for processing a netlist which yields lowest power consumption to provide fabrication instructions for the corresponding target digital circuit.
The invention also provides a computer program product, comprising a computer usable medium having a computer readable program code embodied therein, said computer readable program code being adapted to be executed to implement a method for estimating average power consumption of a target digital circuit, said method comprising:
The invention will be more clearly understood from the following description of some embodiments thereof, given by way of example only with reference to the accompanying drawings in which: —
In the following description, when referring to power, we mean dynamic power, which typically includes primarily switching power.
Referring to
The tool 1 feeds as an output average power consumption for the whole target circuit into a circuit design process 4. The input to the design process may be used in iterative cycles in which there is dynamic change of a netlist so that a target circuit can be optimized for power efficiency.
The tool 1 in one embodiment comprises at a hardware level a conventional desktop computer with a general purpose processor programmed to perform the average power estimation and to interface with the other components in the digital circuit design flow.
The processor of the tool 1 is programmed to perform the following main steps:
The tool 1 determines power consumption data at RTL and gate level for some classes of digital circuits.
The tool 1 provides a fast feedback on the power efficiency of the target digital circuit. This reduces the overall design time and guides the searching of the design space for the optimum components.
In more detail the main functional steps performed by the tool 1 are as follows.
The main inputs to the tool 1 are a netlist from which the tool 1 determines:
The tool 1 commences by dividing the target digital circuit into n>=2 components by analysis of the netlist.
It checks which of these components are randomness-preserving. This is done by monitoring the input and output strings as set out in detail under the relevant heading below.
For each component which is randomness-preserving the tool 1 performs the following to determine a value K(i−1) representing the average number of times the component will be used.
K(i)=2̂(ni−no)K(i−1) i.
Find the estimated average power consumption P(i) of each component which is not randomness-preserving using the library 3 of power models. Also, use the library to determine a value for average power consumption of each randomness-preserving sub-component.
Generate an accurate estimation of the average power consumption of the complete target digital circuit by:
P(s)=ΣP(i)K(i−1)
Where, P(i) is the power consumption value of ith component and K(i−1) is the multiplicity value as computed above, and it is given a nominal value for each randomness-preserving component.
The main output of the tool 1 is average-case power consumption estimation of the complete target digital circuit. Hence, the tool can be used for part of system redesign in order to optimize the power consumption of the complete target digital circuit based on a re-design-re-compute iteration strategy. It could guide the designer during the design process to find the best components for system power optimization. It can also provide inputs to a tool which does hardware-software partitioning to optimize other constraints.
A collection of binary strings in the input or the output of the component is random if it has the following properties:
In operation of the tool 1, the target circuit is seen as a netlist (or interconnection) of several smaller components called children blocks (which can be themselves blocks built of even smaller blocks). The smallest blocks are called leafs.
The tool 1 uses the library 3 of power models for the leaf components if the parent component is randomness-preserving. It then uses these components to generate the exact average power for parents, until eventually it determines an exact average dynamic power for the circuit (the largest bock). For certain circuits, the power is compositional (see detailed description below), in other words it adds up the dynamic power of individual blocks in a modular manner to determine the power of the entire circuit.
The tool 1 does not need to perform simulation, assuming it has the exact switching models for the leaf blocks. Given that the leaf blocks of randomness-preserving parent blocks are small blocks (could be gates or small logic modules), their average switching can be efficiently and exactly determined using simulations. Without needing to simulate, the tool can compute the switching activity and hence the dynamic power.
For block ciphers, the tool determines the exact average switching power that may enable a new class of side channel attacks and hence some methods to protect against such attacks. It could help to answer the question how to determine a secret key using a minimum number of stimuli and measuring the consumed power and also help in hiding the real average power.
All of these block cipher modules are built using randomness-preserving components (eg. XOR gates, look-up tables or SBoxes, constant finite field multipliers) and one can determine the leaf component average switching and then determine the exact average power consumption for the entire cipher.
Some other randomness-preserving components include finite field arithmetic and modulo arithmetic used in communication systems.
Built-in self-test in design for test is another area which uses randomness-preserving components. Let's assume that the target digital circuit is made of three components: Block A, Block B and Block C. Block A could be autonomous, i.e. it generates only random outputs which are fed into block B. The outputs of the Block B are compacted into a signature in Block C. Here, a linear feedback shift register (block A) is the basis for pseudo-random test vector generations and it is also used in compaction (block C). Power dissipation during testing is important and the tool 1 could be used in determining the average power during testing of a randomness preserving unit (Block B) (i.e. block cipher). A linear feedback shift register is a randomness preserving unit (with empty input or output). The same principle can be also applied to Built In Logic Block Observers (BILBO) used in digital testing.
An application of the tool 1 is determining the average dynamic power for so-called adiabatic circuits (reversible circuits). These circuits promise a very significant power reduction while compared to traditional logic circuits. These circuits are randomness preserving and one can apply compositionality to derive the average dynamic power consumption. The whole emerging area of reversible computing can be considered for average dynamic power estimation using the tool.
Quantum computing is another research domain characterized of a large number of reversible functions and although the technology is not mature, one can predict that our method could be extended to estimate average performance for this class of modules.
All these applications give scope to the estimation methodology of the invention.
The following describes IO-sets and randomness. We w refer to the number of occurrences of an element in an input set number as the multiplicity of that element.
An IO-set is a finite set-like object in which order is ignored but multiplicity is explicitly significant.
Contrary to sets, IO-sets allow for the repetition of elements. Therefore, {00, 01, 10} and {00, 10, 01} are considered to be equivalent but {00, 01, 01, 10} and {00, 10, 01} differ. The cardinality of an IO-set is the sum of the multiplicities of the distinct elements.
Each IO-set T of |T| elements has an associated set J={j1, j2, . . . , jk} such that UT=UJ and where each element jiεj is repeated Ki times, where 1≦K≧|T| and Σi=1kKi=|T|. It is clear that an IO-set can be represented as a set of points {(j1,K1), (j2, K2), . . . , (jk, Kk)}.
Lemma 1: Given any circuit/system/component Θ for which input and output 10-sets are given by TΘ and OΘ respectively, the cardinalities of the two sets are equal, i.e., the following holds:
|TΘ|=|OΘ| (1)
The proof follows from that fact that for every input in a logic circuit, there will be a corresponding output. Some specific outputs may be repeated, hence, making respective multiplicities non-unity but cardinality is just sum of multiplicities.
By defining IO-sets and using Lemma 1, we have basically simplified the analysis of inputs and outputs for any component of the system. The analysis can now be just performed in terms of the IO-set, taking frequency of occurrence (multiplicities) of elements of IO-sets into account.
An IO-set T={(j1,Ki),(j1,K2)(jk,Kk)} is said to be complete if and only if its elements ji span over the complete space (2n elements if ji is composed of n-bits).
An IO-set T={(j1,K1), (j1,K2), . . . , (jk,Kk)} is called uniformly distributed if and only if
∀i,jε{1, 2, . . . , k},Ki=Kj=K (2)
An uniformly distributed IO-set T can hence be written as T={J,K}.
An IO-set is said to be Random, if it is complete and is uniformly distributed.
Lemma 2: Given any IO-set T and any subset Ts of T, a necessary condition for T being random is that Is is random.
Lemma 2 gives us a necessary condition for all the subsets of a random set T. An immediate corollary of Lemma 2 would be the following:
Corollary 1: Cartesian Product (complete combination, henceforth) of random sets T1, T2, . . . , Tn is always random.
Consider the input and output IO-sets for an EX-OR Gate. The input and output IO-sets will be defined as:
T
EX-OR={(00,1),(01,1),(10,1),(11,1)}
O
EX-OR={(0, 2),(1,2)}={{0,1},2}
It is easy to show that both TEX-OR and CEX-OR are Random. This is due to the fact that the outputs ‘0’ and ‘1’ span the complete space {(0,1)} and have equal multiplicities (given by 2 for an EX-OR gate).
The following defines various power measurements, IO-compositionality and four kinds of operations to perform the exact analysis.
Given a system S and a power measure P, four power measures with respect to input T can be defined as:
The Total Power of S for inputs from T, denoted by P′S(T) is defined as:
The Best-Case Power of S for inputs from T, denoted by PSB(T) is defined as:
P
S
B(T)=min{PS(I)|IεT}
The Worst-Case Power of S for inputs from T, denoted by PSW(T) is defined as:
P
S
W(T)=min{PS(I)|IεT}
The invention importantly determines the Average-Case Power of S for inputs from T, denoted by
Breakdown of Target Circuit into Components
Given a system (target circuit) S and the set of components C={C1, C2, . . . , Cn} which compose the system. Also, let Ii be the input to and Oi be the output of component Ci. We define the following operations:
Any system can be composed using these four basic operations. A graphical representation of the four operations is presented in
In the following we study first two kind of operations. While this includes a major class of algorithms implemented in VLSI, this analysis can be extended to formulate the condition for other operations using Lemma 2 and Corollary 1. The idea in that case will be to represent the last two operations as a complete combination of several Ci as a subset or superset of Cj.
Given a power measure P, let S denote the system (target circuit) and C1, C2 denote arbitrary components of the system S. ∀Ci, CjεS, we say that P is IO-Compositional w.r.t. the operation Ci;Cjiff
P
C
;C
(T)=PC
We study IO-Compositionality for Worst-case, Best-case and Average-case in the next section and take IO- to Linear-Compositionality in the next section.
We show that Worst and Best case power are not IO-Compositional, i.e., given the power consumption of components, only bounds can be derived on worst and best case powers. However, average-case power is IO-Compositional.
Lemma 3: Worst-Case Power PSW and the Best-Case Power PSB are not 10-Compositional w.r.t. operation Ci; Ci. Proof: For the Best-Case Power and Worst-Case Power, we observe that for any input IεT, clearly we must have
from which the non TO-Compositionality for Worst-Case and Best-Case follows immediately.
It can be shown that IO-Compositionality for Worst-case and Best-case power consumption can not be achieved in general, i.e., their semi IO-Compositionality inequalities are strict in general. This is illustrated by a counter-example below.
We demonstrate through a realistic, though artificial, example that Worst-case and Best-case power is not IO-Compositional.
Theorem 1: The average-case power is IO-Compositional w.r.t. operation Ci;Cj, i.e., for any system S and for any two components C1, C2 of S, where C1 operates on an input T and produces the output OC
C
;C
(T)=
where the last equality holds from the fact that |T|=OC
It is this IO-Compositionality of Theorem 1 which requires the specific distribution of outputs for computation of power consumption of a component of a system. Ideally, to reduce the design iterations, we would like to have linear compositionality, as defined informally in the introduction.
Lemma 4: The Total Pt, Best-Case PB. Worst-Case PW and Average-Case Power
The proof follows from the fact that the Input IO-sets for the two components are independent of each other.
To derive a necessary condition for linear compositionality w.r.t. power consumption, let us recall that for random IO-sets T,J,J′, we want:
C
;C
(T)=K×
i.e., the average power consumption of a sequential combination of two components is an addition of weighted average-power consumption of the components. Without loss of generality, we can assume that input IO-set to component C7 can be written as T=K×J. In such cases, (5) can be written as:
which can further be extended to:
Comparing (7) with result of Theorem 1, i.e. (4), the necessary condition for equivalence of these two equations is that:
which implies that linear compositionality can be achieved if output IO-set from one component is a random IO-set. Notice that for a ni bit input and n0 bit output, the value of K′ can be simply derived as K′=2n
Theorem 2: The average-case power is Linearly Compositional w.r.t. operation Ci;Cj, i.e., for any system S and for any two components C1, C2 of S, where C1 operates on an input T and C2 operates on an input T′:
C
;C
(T)=
if and only if C1 is randomness preserving.
It will be appreciated that the tool provides a fast feedback on the power efficiency of the design choice of the digital system. It helps in the design for low power/energy searching space. This reduces the overall design time, guides the searching of the design space for the optimum components for energy efficiency and also it provides accurate average power estimation of the most important component of power, the dynamic power.
As described above, the tool 1 is particularly effective if the blocks are randomness-preserving. Such functions, although restrictive, cover some important classes of digital circuits, namely in cryptography such as (but not restricted to) block ciphers (such as IDEA or AES) some hash functions, random/pseudorandom number generators, linear feedback shift registers (LFSR).
The invention is not limited to the embodiments described but may be varied in construction and detail.
Number | Date | Country | Kind |
---|---|---|---|
2008/0280 | Apr 2008 | IE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IE2009/000017 | 4/15/2009 | WO | 00 | 10/14/2010 |