+ All Categories
Home > Documents > Design-for-reusability in VHDL

Design-for-reusability in VHDL

Date post: 20-Sep-2016
Category:
Upload: sk
View: 213 times
Download: 0 times
Share this document with a friend
9
Design-for-reusability in VHDL by J. Morris Chang and S. Kagan Agun The reuse of electronic components can improve productivity in system design. However, without careful planning, components are rarely designed for reuse. Hardware description languages are commonly used to construct from simple hardware to complex ones. HDLs allow the creation of reusable models, but the reusability of a design does not come with language features alone. It requires design disciplines to reach an efficient reusable design. Reusability issues and design methodologies to achieve design-for-reusability (DFR) are presented. Results of measuring the reusability of ten VHDL applications, based on the proposed reusable models, are summarised. This research allows us to gain an insight into DFR. ardwdre description languages (IIDLs) provide a convenient and compact format for hierarchical representation of functional and H wiring details ol digital systems. Illodern Hills support paranieterised designs via language constructs. For example, generic parameters can be used to build reusable components. However, reusaliility does not come magically with language features. 'This article calls for a detailed study for the issues in achieving design-for-reusability in VIIDL (Very high speed integrated circuit Hardware Description Language). As design teams face increasing device sizes and shrinking time scales, 'design-from-scratch' method- ologies struggle to cope with the challenge of system-on- a-chip (SoC) design. The reuse of design material offcrs higher productivity in SoC design. It is also bcconiiiig a common practice to offer sytithesisable hardware cores that are built with VHDL (also linowii as softcore) from thc ASIC vendors. These component models aim to exploit the reusability and portabilily of VHUL. How- ever, the niethodologics to achieve design-for-reusability (DFR) are rarely discussed. This article focuses on the reusability issues in the design of digital systems with VHDL and presents design methodologies that may lead to design reuse in using modern HDL. These methodologies are application oriented. For example, the design methodology for a reusable component @bit adder) that can he instantiated to any precision is considered as precision oriented. Apparently, the objective of such reusable design is to have the design to be used for varialile precision. Other design methodologies, such as feature oriented and data- type oriented, are also presented in this article. 'rhe measurement of reusability has bccn a major topic in software engineering. Applying reusability measure- ment on hardware system designs can gain an insight into DFR. The reusability of VHDL codes can be expressed by measuring the lines of code in reusable material or the number of reusable objects. On the hardware design, it is very natural to deal with components. Thus, the number of objects reused is adapted in measuring the rcusability of VHUL codes. Ten real-world VHDL applications, including popular IEEE packages, are evaluated with proposed design method- ologies to show the distribution ancl the reuse efficiency of these methodologies. Current issues and previous work The rcusability of a design has to do with, at least, the complexity of the design, the design methodologies employed, and the constructs or the HDI, used. As VLSI technology advances continuously, the complexity of tiardware components has increased sharply. The complexity of current hardware components can vary from a simple multiplexer to a PCI core (with a 91 page manual). Apparently, the reusability of a PCI core may never come close to the reusability of the MLK in LPM. However, with careful design and rich libraries of reusable components, the reusability of a complex design can be greatly improved. CONPIJTING & CONTKOL ENGINEERING JOCKNAL OCTOBER 2001
Transcript
Page 1: Design-for-reusability in VHDL

Design-for-reusability in VHDL

by J. Morris Chang and S. Kagan Agun

The reuse of electronic components can improve productivity in system design. However, without careful planning, components are rarely designed for reuse. Hardware description languages are commonly used to construct from simple

hardware to complex ones. HDLs allow the creation of reusable models, but the reusability of a design does not come with language features alone. It requires design disciplines to reach an efficient reusable design. Reusability issues and design methodologies to achieve design-for-reusability (DFR) are presented. Results of measuring the reusability of ten VHDL applications, based on the

proposed reusable models, are summarised. This research allows us to gain an insight into DFR.

ardwdre description languages (IIDLs) provide a convenient and compact format for hierarchical representation of functional and H wiring details ol digital systems. Illodern

