Download presentation
Presentation is loading. Please wait.
Published byGabriella Bunce Modified over 9 years ago
1
APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN Speaker: Prof. Vytautas ŠTUIKYS, Speaker: Prof. Vytautas ŠTUIKYS, Software Engineering Department, Kaunas University of Technology, Kaunas, Lithuania E-mail: vystu@if.ktu.lt Phone: 370-37-300399
2
2 Content Design Domain Analysis: System-level Design Processes in HW Design Design Domain Analysis: System-level Design Processes in HW Design Design Domain Analysis: Design Patterns in SW/HW Design Domains Design Domain Analysis: Design Patterns in SW/HW Design Domains Implementation of System-level Design Processes & Design Patterns Implementation of System-level Design Processes & Design Patterns Metaprogramming and Design Pattern-based Design Framework Metaprogramming and Design Pattern-based Design Framework Experiments Experiments Analysis, Evaluation and Problems Analysis, Evaluation and Problems Conclusions Conclusions
3
3 Design Domain Analysis: Aims To specify and understand the generally approved trends in design domain (SW/HW) To specify and understand the generally approved trends in design domain (SW/HW) To identify and characterize the well-understood sub-domains in HW design domain To identify and characterize the well-understood sub-domains in HW design domain To understand how approved solutions in SW domain can be applied for HW design To understand how approved solutions in SW domain can be applied for HW design To gain guidelines for achieving higher reusability, adaptability & productivity (including the ones for building domain generators) To gain guidelines for achieving higher reusability, adaptability & productivity (including the ones for building domain generators)
4
4 Design Domain Analysis: Findings Trends: Trends: Shift towards Integration-based Design (reuse, IP ) Shift towards Integration-based Design (reuse, IP ) Blurring boundaries between HW & SW design Blurring boundaries between HW & SW design Well-understood sub-domains (models): Well-understood sub-domains (models): Interface-based design using well-defined communication models (Handshake, FIFO, etc.) Interface-based design using well-defined communication models (Handshake, FIFO, etc.) Fault-tolerant design using well-defined redundancy models (TRM, etc.) Fault-tolerant design using well-defined redundancy models (TRM, etc.) Essential features of the designs: Essential features of the designs: Solutions for common problems (System-level Design Processes and Design Patterns) Solutions for common problems (System-level Design Processes and Design Patterns) Explicitly separated variant and invariant parts Explicitly separated variant and invariant parts
5
5 Hardware Design Processes Register Transfer-level design processes Register Transfer-level design processes System-level design processes System-level design processes
6
6 Layers of System-level Design Processes Specification processes deal with the analysis and specification of design problems Specification processes deal with the analysis and specification of design problems separation of concerns, separation of concerns, composition, composition, generalization. generalization. Implementation processes are concerned with the aspects of implementation of design solutions that deal with design problems Implementation processes are concerned with the aspects of implementation of design solutions that deal with design problems customization (e.g.,wrapping). customization (e.g.,wrapping).
7
7 Design Pattern: Definitions The design pattern is... The design pattern is... … “descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context” [E. Gamma et al., 1995] … “descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context” [E. Gamma et al., 1995] … “the abstraction from a concrete form which keeps recurring in specific non-arbitrary contexts” [Riehle and Zullighoven, 1996] … “the abstraction from a concrete form which keeps recurring in specific non-arbitrary contexts” [Riehle and Zullighoven, 1996] … “a named nugget of insight that conveys the essence of a proven solution to a recurring problem within a certain context amidst competing concerns” [B. Appleton, 2000] … “a named nugget of insight that conveys the essence of a proven solution to a recurring problem within a certain context amidst competing concerns” [B. Appleton, 2000] … “both a process and a thing; both a description of a thing which is alive, and a description of the process which will generate that thing” [C. Alexander, 1979] … “both a process and a thing; both a description of a thing which is alive, and a description of the process which will generate that thing” [C. Alexander, 1979]
8
8 Motivation of Using Design Patterns Raising the level of abstraction Raising the level of abstraction Easing the communication between different design teams Easing the communication between different design teams Ensuring higher HW design quality Ensuring higher HW design quality Increasing HW design automation and productivity Increasing HW design automation and productivity Accelerating design reuse, sharing and transfer Accelerating design reuse, sharing and transfer
9
9 System-level Design Processes and Design Patterns The subject of the object-oriented HW design should be not physically existing objects, but abstract concepts such as design processes The subject of the object-oriented HW design should be not physically existing objects, but abstract concepts such as design processes SW design patterns are used to describe the common SW architectures SW design patterns are used to describe the common SW architectures HW design patterns should be used to describe the commonly used System-level HW design processes in an abstract way HW design patterns should be used to describe the commonly used System-level HW design processes in an abstract way A Design Pattern is UML-based representation of a System-level Design Process A Design Pattern is UML-based representation of a System-level Design Process
10
10 Design Patterns in Hardware Design (1) Pattern-like solutions Pattern-like solutions models of computation: models of computation: Finite State Machine Finite State Machine data flow models: data flow models: protocol protocol communication models: communication models: bus bus communication coprocessor communication coprocessor wrappers: wrappers: reliability wrapper reliability wrapper bus wrapper bus wrapper protocol wrapper protocol wrapper memory wrapper memory wrapper
11
11 Design Patterns in Hardware Design (2) Design patterns Design patterns Adapted from SW design Adapted from SW design Abstract Factory, State [Yoshida] Abstract Factory, State [Yoshida] Resource Manager [Vanmeerbeeck et al.] Resource Manager [Vanmeerbeeck et al.] Composite, Object Adaptor, Abstract Factory and Decorator [Åström et al.] Composite, Object Adaptor, Abstract Factory and Decorator [Åström et al.] Singleton [Charest and Aboulhamid] Singleton [Charest and Aboulhamid] New HW design patterns New HW design patterns Bus-Protocol, DLX Processor Architecture [Doucet and Gupta] Bus-Protocol, DLX Processor Architecture [Doucet and Gupta]
12
12 Application of the OO Concepts for VHDL Abstract class - VHDL entity Abstract class - VHDL entity A class that implements an abstract class - VHDL architecture A class that implements an abstract class - VHDL architecture The composition relationship - VHDL port map statement The composition relationship - VHDL port map statement Class attributes - VHDL ports and signals Class attributes - VHDL ports and signals Class methods –VHDL processes Class methods –VHDL processes
13
13 Wrapper Design Pattern Allows adapting an interface and behavior of the IP component to the context of a given application Allows adapting an interface and behavior of the IP component to the context of a given application Can be nested Can be nested
14
14 Implementation of Design Pattern We implement HW design patterns using the metaprogramming techniques. We implement HW design patterns using the metaprogramming techniques. Metaprogramming is a higher-level programming technique, which provides a means for manipulating with other programs as data. Metaprogramming is a higher-level programming technique, which provides a means for manipulating with other programs as data. The metaprogramming abstractions can be categorized into two large groups: The metaprogramming abstractions can be categorized into two large groups: Homogeneous metaprogramming is based on the implicit separation of concerns. Homogeneous metaprogramming is based on the implicit separation of concerns. Heterogeneous metaprogramming is based on the explicit separation of concerns. Heterogeneous metaprogramming is based on the explicit separation of concerns.
15
15 Principles of Metaprogramming CI – Component Instance (IP) CI – Component Instance (IP) R– Requirements for modification R– Requirements for modification S – Separation of concerns S – Separation of concerns P – Parameterization P – Parameterization I – Integration of concerns I – Integration of concerns MP – Metaprogram MP – Metaprogram
16
16 Heterogeneous Metaprogramming Domain language is used for expressing basic domain functionality. Domain language is used for expressing basic domain functionality. Metalanguage is used for expressing generalization and describing domain program modifications. Metalanguage is used for expressing generalization and describing domain program modifications. Heterogeneous metaprogramming is based on the usage of two different languages in the same generic specification. Heterogeneous metaprogramming is based on the usage of two different languages in the same generic specification.
17
17 Aim of Metaprogramming Create a metaprogram – a program generator for a narrow application domain. Create a metaprogram – a program generator for a narrow application domain. Metaprogram consists of a family of the related domain program instances encapsulated with their modification algorithm. Metaprogram consists of a family of the related domain program instances encapsulated with their modification algorithm. Modification algorithm describes the generation of a particular instance depending upon the values of the generic parameters. Modification algorithm describes the generation of a particular instance depending upon the values of the generic parameters. Metalanguage is used as a higher-level abstraction to integrate the different domain program instances and make up a metaprogram. Metalanguage is used as a higher-level abstraction to integrate the different domain program instances and make up a metaprogram. Metaprogram is used as a set of instructions for a metalanguage processor to generate the specific domain program instances. Metaprogram is used as a set of instructions for a metalanguage processor to generate the specific domain program instances.
18
18 Relationship Between Design Process, Design Pattern and Metaprogramming We implement a particular HW Design Pattern by developing a parameterized code generator (metaprogram) that applies a respective System- level Design Process to a given soft IP. We implement a particular HW Design Pattern by developing a parameterized code generator (metaprogram) that applies a respective System- level Design Process to a given soft IP.
19
19 Detailed Framework of Our Approach (0) Extract from design domain analysis (DDA): SL DP/ Design pattern, requirements and IP. (0) Extract from design domain analysis (DDA): SL DP/ Design pattern, requirements and IP. (1) Extract the IP interface parameters from the soft IP interface and use them as generic parameters for metaprograms (MP). (1) Extract the IP interface parameters from the soft IP interface and use them as generic parameters for metaprograms (MP). (2) Design a MP, where a metalanguage (ML) performs the required domain program code modifications depending upon the values of the generic parameters. (2) Design a MP, where a metalanguage (ML) performs the required domain program code modifications depending upon the values of the generic parameters. (3) Generate the IP wrapper using a ML processor. (3) Generate the IP wrapper using a ML processor.
20
20 Role of Metaprogramming Techniques To serve as a bridge between the abstract description of the System-level HW Design Process and its implementation. To serve as a bridge between the abstract description of the System-level HW Design Process and its implementation. To provide abstractions for describing generic components and domain program modifications. To provide abstractions for describing generic components and domain program modifications. To provide a means and guidelines for developing domain code generators (especially, wrapper generators). To provide a means and guidelines for developing domain code generators (especially, wrapper generators).
21
21 Experiments Communication interface synthesis Communication interface synthesis Handshake Wrapper [DAC 03] Handshake Wrapper [DAC 03] FIFO Wrapper [INFORMATICA, see Ref. in DAC03] FIFO Wrapper [INFORMATICA, see Ref. in DAC03] Fault-tolerant design [submitted, not presented here] Fault-tolerant design [submitted, not presented here] Space Redundancy Wrapper Space Redundancy Wrapper Time Redundancy Wrapper Time Redundancy Wrapper Data Redundancy Wrapper Data Redundancy Wrapper
22
22 Handshake Wrapper The IP communicates with a micro-controller (MC), which drives the IP through a channel (bus) using a handshake data protocol (DP) (a) The IP communicates with a micro-controller (MC), which drives the IP through a channel (bus) using a handshake data protocol (DP) (a) Our aim is to adapt the IP for handshaking in order to establish a direct communication between the MC and the IP (b) Our aim is to adapt the IP for handshaking in order to establish a direct communication between the MC and the IP (b)
23
23 FIFO Wrapper The FIFO protocol is used in the producer-consumer communication model to smoothen bursts in the requests for a service The FIFO protocol is used in the producer-consumer communication model to smoothen bursts in the requests for a service To deal with such bursts, the FIFOs are inserted between the data producer and the data consumer To deal with such bursts, the FIFOs are inserted between the data producer and the data consumer The FIFOs store the surplus data, which is read in the same order in which it was written in The FIFOs store the surplus data, which is read in the same order in which it was written in
24
24 Analysis and Evaluation (1) The advantages of using HW design patterns: The advantages of using HW design patterns: The design content is captured immediately and intuitively. The design content is captured immediately and intuitively. The pattern-based design can be supported by the automated validation and code generation tools. The pattern-based design can be supported by the automated validation and code generation tools. The level of abstraction is raised to the system level. The level of abstraction is raised to the system level. The usage of the Wrapper design pattern The usage of the Wrapper design pattern allows separating explicitly and implementing different design concerns separately, allows separating explicitly and implementing different design concerns separately, enables the integration of the soft IPs into different HW systems, enables the integration of the soft IPs into different HW systems, facilitates the greater reusability of the soft IPs. facilitates the greater reusability of the soft IPs.
25
25 Analysis and Evaluation (2) The usage of the metaprogramming techniques allows us to develop metaprograms (wrapper generators), which The usage of the metaprogramming techniques allows us to develop metaprograms (wrapper generators), which encapsulate common domain solutions (communication protocols), encapsulate common domain solutions (communication protocols), adapt soft IPs to the different communication models. adapt soft IPs to the different communication models. Metaprogramming allows us Metaprogramming allows us to raise the level of abstraction, to raise the level of abstraction, to increase the reusability and customizability of the soft IPs, to increase the reusability and customizability of the soft IPs, to generate automatically the communication interfaces. to generate automatically the communication interfaces.
26
26 Problems Solved by Using Design Patterns and Metaprogramming The design content is captured immediately and intuitively, thus increasing design comprehensibility The design content is captured immediately and intuitively, thus increasing design comprehensibility The pattern-based design can be easily supported by the automated design validation and code generation tools, thus increasing design reuse, quality and productivity The pattern-based design can be easily supported by the automated design validation and code generation tools, thus increasing design reuse, quality and productivity The level of abstraction is raised to the system level, which allows dealing with growing complexity of HW designs The level of abstraction is raised to the system level, which allows dealing with growing complexity of HW designs
27
27 Problems yet to be solved How the System-level design processes described using the UML-based HW design patterns could be (semi-) automatically transformed into metaprograms? How the System-level design processes described using the UML-based HW design patterns could be (semi-) automatically transformed into metaprograms? How the physical constraints (such as the timing ones) should be reflected in an object-oriented model (design pattern)? How the physical constraints (such as the timing ones) should be reflected in an object-oriented model (design pattern)? How objects or even entire design patterns could be directly synthesized to RTL? How objects or even entire design patterns could be directly synthesized to RTL?
28
28 Conclusions We expect that the application of design patterns will contribute to the increase in HW design reuse, quality and productivity. We expect that the application of design patterns will contribute to the increase in HW design reuse, quality and productivity. The implementation of HW design patterns using the heterogeneous metaprogramming techniques should contribute to the increase in HW design automation. The implementation of HW design patterns using the heterogeneous metaprogramming techniques should contribute to the increase in HW design automation. Future work will focus on the discovery of other HW design patterns and the development of the HDL code generators for their implementation. Future work will focus on the discovery of other HW design patterns and the development of the HDL code generators for their implementation.
29
APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN Thank You for Your attention !
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.