Using Instance-Specific Circuits to Compute Autocorrelation Coefficients

Total Page:16

File Type:pdf, Size:1020Kb

Using Instance-Specific Circuits to Compute Autocorrelation Coefficients

Using Instance-Specific Circuits to Compute Autocorrelation Coefficients

Kenneth B. Kent Jacqueline E. Rice University of New Brunswick University of Lethbridge Faculty of Computer Science Dept. of Mathematics & Computer Science Fredericton, New Brunswick, Canada Lethbridge, Alberta, Canada [email protected] [email protected]

Abstract 2 Background

Autocorrelation coefficients have been shown to be useful This section provides some background information and in gathering information about and identifying characteris- motivation for this paper. tics of a logic function. This paper proposes utilizing a FPGA in the computation of the autocorrelation coeffi- 2.1 Autocorrelation Coefficients cients for a logic function. The approach presented in- volves generating a hardware solver that is instance-specif- The autocorrelation coefficients provide a measure of the ic to the logic function being analyzed. This technique function's similarity to itself, shifted by a given amount. leverages the parallel capabilities of the FPGA to perform This is also called the cross-correlation, or convolution the required computations. Various topics are addressed function. The autocorrelation coefficients have been used in such as background, motivation, the instance specific hard- optimization and synthesis of combinational logic [5], in ware design, and several factors of interest in the process. variable ordering for ROBDDs [2], and to compute the esti- mate C(f) of a function's complexity [5, 6]. The information inherent in the autocorrelation coefficients also has the po- tential to be of use in many other areas, such as in identify- 1 Introduction ing other types of complexity measures [7], symmetry iden- tification, and most recently in the optimization of decision Autocorrelation coefficients are useful in identifying char- diagrams [8]. Their use has been limited, however, which acteristics of a logic function. Knowing these characteris- is likely due to the fact that the commonly used methods of tics is beneficial for the synthesis process when implement- computation are exponential in the number of inputs to the ing logic functions. This paper discusses the use of a Field function(s). Programmable Gate Array (FPGA) to compute the autocor- relation coefficients of a logic function. Before defining the autocorrelation coefficients, we first An interesting aspect of this work is that an instance-specif- provide some notation that is used throughout. ic generated circuit solver performs the computation. Previ- ous work on instance-specific computations has shown that  f(X) and g(X) are each switching functions in despite the overhead of generating and synthesizing the in- which X = {x1 ... xn-1 xn}. stance-specific solution, they can outperform software solu- n n  u  u  2i1 and v  v  2i1 tions [3]. This result is attributable to the parallel capabili- i1 i i1 i ties of the FPGA and the solution’s exploitation of it.  n is the number of inputs to the switching function The following section provides background on related re- f(X). search including autocorrelation coefficients, reconfig- urable computing, and the instance-specific approach. Sec- The general cross-correlation (convolution) function be- tion 3 describes the hardware architecture used by the cir- tween two given functions f and g at a distance u is defined cuit solver to compute the autocorrelation coefficients, and as Section 4 outlines the design issues that must be addressed. 2n 1 f g Some of these issues include encoding the logic function to B (u)   f (v)  g(v  u) analyze, utilizing the parallelism in the computation, and v0 how to most effectively use the design space available. When f(X) = g(X), the resulting equation gives the cross- correlation of a function with itself, translated by u. The re- sulting coefficients that make up the vector B are referred to as the autocorrelation coefficients of the function. The Reconfigurable computing is generally identified for use in autocorrelation function is defined as follows [6]: either a static or dynamic role. In static reconfigurable com- 2n 1 puting, the device is programmed only once for the entire B f f (u)   f (v)  f (v  u) instance of an application. Dynamic reconfigurable comput- v0 ing solutions re-program the device several times, realizing If the superscripts f f are omitted then the autocorrelation many different hardware designs during execution. For both function is being computed, rather than the cross-correla- of these types of computing it is possible to use custom tion function. hardware designs that are either pre-existing or generated specifically for the current problem. For multiple-output functions a second step must be per- formed to combine the autocorrelation function for each of 2.4 Instance-Specific Approach the individual functions into the total autocorrelation func- tion. Only single-output functions are considered in this pa- With the flexibility of reconfigurable devices, it is possible per. to utilize the device not for a general problem, but rather for a specific instance of a problem. This relies upon generat- 2.2 ROBDDs ing a hardware design that encapsulates some of the inputs of a typically equivalent software solution. This approach Reduced Ordered Binary Decision Diagrams (ROBDDs) may appear at first to render a slower solution, but for cer- are an efficient data structure for the representation and ma- tain applications with desirable characteristics it can nipulation of Boolean functions. The original representa- achieve a high performance increase [3]. tion, Binary Decision Diagrams (BDDs) were presented by Akers in 1978 [9], and are simply a graphical implementa- There are several characteristics that make the calculation tion of the Shannon decomposition of the function. of a problem suitable for this computation technique. Restrictions to create ROBDDs were added by Bryant [10]. i. The computation is intensive and time consuming. These restrictions are that all redundant nodes are removed, This is a required characteristic needed to offset the duplicate nodes are shared, and an ordering is imposed on penalty for generation of the hardware design. the variables. This can lead to significant savings in the ii. The computation is relatively self-contained. This is numbers of nodes required to represent the function. An ex- suitable to allow the generated hardware design to be ample of the BDD and ROBDD representations for the compact enough to fit within an available re-pro- grammable device. function f (X ) x AxB  x A xC is shown in Figure 1. The calculation of the autocorrelation coefficients possesses both of these characteristics.