Hi l l s support paranieterised designs via language constructs. For example, generic parameters can be used to build reusable components. However, reusaliility does not come magically with language features. 'This article calls for a detailed study for the issues in achieving design-for-reusability in VIIDL (Very high speed integrated circuit Hardware Description Language). As design teams face increasing device sizes and

shrinking time scales, 'design-from-scratch' method- ologies struggle to cope with the challenge of system-on- a-chip (SoC) design. The reuse of design material offcrs higher productivity in SoC design. It is also bcconiiiig a common practice to offer sytithesisable hardware cores that are built with VHDL (also linowii as softcore) from thc ASIC vendors. These component models aim to exploit the reusability and portabilily of VHUL. How- ever, the niethodologics to achieve design-for-reusability (DFR) are rarely discussed.

This article focuses on the reusability issues i n the design of digital systems with VHDL and presents design methodologies that may lead to design reuse in using modern HDL. These methodologies are application oriented. For example, the design methodology for a reusable component @bit adder) that can he instantiated to any precision is considered as precision oriented. Apparently, the objective of such reusable design is to

have the design to be used for varialile precision. Other design methodologies, such as feature oriented and data- type oriented, are also presented in this article.

'rhe measurement of reusability has bccn a major topic in software engineering. Applying reusability measure- ment on hardware system designs can gain an insight into DFR. The reusability of VHDL codes can be expressed by measuring the lines of code in reusable material or the number of reusable objects. On the hardware design, it is very natural to deal with components. Thus, the number of objects reused is adapted in measuring the rcusability of VHUL codes. Ten real-world VHDL applications, including popular IEEE packages, are evaluated with proposed design method- ologies to show the distribution ancl the reuse efficiency of these methodologies.

Current issues and previous work The rcusability of a design has to do with, at least, the

complexity of the design, the design methodologies employed, and the constructs or the HDI, used. As VLSI technology advances continuously, the complexity of tiardware components has increased sharply. The complexity of current hardware components can vary from a simple multiplexer to a PCI core (with a 91 page manual). Apparently, the reusability of a PCI core may never come close to the reusability of the MLK in LPM. However, with careful design and rich libraries of reusable components, the reusability of a complex design can be greatly improved.

CONPIJTING & CONTKOL ENGINEERING JOCKNAL OCTOBER 2001

Page 2: Design-for-reusability in VHDL

With VHDI,, the reusability of a design does not come naturally with generic construct. It requires substantial design disciplines in order to conic up with a reusable design. The disciplines require thorough understanding of both the problem domain a i d the solution domain. This issue in DFR is related to design discipliric. The disciplinecan be built with the help of a set of well defincd application-oriented design methodologies. Therclore, we investigate the design methodologies based on different reusable oricntations, hoping that these design methodologies can help us to develop the basic discipline to achieve DFR.

Software design methodology is one of the key components in the REused Based on Object-Oriented Techniques (REBOOT), which presents a holistic foundation to enable software reuse." In this method- ology, a set of generic guidelines and techniques is described for object-oriented system development. Moreover, a reusable component model' has been proposed to maximise the software reusability. This approach is based on hierarchical design methodology in the design phase, which enables reusable knowledge by integrating with the Hierarchical Object-Oriented Design

(HOOD) method. The HOOD2 method is used as a standard in the European design community. A design- level genericity is introduced in this method. As a result, the object-oriented paradigm is adapted to hardware design. Due to the lacking of language features, early researches have focused on the extensions on HDLs. Recently, research efforts have been shifted to adding object orientation methodology to HDLs. Studiesg show that it is possible to have higher reusability through object orientation modelling.

Using generic component libraries is probably the most common approach to achieve reusability. LEGEND' (generator-generator language) has been introduced to generate generic component libraries. LEGEND comple- ments VHDL by providing a library generator. The generator generates parameierised components of the library. For example, hardware template libraries for image processing are reusable component libraries for a specific application. VHDL is used widely in building generic templates for reuse' (e.g. SDRAMI template library*). These approaches placed emphasis on exploiting the VHDL language features.

