1 / 29

APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN

APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN. Speaker: Prof. Vytautas ŠTUIKYS, Software Engineering Department, Kaunas University of Technology, Kaunas, Lithuania E-mail: vystu@if.ktu.lt Phone: 370-37-300399. Content.

javier
Télécharger la présentation

APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN Speaker: Prof. Vytautas ŠTUIKYS, Software Engineering Department, Kaunas University of Technology, Kaunas, Lithuania E-mail: vystu@if.ktu.lt Phone: 370-37-300399

  2. Content • Design Domain Analysis: System-level Design Processes in HW Design • Design Domain Analysis: Design Patterns in SW/HW Design Domains • Implementation of System-level Design Processes & Design Patterns • Metaprogramming and Design Pattern-based Design Framework • Experiments • Analysis, Evaluation and Problems • Conclusions

  3. Design Domain Analysis: Aims • 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 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)

  4. Design Domain Analysis: Findings • Trends: • Shift towards Integration-based Design (reuse, IP) • Blurring boundaries between HW & SW design • Well-understood sub-domains (models): • Interface-based design using well-defined communication models (Handshake, FIFO, etc.) • Fault-tolerant design using well-defined redundancy models (TRM, etc.) • Essential features of the designs: • Solutions for common problems (System-level Design Processes and Design Patterns) • Explicitly separated variant and invariant parts

  5. Hardware Design Processes • Register Transfer-level design processes • System-level design processes

  6. Layers of System-level Design Processes • Specification processes deal with the analysis and specification of design problems • separation of concerns, • composition, • generalization. • Implementation processes are concerned with the aspects of implementation of design solutions that deal with design problems • customization (e.g.,wrapping).

  7. Design Pattern: Definitions • 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] • … “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] • … “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. Motivation of Using Design Patterns • Raising the level of abstraction • Easing the communication between different design teams • Ensuring higher HW design quality • Increasing HW design automation and productivity • Accelerating design reuse, sharing and transfer

  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 • 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 • A Design Pattern is UML-based representation of a System-level Design Process

  10. Design Patterns in Hardware Design (1) • Pattern-like solutions • models of computation: • Finite State Machine • data flow models: • protocol • communication models: • bus • communication coprocessor • wrappers: • reliability wrapper • bus wrapper • protocol wrapper • memory wrapper

  11. Design Patterns in Hardware Design (2) • Design patterns • Adapted from SW design • Abstract Factory, State [Yoshida] • Resource Manager [Vanmeerbeeck et al.] • Composite, Object Adaptor, Abstract Factory and Decorator [Åström et al.] • Singleton [Charest and Aboulhamid] • New HW design patterns • Bus-Protocol, DLX Processor Architecture [Doucet and Gupta]

  12. Application of the OO Concepts for VHDL • Abstract class - VHDL entity • A class that implements an abstract class - VHDL architecture • The composition relationship - VHDL port map statement • Class attributes - VHDL ports and signals • Class methods –VHDL processes

  13. Wrapper Design Pattern • Allows adapting an interface and behavior of the IP component to the context of a given application • Can be nested

  14. Implementation of Design Pattern • 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. • The metaprogramming abstractions can be categorized into two large groups: • Homogeneous metaprogramming is based on the implicit separation of concerns. • Heterogeneous metaprogramming is based on the explicit separation of concerns.

  15. Principles of Metaprogramming • CI – Component Instance (IP) • R – Requirements for modification • S – Separation of concerns • P – Parameterization • I – Integration of concerns • MP – Metaprogram

  16. Heterogeneous Metaprogramming • Domain language is used for expressing basic domain functionality. • 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.

  17. Aim of Metaprogramming • 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. • 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. • Metaprogram is used as a set of instructions for a metalanguage processor to generate the specific domain program instances.

  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.

  19. Detailed Framework of Our Approach • (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). • (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.

  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 provide abstractions for describing generic components and domain program modifications. • To provide a means and guidelines for developing domain code generators (especially, wrapper generators).

  21. Experiments • Communication interface synthesis • Handshake Wrapper [DAC 03] • FIFO Wrapper [INFORMATICA, see Ref. in DAC03] • Fault-tolerant design [submitted, not presented here] • Space Redundancy Wrapper • Time Redundancy Wrapper • Data Redundancy Wrapper

  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) • Our aim is to adapt the IP for handshaking in order to establish a direct communication between the MC and the IP (b)

  23. FIFO Wrapper • 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 • The FIFOs store the surplus data, which is read in the same order in which it was written in

  24. Analysis and Evaluation (1) • The advantages of using HW design patterns: • The design content is captured immediately and intuitively. • 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 usage of the Wrapper design pattern • allows separating explicitly and implementing different design concerns separately, • enables the integration of the soft IPs into different HW systems, • facilitates the greater reusability of the soft IPs.

  25. Analysis and Evaluation (2) • The usage of the metaprogramming techniques allows us to develop metaprograms (wrapper generators), which • encapsulate common domain solutions (communication protocols), • adapt soft IPs to the different communication models. • Metaprogramming allows us • to raise the level of abstraction, • to increase the reusability and customizability of the soft IPs, • to generate automatically the communication interfaces.

  26. Problems Solved by Using Design Patterns and Metaprogramming • 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 level of abstraction is raised to the system level, which allows dealing with growing complexity of HW designs

  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 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?

  28. Conclusions • 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. • 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 !

More Related