A Transformational Codesign Methodology Tommy King-Yin Cheung, Graham Hellestrand and Prasert Kanthamanon VLSI and Systems Technology Laboratory School of Computer Science and Engineering University of New South Wales Kensington 2052 Australia Abstract æ æWe present a hardware/software codesign method- ology using formal transformations. The goal is to refine a given function specification of a task to an operational struc- ture involving both hardware and software components. The refinement process is separated into two levels, the algorithmic and the structural. Within each level, refinement is accom- plished by applying sequences of transformations that preserve the functionality of an initial specification. This allows various 'correct' design alternatives to be generated and their costs analyzed. At the algorithmic level, different algorithm designs are explored, each producing a computational schedule that has a different performance cost. At the structural level, differ- ent spatial structures with different resources and performance costs are explored. These costs which characterize the designs are used to assist in the hardware/software partitioning. An example is used throughout to illustrate this methodology. since each transformation step preserves the correctness of the original function, the resulting design is guaranteed to be correct. Intuitively, the transformation steps can be viewed as the primitive operations of a more general design-synthe- sis process, and hence many design automation techniques can be applied to automate the transformation steps. In this paper, the transformations are applied at two different levels within the codesign process: the development of a high-level algorithms and the optimization of low level structural im- plementations [2]. In practice, these two levels of transfor- mation are coupled together and applied iteratively. The ob- jective is to integrate the process of algorithm design, early on, with lower level structural design. This allows a broader design space to be explored than the traditional high level synthesis methodology which typically assumes a fixed al- gorithmic specification of the problem [3,4,5]. I. INTRODUCTION The specification is written in a single high level func- tional notation, called form [6,7,8] which provides for codesign a unified system specification device. The notation is aimed at describing various forms of control compositions and synchronisations over a set of functions and forms. Form has three key features. First, it has a semantic model [9] that captures the causal ordering of function applications on a stream of data possibly in a multidimensional structure [6]. The notion of continuity in streams [10,11] provides a tem- poral abstraction of data. The resulting model specifies a re- active behavior of a system which relates outputs to inputs in time. Second, parametrised function or form can be used as a type which defines a context to be instantiated by other func- tions [7]. Composite types can be built using the set of com- position laws for functions. The binding of composite func- tion types is particularly important for building systems hier- archically. Third, it supports syntactic transformation and verification [1]. The transformation mechanisms themselves are encoded using the notation. This supports a formal vali- dation of both the design and its transformation mecha- nisms, thus supporting the concept of correct-by-construction in our approach. The goal of hardware/software codesign is to synthesize efficient implementations consisting of mixed hardware/ software components from initial function specifications. A function specification is a description of an input/output re- lation, which is 'abstract' in the sense of being independent of any specific implementation or partitioning. The central idea behind our codesign process is to incrementally refine the high-level function specification until an implementation is derived which is as a mix of procedural software processes and applicative hardware modules. The process involves the exploration of hardware/software tradeoffs such as the opti- mization of the hardware/software interface or the movement of processing functions from one domain to the other. The process is based on a transformational synthesis approach which constructs the implementation by repeatedly applying a set of correctness-preserving transformation rules. The transformation is said to preserve correctness if the resulting implementation is functionally equivalent to its initial speci- fication [1]. This transformational approach has practical as well as theoretical advantages in codesign. The practical ad- vantage is that applying different sequences of correct trans- formations can generate alternative designs for performance and cost-benefit analysis. The theoretical advantage is that verification of the resulting design is achieved by the appli- cation of a sequence of correct transformation steps. That is, Another important component in a codesign system is a measure of design cost. Given a basic function specification, several transformations which lead to different correct hard- ware/software implementations may be applied. Each of the resulting implementations usually has a different design cost. A major task is to select an implementation that best ASP-DAC ’97 0-89791-851-7/$5.00 1997 IEEE