Coding techniques3 presented reusable examples

b-in(3) b-in(2) b-in(l) b-in(0)

t b-out(0)

t b-out(1)

t b-out(2)

t b-out(4) b-out(3)

bit-in

1 leadingo-out leadingo-in -

anyl-out anyl-in

setl-out setl-in

leadingo-in : all the leading bits are '0' anyl-in setl-out

: at least one of the trailing bits is '1' : the current bit is requesting the higher order bit to set the bit-out to '1 '

Fig. 1 4-bit round-up system

COMPUTING & CONTROL ENGINEERING JOUKNAL OCTOBER 2001

Page 3: Design-for-reusability in VHDL

-

case (a), fs-a relationship

VHDL imolementation case (b), has-a relationship

case (c), hybrid

VHDL implementation -%

i VHDL implementation

2 Relationship of components ancl their VHDL implementations

through VIIDL languages features. However, the design methodologies of using these language features are not reported. Other approaches, interface-based designti and component-based design4 techniques which divide functionality of a design into internal functional behaviour and external interfacing, may require a spccial compiler and interface libraries. Thus, the reusability ol components depends on the platform.

We believe that thc kcy factor for reuse is the employed design methodology. However, it has rarely been rcuorted.

Design methodologies for DFR In this research, design methodologies are classified

based on the orientation of the design. Ad hoc, precision, feature and data-type orientations are the main factors to construct reusable hardware designs. Ad hoc is a design approach that does not follow any methodology. The hardware is reusable when it supports any size of prccision. Feature orientation is another factor for reusability. Having an option to choose any feature of a hardware gives us a flexibility

design may use both precision-oriented and data-type- oriented approaches. Design methodologies will be discussed in the following sections to provide detailed information.

Ad hoc An ad hoc approach requires no methodology at all

and can bc found in many designs today. Part of the reason is that it is natural for the designers to design in their own ways. Moreover, ad hoc is practised widely in a tight design schedule without intention to be reused by someone other than the designer.

Even if there is no intention to make functions reusable, such functions may be reused many times within the same application. However, to use thesc ad hoc type functions, the parameters may be used in a specific way. This leads to no flexibility to the function. Thus, it has very limited reusability in other applications. Due to its casy to develop and no rule design approach, ad hoc is still a widely used design methodology in most design communities.

without designing separate I hardware for each feature. Data type is crucial in reusable hardware design. Data-type orientation provides one component with all possible data type for reusability. A design may include one or a combination of these

b-out(0)=b-in(3)'.b-in(Z)'~b-in(l)'.b_in(0) b-out( I) = b-in(3)'. b-in(Z)'.b-in( 1). b-in(0)' b-out(Z)= bjn(3)'.b-in(Z). b-in(l)'. b-in(0)'. bjn(3)'. b-in(2)'. b-in(l). b-in(0) b-out(3) = b-in(3). b-in(2)'. b j n ( 1)'. b-in(O)'+bPin(3)'* b-in(2). (b-in(l)+ bjn(0)) b-out(4) =b-in(3). (t-in(2) + b-in( 1) + bJn(0))

Example 1 A Boolean expression approach for a 4-bit round-up system

orientations. For example, a I

COMPUTING & CONTROL ENGINEEKING JOUKNAL OCTOBEK 2001

Page 4: Design-for-reusability in VHDL

for I in 0 to L-LEFT loop RESULT0 := CBIT xor XL(1) xor XR(I), CBIT := (CBIT and XL(Ij) or (CBIT and XRO)

or (XL(1) and XR(1)); end loop;

(a)

c(0)< =cinn; fori in 0 to N-1 loop

sumn(i) <= an(;) XOR bn(i) XOK c(i); c(i+l) <= (an($ AND bn(i)) OR (an(;) AND

c(i)) OR (bn(i) AND c(i)); end loop; coutn <= c@);

(b)

Example 2 Implementation of hit-sliced with data flow model

I data(i+l) <= dah(i); END LF.

Pwcision-oneded clcsa&z ~netliodology The aim of a precision-oriented design is to have

a parameterised design for a digital component. This component can be instantiated to any precision. Typically, the precision refers to the number of bits. Thus this component can be reused regardless of the precision. To achieve this goal, two approaches are presented: bit- sliced and non-bit-sliced.

6) Bit-sliced approach Partitioning a complex design into small components