3 Hardware Architecture

The hardware architecture for this solution contains three main components. These are the Function, the Calculator, (b) ROBDD (a) BDD and the Controller. Figure 2 shows the components of the hardware architecture and their connections. Figure 1. The BDD and ROBDD representation for the same function. The Function components must contain the logic function for which the autocorrelation coefficients are to be comput- ed. Two instances of this component are used, one for each It should be noted that in general, the term BDD or ROB- function calculation that is required for each summation. DD may be used interchangeably when referring to a ROB- This component contains an embedding of the BDD repre- DD. sentation of the logic function. This allows relatively quick computation of the function for a given input. Most impor- 2.3 Reconfigurable Computing tantly, it provides a means of storing the function that in Reconfigurable computing utilizes the flexibility and pro- general, for functions with n inputs, does not require 2n en- cessing power of reconfigurable devices such as Field Pro- tries. This is important due to the inherent memory con- grammable Gate Arrays (FPGAs) in order to achieve an in- straints. crease in performance. This flexibility is increasingly inter- The Calculator is responsible for performing the actual esting as it allows the development and implementation of a computation of the coefficients. This module performs the custom hardware circuit as part of a solution. logic exclusive-or and summations of the autocorrelation function on inputs that are received from the Function and can directly translate into a finite state machine. Both component. of these qualities allow for a compact and easy implementa- The Controller process, as the name suggests, controls the tion. overall computation process and the storing of its results. The depth of the BDD is a determining factor in the speed This process generates the inputs for the Function compo- of the computations. In the worst case, the depth of the nent to process. It also interacts with the Calculator process BDD equals the number of inputs of the function. However, to reset the summation and also to extract the result of com- the depth may be decreased through the use of BDD reduc- puting a single coefficient. Upon extraction, the result is tion techniques. It is also possible to decrease function pushed out to an external memory that holds all of the auto- lookups by viewing the BDD as a series of levels through correlation co-efficients. which the function inputs must travel, and then pipelining the propagation of the inputs. The length of the pipeline is then equal to the depth of the BDD. Using this technique Controller can significantly reduce the computation time of function lookups, especially in this instance, where there are an ex- ceptionally high number of function calculations.

