APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN Speaker: Prof. Vytautas ŠTUIKYS, Speaker: Prof. Vytautas ŠTUIKYS, Software Engineering Department, Kaunas.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Architecture Representation
ARCH-05 Application Prophecy UML 101 Peter Varhol Principal Product Manager.
Lecture # 2 : Process Models
May 2, May 2, 2015May 2, 2015May 2, 2015 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific University, Azusa, CA.
Design Patterns Section 7.1 (JIA’s) Section (till page 259) (JIA’s) Section 7.2.2(JIA’s) Section (JIA’s)
Requirements Engineering n Elicit requirements from customer  Information and control needs, product function and behavior, overall product performance,
Dynamic Service Composition with QoS Assurance Feb , 2009 Jing Dong UTD Farokh Bastani UTD I-Ling Yen UTD.
Introduction To System Analysis and Design
Architecture is More Than Just Meeting Requirements Ron Olaski SE510 Fall 2003.
Presenter : Yeh Chi-Tsai System-on-chip validation using UML and CWL Qiang Zhu 1, Ryosuke Oish 1, Takashi Hasegawa 2, Tsuneo Nakata 1 1 Fujitsu Laboratories.
Software Factory Assembling Applications with Models, Patterns, Frameworks and Tools Anna Liu Senior Architect Advisor Microsoft Australia.
Requirements Analysis Concepts & Principles
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
- 1 - Component Based Development R&D SDM Theo Schouten.
Copyright  1999 Daniel D. Gajski IP – Based Design Methodology Daniel D. Gajski University of California
Methodologies for Web Information System Design
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Analysis Concepts and Principles
Improving UML Class Diagrams using Design Patterns Semantics Shahar Maoz Work in Progress.
CS 290C: Formal Models for Web Software Lecture 6: Model Driven Development for Web Software with WebML Instructor: Tevfik Bultan.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Design Patterns.
Purpose of Requirements Analysis Process of discover, refinement, modeling, and specification o Bridge gap between system level SW allocation and design.
Chapter 22 Object-Oriented Design
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
Course Instructor: Aisha Azeem
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Domain-Specific Software Engineering Alex Adamec.
The chapter will address the following questions:
1  Staunstrup and Wolf Ed. “Hardware Software codesign: principles and practice”, Kluwer Publication, 1997  Gajski, Vahid, Narayan and Gong, “Specification,
Deriving AO Software Architectures using the AO-ADL Tool Suite Luis Fernández, Lidia Fuentes, Mónica Pinto, Juan A. Valenzuela Universidad de Málaga
Requirements Analysis
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
101 User Interface Patterns and its applications Tonya Groover Department of Computer Science.
1 Chapter 5 Software Engineering Practice. 2 What is “Practice”? Practice is a broad array of concepts, principles, methods, and tools that you must consider.
Introduction To System Analysis and Design
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
Odyssey A Reuse Environment based on Domain Models Prepared By: Mahmud Gabareen Eliad Cohen.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Drexel University CS 451 Software Engineering Winter Yuanfang Cai Room 104, University Crossings
Generative Programming. Automated Assembly Lines.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
1 Introduction to Software Engineering Lecture 1.
Illustrations and Answers for TDT4252 exam, June
Refining middleware functions for verification purpose Jérôme Hugues Laurent Pautet Fabrice Kordon
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
Understanding and using patterns in software development EEL 6883 Software Engineering Vol. 1 Chapter 4 pp Presenter: Sorosh Olamaei.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
An approach for Framework Construction and Instantiation Using Pattern Languages Rosana Teresinha Vaccare Braga Paulo Cesar Masiero ICMC-USP: Institute.
Copyright © Active Frameworks Inc. - All Rights Reserved - V2.0Design Pattern Catalog - Page L3-1 PS95&96-MEF-L10-1 Dr. M.E. Fayad Creationa.
MODEL-BASED SOFTWARE ARCHITECTURES.  Models of software are used in an increasing number of projects to handle the complexity of application domains.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
1 Chapter 5:Design Patterns. 2 What are design pattern?  Schematic description of design solution to recurring problems in software design and,  Reusable.
Structured Component Composition Frameworks for Embedded System Design Sandeep Shukla, Virginia Tech. Frederic Doucet, Rajesh Gupta University of California,
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
February 19, February 19, 2016February 19, 2016February 19, 2016 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns: MORE Examples
Chapter 10 Design Patterns.
Chapter 5:Design Patterns
Introduction to Design Patterns
APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN
Software Quality Engineering
IP – Based Design Methodology
Presentation transcript:

APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN Speaker: Prof. Vytautas ŠTUIKYS, Speaker: Prof. Vytautas ŠTUIKYS, Software Engineering Department, Kaunas University of Technology, Kaunas, Lithuania Phone:

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 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 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 Hardware Design Processes Register Transfer-level design processes Register Transfer-level design processes System-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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.

APPLICATION OF DESIGN PATTERNS FOR HARDWARE DESIGN Thank You for Your attention !