allows engineers to focus on a higher level of abstraction and hierarchy in design description that has become more desirable to digital systems designers. For instance, an 8-bit ripple carry adder can be implemented by ;I cascade of eight lull-adder stages. These full-adder components are instantiated in an iterativc fashion. With these components, an 8-bit addcr is formed in a structural model. This is referred to bit-sliced with structural model.

On the other hand, an 8-bit adder can be implemented without using componcnts. Instead of using a full-addcr component, the data flow model of a full adder is reused in an iterative fashion. This approach is referred as bit- sliced with dataflow model. The next subsections clctail bit-sliced approaches with structural and data flow models.

Bit-slictd wiflz structzcml nioctC.1: The VHDL genemte statement can instantiate small components (e.g. 1 -bit full adder) in an ifemtive fashion. In addition, using the VHDL ge~~erzc declaration this %bit adder can be instantiated to a n-bit adder. Such an approach results in a reusable design.

However, some of the cases can be less intuitive than the adder. One of our favourite examples in the bit-slice approach is a round-up system. This system should round up a given wbit binary data (as input) to its next higher binary data (as output), which is 2\’. For example (in decimal), inputs of 0,2,5, and 12 will produce outputs ol 0,2, 8, and 16, respectivcly.

A non-reusable design based on the Boolean expression is prcsented in Example 1. A bit-slice approach for a $-bit round-up system is presented in Fig. 1. The bit-sliced approach is very similar to the ripple adder. It starts with a careful planning to partition the given task down to single bit level. Then, structural architecture is used to take advantage of VHDL constructs-genemle and gc.ntwic. Moreover, ihis design employs a ‘message passing’ methodology lo link four 1- bit round-up blocks. It is worth noting that the messages are passed in both directions while the cavry is passed in only one direction in the ripple adder. The discipline of system level partition and algorithm development is crucial to this bit-sliced approach.

Other examples of using bit-sliced approach include digital comparators. It seems that the bit-sliced approach can bc slow due to signal propagation bctween each block. However, the actual performance depends on logic synthesis.

shift: PROCESS (datajn, r-1-shift, c-tmp) BEGIN

data(0) <= datajn; FOR i IN 0 TO n-1 LOOP

IF i < c-tmp AND r-1-shift = ‘1‘ THEN -right

ELSIF i<c-tmp ANI) r-1-shift = ‘0’ THEN -left data(i+l) <= data(i)(O) & data(i)(n-1 DOWNTO 1);

data(i+l) <= data(i)(n-Z DOWI\“TO 0) & data(i)(n-1); ETSE

END LOOP;

END PROCESS data-out <= data(n);

data(i+l) <= data(i); END LF,

END LOOP;

END PROCESS data-out <= data(n);

Example 3 ?+bit barrel shifter

Bit-sliced with data f low model: To illustrate the design approaches using bit-sliced with data flow model, an 8-bit ripple carry adder is used. Instead of using a full-adder component, thc data flow model of a full adder is reused in an iterative fashion showing the VHDL code oC this approach (Example 2). However, in order to make designs synthesisable in some synthesis tools, the bounds of jbr loops inust be locally static expressions.

(ii) Non-hit-siiced upf”la iZ non-bit-sliced approach is also used

in precision-oriented design. Eeliavioural description of the designs can be instantiated to any precision through parameters. Example 3 presents an rz-bit barrel shifter that uses

CObWLJ’rING & CONTKOL ENGNEERING JOUKNAL OCTOBER 2001

Page 5: Design-for-reusability in VHDL

REUSA

integer

bit-vector

std-logic-vector