4.2 Design Space Utilization Function Function Computation of the autocorrelation coefficients is a highly parallel problem. Many of the tasks performed in the Calculator process are not dependent on their ordering. As such, there is much flexibility and potential for performing many of the operations in parallel. Given the basic underlying architec- Figure 2. Hardware architecture for computation of the ture presented in this paper, there is a great deal of potential autocorrelation coefficients. for further enhancements. Given no restriction on design space, an obvious enhance- ment to the architecture would be to replicate all of the 4 Design Issues computation units and split the calculation evenly between them. Replication of the necessary Controller and Calcu- This instance-specific approach and corresponding architec- lator functionality is anticipated to require minimal design ture raises many interesting design issues for investigation. space. The Function component is more demanding on de- sign space and its size is dependent on the size of the BDD 4.1 Logic Function Encoding representation. A key bottleneck of any solution to compute the autocorre- The hardware design for the custom circuit is generated lation coefficients is the lookup technique used for the func- specifically based on the function to be analyzed. The inter- tion under investigation. With any logic function, represen- esting question is how to determine the available design tation of the function can be both memory and compute in- space when generating the instance-specific hardware de- tensive, with a trade-off between each. Depending on the sign. This requires some heuristics that can be used by the desired features of the representation, a representation can instance generator to estimate how much design space each be chosen that requires low memory and high computation component will require. The consequences of decisions such as computing the output directly from the inputs, or made during the instance generation are significant. An in- high memory and low computation such as a lookup table appropriate decision can result in a slower than capable so- of the function. lution with under-utilized resources or a solution that can- not fit within the available reconfigurable device. Future Reconfigurable devices and the support available for them work will address this issue. currently dictate that computation is preferred over memo- ry. As the number of inputs for the function under investi- gation increases, the amount of memory that is required 5 Analysis & Preliminary Results quickly becomes infeasible. However, the processing power of the reconfigurable device is vast, and if leveraged appro- The computation process of a single autocorrelation coeffi- priately, can provide faster results. cient is dominated by calculation of the function under in- A technique under investigation is to encode the logic func- vestigation. One autocorrelation coefficient in a brute force tion as a BDD within the Function component. This is implementation requires on the order of 2n function calcula- deemed suitable since a BDD representation is reducible tions. While the number of computations is not reduced in this implementation, the time required to compute each also discussed, including a suitable encoding of the logic function is reduced. In the technique presented, the use of function for use in a reconfigurable device and the full uti- pipelining results in only a constant penalty of 1 hardware lization of the available design space. These aspects be- clock cycle to perform a function calculation. This is much come more critical and difficult because of the in- faster than the time required to perform the same computa- stance-specific approach. tion in software. The exact time is dependent on the speed of the circuit, which will be known after placement and routing of the hardware circuit design. In the preliminary References results shown in Table 1, the speed of the implemented cir- [1] List of FPGA-based Computing Machines. URL: cuits above varied approximately from 37 MHz to 45 MHz. http://www.io.com/~guccione/HW_list.html [2] J. E. Rice and J. C. Muzio and M. Serra, “The Use of SW Autocorrelation Coefficients for Variable Ordering for Hardware Time (sec) Time ROBDDs”, 4th International Workshop on Applications of % (sec) the Reed-Muller Expansion in Circuit Design (RM99), 1999. File Inputs CLB Synthe- Gener- use size and Compute 1 [3] K. B. Kent and M. Serra, “Using FPGAs to Solve the ate imple- coefficient Hamiltonian Cycle Problem”, International Symposium on VHDL ment Circuits and Systems (ISCAS) 2003, May 2003. 9symml 9 29 1 660 1.03 e-4 0.20 [4] Stephen D. Brown, Robert J. Francis, Jonathan Rose, alu4 14 33 1 720 0.006 0.50 and Zvonko G. Vranesic, “Field-Programmable Gate Ar- rays”, Kluwer Academic Publishers, 1992. co14 14 29 1 480 0.0049 0.10 F51m 14 33 1 660 0.006 0.60 [5] R. Tomczuk, “Autocorrelation and Decomposition life 9 29 1 660 1.0 e-4 0.20 Methods in Combinational Logic Design”, Ph.D. Disserta- max46 9 29 1 660 1.0 e-4 0.10 tion, University of Victoria, 1996. mux01 21 29 2 660 0.99 2.70 [6] M. Karpovsky, “Finite Orthogonal Series in the Design parity 16 29 4 660 0.024 30.5 of Digital Devices”, John Wiley & Sons, 1976. ryy6 16 30 1 660 0.244 0.10 [7] D. Varma and E. A. Trachtenberg, “Efficient Spectral t481 16 30 1 660 0.233 0.20 Techniques for Logic Synthesis”, in “Logic Synthesis and Optimization”, ed. T. Sasao, 1993. Table 1. Comparison of software and hardware compu- tation times. [8] M. Karpovsky, R. Stankovic and J. Astola, “Reduction of Size of Decision Diagrams by Autocorrelation Func- tions”, submitted to IEEE Trans. on Computers, 2001. Clearly the time required for the synthesis and implementa- [9] S. Akers, “Binary Decision Diagrams”, IEEE Trans. on tion (~ 600 sec) in hardware is far larger than the time re- Computers, Vol. C-27 No. 6, June 1978, pp. 509-516. quired to compute a single coefficient in software1. Howev- [10] R. Bryant, “Graph-Based Algorithms for Boolean er, the hardware advantage is that after completing the Function Manipulation”, IEEE Trans. on Computers, Vol. placement and routing, the time for computing a single co- C-35 No. 8, August 1986, pp. 671-691. efficient is almost negligible. For example, to compute all 2n coefficients for the parity function, the hardware imple- [11] J. E. Rice and J. C. Muzio, “Methods for Calculating mentation will require 2240 seconds, while the software im- Autocorrelation Coefficients”, 4th International Workshop plementation will require 2.00x106 seconds. on Boolean Problems, Sept. 2000, pp 69-76.

6 Summary

This paper presents the approach of using a reconfigurable device in an instance-specific manner to solve the problem of computing the autocorrelation coefficients for a logic function. Various aspects of the approach are discussed in- cluding a suitable hardware architecture for the solution. Several of the interesting research aspects of this work are 1 The software results are taken from [11].

Recommended publications