std-ulogic-vector / std-ulogic-vector

Fig. 3 Data-type-oriented adder diagram

afov-loop construct.

Fkatuve-oriented &sign methodology The aim of feature oriented des& is to have a reusable

component that can offer a wide range of features in a digital system. For example, the LPM-add-sub component can offer either addition or subtraction function (in signed or unsigned) to the given operands. It is convenient to implement related features into one design so that this design can be reused again and again as different features are required. kf‘e classify this design methodology into three subgroups based on the relationship of features.

One technique used in object-oriented analysis is to discover the relationship of classes. The most common relationships are ‘is-a’ and ‘has-a’. For example, a shift register ‘is a’ register. A multiplier-accumulate (MAC) unit ‘has a’ multiplier. It is also very cominon to mix these two relationships into one design; we refer to it as ii

‘hybrid’ relationship. Fig. 2 presents these relationships. In Fig. 2, we show feature-oriented design method-

ologies that use case-wlzeiz construct in VHDL to select the desired feature(s). In case a, the features available to the base model A are B and C. Thus, the reusable

component can be instantiated to one of four different designs: model A without any extra feature, with feature A, with feature B, or with both feature A and B. In case b, A andB are two independent features. Thus, the reusable design can be instantiated to one of three different designs: with feature A, with feature B or with both features.

Recently, language constructs to support inheritance between VHDL entities have been proposed? These language constructs can facilitate the implementation of ‘is-a’ relationship. However, without thcse constructs, one still can design a reusable component through case-when construct. To our knowledge, the ‘has-a’ relationship is more common than ‘is-a’ relationship in the digital design. This is very different from the software systems.

Data-type-orieiated design methodolog~l It is desirable to have a functional unit to accept

operands of different data type. However, VHDL is a strong type language that doesn’t provide automatic type casting. Therefore, a user-defined type conversion is used for this purpose. This approach adds reusability to a hardware component. In Fig. 3 the Iz-bit adder acccpts the operands of bit-oectnv type only. To accept other data

a b C

Fig. 4 Distributed data-type conversion approach: (a) Unsigned divider; (b) Signed divider; and (c) Natural- unsigned divider

COMPUTING & COKTROL ENGINEERING JOURNAL OCTOBER 2001

Page 6: Design-for-reusability in VHDL

CASE OpType IS -Statement number - WHEN IntType=>

Conv2Bit(N, AInt, aSig); -1- Conv2Bit(N, BInt, bSigj; -2- Conv2lnt(carry@),Cint); -3- Conv2Int(N, sSig, Sint); -4- ...

WHEN RitType =>

WHEN StdType => ...

Conv2Bit(AStd, aSig); -5- ConvZEit(EStd, bSig); -6- ConvBStd(carry(N, CStd); -7- ConvZStd(sSig, SStd); -a - ...

WHEN StdUType => Conv2€3it(AStdU, aSigj; -9- Conv2 Ki t(HStdU, bSig); -10 - Conv2StdU(carry(N), CStdU); -11 - Conv2StdU(sSig, SStdU); -12 - ...

END CASE;

Example 4 Data-type-oriented adder implementation

types, two type conversion functions are added-one to convert the inputs to bit-vector and one to convert the bit-vector back to the desired outputs.

The approach in Fig. 3 puts all the type conversion functions into one single place, referred to as cmllmlised data comersion. Another approach, distributed data conversion, provides data conversion in several places. Both the approaches use function overloading .features to implement type conversions.

6) Cenkrolised dda-tyDe conversion: A centralised function will support all the possible data conversions. Fig. 3 shows the centralised approach.

Table 1 Summary of packages and applications

Although the conversion functions have no hardware significance to the design, they are crucial to the reusability of a design. They allow different data types to be used in one reusable design. These conversion functions can be inipleincnted with case-when construct and a set of overloaded procedures and operators A siniplc example ol such implementation is given in the next example.

In the VHDL Example 4, case-zuken construct is used to select the desired type conversion function. The actual type conversion functions can be implemented through overloaded procedures. The invocations of these procedures are ConvZBitO (in statements 1 and 2) and ConvZSldO (in statements 7 and 8). The implementations of these procedures are placed in thc package construct. Thus they can be reused in other designs.

I'

69 Distributed data-type conversion: For example, components (e.g. adders), with the same functionality, are constructed differently to accept different data types. In this approach, one or more data-type conversion functions are integrated into the components. Operator or function overloading are commonly employed. Fig. 4. shows some of the

examples of distributed data-type conversion. Unsigzed data inputs are converted into bit-vector in

order to be divided through a bil-vector-divider (Fig. 4a). The result of the division is converted back to unsigned. Signed-divider is the signed version of the same component (Fig. 4b). It is also possible to form different dividers that accept different data types. For example, natural-unsi~ed-divider in IEEE numeric-std package has unsigned and natural data inputs. This divider converts natural data to unsigned data type in order to use unsigned-divider rather than bit-vector-divider (Fig. 4). It is rccognised rhat data-type conversion increases the reusability of core components.

*LOC: line of code (excluding comment lines)

COIWUTWG & CONTROL ENGINEEKING JOURNAL OCTOBER 2001

Page 7: Design-for-reusability in VHDL

REUSA

Table 2 Distribution of design methodology

DLX processor 35 2.9 0 22.9 62.8 0 11.4

(iii) Other data-type comxrsions: It is worth noting that some data-type conversions are available from VHDL through type casting. For example, a signed variable b can be converted to unsigned data type by using type casting, UNSIGNED(b). This is referred to as buildin data conversioz, since this conversion is part 01 the kanguage features. However, this only works betwecn a data type and its subtypes.

The sld-logic-adla package in the IEEE library includes four sets of functions to convert values among SIGNED and UNSIGNED types, std-logic-vector, and the predefined type INTEGER. These type conversion functions are: conv-integer, cow-unsigned, conv-signed and corz~-st~-logic-veclop. Four versions of each function are available: the correct version for each function call is determined through function overloading.

In the I E W VHDL synthesis package (IEEI’ 1076.3, numeric-std, 1995), €unction and operator overloadings are widely used to lacilitate different data types. For example, arithmetic operators (e.g. ‘+’, I - ‘ , ‘P , ‘rem’, and ‘mod) are overloaded to accept operands ol different data type. However, the data types ol the results of these arithmetic operators are limited to either signed or unsikmed. Apparently, the conversion functions in the sk-logic-arith package can be used to convcrt the results to integer or std-logic-vector. The design approaches of these IEEE packages fall into the data-type-oriented design methodology.

Result Measuringreusability is one of the important topics in

software engineering. The most common way to measure reusability is the line of code (LOC) of the reused objects or the number of the reused objects. With hardware design, it is more natural to deal with components. Thus, the number of objects reused is adapted in measuring the reusability of VHDL codes. Measuring VHDL reveals the potential reuse of hardware components of the system under design. It also helps the development of design guidelines to enhance the reusability. Eleven real-world VHDL applications, including popular IEEE packages,

have been evaluated with the proposed design method- ologies.

Table 1 shows the applications, including IEEE numeric packages, LPM and models of the micro- controller. These applications represent real-world examples. The UKI, and size of the program (i.e. LOC) are also given in the Table.

‘Ib analyse these designs, two programs, measure and cozozt, were developed. h!!easure accepts VHDL codes as input, searches components, and counts LOC and number of reused components in the design. 1,OC is used tn get an idea ol the size of the applications. This program generates a number of the reused components and also detailed information of these reused component (e.g. function, procedure, component etc.,) The type of design methodology used in each rcused component is also iiicluded in the output file, which will be fed to the program count. Count simply generates the statistics of design methodologies and reuse metrics for each application.

‘I’en different applications Irom packages to special- purpose applications are summarised with each design methodology in Table 2 according to proposcd design methodologies. Five out of the ten applications liavc a high percentage of functions that use the ad hoc design approach. In the other live applications, the most common design approaches are precision-oriented. Among the precision-oriented methodologies, non-bit- sliced is the most common one. Data-type conversion design approach seems to play an important role in system design. 60% of numeric libraries (numeric-bit and numeric-std) include ddta-type conversion functions (Table 3).

Table 3 Distribution oi data-type conversion function in LEEE numeric-bit and numeric-std

non bit-sliced

numeric-bit

numeric-std 35.5% 24.5%

COMPUTING & CONTROL ENGINEERING JOURNL4L OCTOBER 2001

Page 8: Design-for-reusability in VHDL

USABILITY

Table 4 Distribution of reused functions (in functions)

D LX 2.86 11.43 40.0 _ _ 2.86 57 15

Among the packages and applications, LPM is thc only one that includes feature-oriented design methodologies. It is worth noting that 40,704 of the LPM iniplementatioii are feature-oriented approaches. Within that 40.7%. is-a relationship and has-a 1-elationship are 29.6% and 11 .l",L, respectively. is the common construct to choose proper functionality (e.g. pipelined or non-pipelined) of the components. Lpnz-add, Ipm_copnpnre, Ipm-inztx have signed and unsigned versions of a function. Thus, LPM5 preseii ts leature-oriented reusable design. I Iowever, it can handle only one data type: st&lo,qic-vcctor. Nonc ol the LPMs can accept more llian one data type. However, if ncedcd, the IEEE std-logic-a?,itk package mentioned earlier can be used. to perform type conwrsions. I11 some cases, LPMs accept inputs in thc typc of string. A conversion function that converts string back to integer is invoked i~itcrnally.

Table 4 depicts the distribution of all the reused functions in our study, The measurement is based on the number of the functions reused. The same measurement based 011 LOC is presentcd in Table 5. In Table 4, the percentages of the reused functions foi- each application are sumrnarised. For example, there are 40 non-bit-sliced functions out of total 130 library iunctions reused in the

Table 5 Distribution of reused functions (in LOC)

numeric-bit package. This leads to 307746 of the functions being reused (i.e. in the non-bit-sliced column). In the table, I - - ' represents that there is no function adopting this specific design methodology and 0% represents that none of the functions that adopted this design methodology is reused.

Ad hoc is the most common approach in Ihc applica- tions that ai-e not designed to be libraries (e.g. 18051). This type ol application tends to have fewer functions (35 functions for the 18051, which has 5763 LOC totally). Moreover, their functions are mostly based on the ad hoc approach. On the other side, applications that are to be libraries tend to have more functions (e.g. 130 lunctions in the numeric-bit package). The non-bit-sliced and feature- oriented are the niost coinnion approaches for this type of applications. This finding is very much consistent with Table 2 as well.

The last column in Table 4 shows thc total percentage of functions that are rcuscd for cach application. These numbers may be lower for libraries. This is because these libraries have a relatively large number of functions. Moreover, only a few of them are reused in other functions. It is worth noting that functions in these libraries are highly reusable and could be reused in other

COMPUTING & CONTROL ENGINEERING JOURNAT, OCTOBER 2001

Page 9: Design-for-reusability in VHDL

Table 6 Summary of reusability

packageAibrary ad hoc, % bit-sliced, YO non-bit-sliced, % future-oriented, % data conv., %

num-bit 66 67 100 34 19 75

num-std 100 100 33.87 75

LPM -- 0 54.5 0

LEON1 94 7 100 100 80

maths pack.' 17.65 50

18051 100

FreeDES 75

PIC-I 6Cx 93.75

DLX 100 50 63.34 25

*maths package includes complex and real packages

applications. On the other hand, the percentage of reused functions in non-library applications may be high. But these functions are ad hoc and may be very diflicult to be reused in other applications. One exception is DI,X, which s e e m to take reusable approaches in the design. Similar findings based on LOC are presented in Table 5. By using the LOC, the measurements seem to result in a higher percentage.

To further investigate the reusability among the proposed design methodologies, we also iiicasurc the percentage of the reused functions in each design methodology, This number may give us an indir:ation o€ which design methodology is more reusable. The reusability of each method is summarised in Table 6. The 66.6705 in the second column is based on the fact that four out of six ad hoc functions were reused in the mmzeric-bil package. Again, the ad hoc approach may enjoy a high reusability. But, it may be limited to a certain application only. In summary, the bit-sliced functions may lead to a very high reusability.

Conclusions The productivity of hardware system design depends

on the reusable components. The reusability of design material is crucial in coping with the challenge of SOC design. The HDLs allow the creation of reusable models. but the reusability of a dcsign docs not come with language features alone. It requires design disciplines to reach an efficient reusable design. This article has presented the reusability issues and the design method- ologies to achieve desi~i-for-reusdbilitp (DFR).

The proposed design methodologies, based on the design orientation, are ad hoc, precision, feature and data type. Detailed implementation of these methodologies has been presented. We have argued that reuse does not come magically from language features; it comes from design discipline.

Ten real-world applications have been analysed for design methodologies in this article. Ad hoc design approach is the most common one. The second most coinnion design approach is precision-oriented. More-

over, the design methodology that focuses on clata-type conversion is also very popular in many applications. This indicates that adopting soine basic reusability guidelincs for the initial VHDL code development can reduce the overheads of reusing that code in the future.

The reusability of each dcsign methodology has been measured in this study. The measurement can help designers to improve their design rcusability by adapting the proposed dcsign methodologies. The ad hoc approach can have high reusability, but may be limited to certain applications. Bikliced and feature-oriented design nietliodologies also have very high reusability.

References 1 DUTT, N. D.: 'Generic coiiipoiient library charactcrisation for high

lcvel synthcsis', Proceedings d thr PI iurth CSI/IIXE 1nterna:ioii;il Spiiiposiuiii on VIS1 Dcsign. Los Alamitos. C 4 , USA, Itti-8th January 1991. pp. 5-10

2 DAI.I<SSANI)KO, bf.. IACHIKI. P Id., ;ind ML4K'lXl~Ll, A: 'The generic rcusalile comporirtil: a n appi-inch to reiise hirrarchic;il 00 design', Pirreedings of 2nd Internatioixil Workshop on Software Reusability, Los Alamitos, CA, USA, I

Boston. 7th-8th October 1999

1.f'M sources, 1998

mation Cciitre, w~~;w.icl.coni/da, 1999

TUROLh, M.: 'Fast prototypiiig rif ari ASIC f i r ATM appliratiiiii using a syiitliesisahlr VHDI, flexible library', VHUL Iriteriiational Llsrrs' Forum, 1 Y97, pp. 88 -94

8 McCLOSKEY, R. R., aiid SANDERS, \I.: 'Redesign ofa gencric VHOI. model template for SRAMs', VHUI, International Lsn-s' Forum.

.5 irttp:/iwww.~dif.orb.iiprii~eb/niorr/2l0iiiodel.vhd, 1~:L)IF wcl) site foi-

ti Kainal Hashmi, M. M.: 'Intcrfacc-based design'. ICI, Design .Auto-

7 c L L w m o , s., ~11,11~1, E., MOKIANAI~O, A., IKLINI, M.,

1997, pp. 122 ~125 9 RAW.4, C., arid ROSEKSTIEL, W: 'Ol>jecl~oriented reuse methud-

ology for VHIII.'. Conhetice and Exliibition oi Design. kl totna~ion and Test in Eui-ope, 199C1, pp, 689 -693

& Sons, Ncw York, 1995) 10 KARLSSON, E.~4.: 'Soitware reuse ii holistic appi-oach' (John M l e y

(0 IEE: 2001

The authors we with the Ikpartment of Computer Science, Illinois Institute of Techiiiilogy, 10 West 31st Street, Chicago, IT. G0616, USA, E-mail {chang, agunsal} @charlie.iit.edu

CORIIPUTING &r CONTROT, ENGINEERING JOURNAL OCTOEER 2001


Recommended