Overheads for Computers as Components

Slides:



Advertisements
Similar presentations
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 1 Embedded Computing.
Advertisements

Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
Chapter 1 Embedded Computing 金仲達教授 清華大學資訊工程學系 (Slides are taken from the textbook slides)
© 2000 Morgan Kaufman Overheads for Computers as Components 2 nd ed. Introduction zExample: model train controller.
© 2000 Morgan Kaufman Overheads for Computers as Components 2nd ed. Introduction Example: model train controller. 1.
© 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed. Introduction Object-oriented design. Unified Modeling Language (UML). 1.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
The Unified Modeling Language (UML) Class Diagrams.
Chapter 7: The Object-Oriented Approach to Requirements
System Design Chapter 8. Objectives  Understand the verification and validation of the analysis models.  Understand the transition from analysis to.
Lesson 7 Guide for Software Design Description (SDD)
State Diagrams / System Sequence Diagrams (SSDs)
© 2005 ECNU SEIPrinciples of Embedded Computing System Design1 Introduction zExample: model train controller.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction  Example: model train controller.
Embedded Computer Systems Chapter1: Embedded Computing Eng. Husam Y. Alzaq Islamic University of Gaza 1 © 2010 Husam Alzaq Computers as Components.
CS 3610: Software Engineering – Spring 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class.
Introduction To System Analysis and Design
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
Fast Simulation Techniques for Design Space Exploration Daniel Knorreck, Ludovic Apvrille, Renaud Pacalet
CS 3610: Software Engineering – Fall 2009 Dr. Hisham Haddad – CSIS Dept. Class Project OO Design Document Here is what you need to do for your class project.
CS 4850: Senior Project Fall 2014 Object-Oriented Design.
Embedded System Spring, 2011 Lecture 2: FORMALISMS FOR SYSTEM DESIGN Eng. Wazen M. Shbair.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zExample: model train controller.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
Unit 1 Lecture 4.
© 2000 Morgan Kaufman Overheads for Computers as Components 1. Embedded Computing 1.1 Introduction 1.2 Complex system and microprocessors 1.3 Embedded.
© N. Ganesan, Ph.D., All rights reserved. Chapter Formatting of Data for Transmission.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
Lab 3 Specification and Requirements analysis Example: model train controller. Follow a design through several levels of abstraction. Gain experience.
Data and Computer Communications Digital Data Communications Techniques + Error Control+ Digital Data Communications Techniques + Error Control+Multiplexing.
Basic Concepts Microinstructions The control unit seems a reasonably simple device. Nevertheless, to implement a control unit as an interconnection of.
The embedded systems platform
Overheads for Computers as Components, 2nd ed.
Chapter 9: Data Link Control
Analysis Classes Unit 5.
Digital Control CSE 421.
Overheads for Computers as Components
Micro-programmed Control
4.2 Digital Transmission Pulse Modulation (Part 2.1)
Architecture Concept Documents
Function Generator Remote Control
Microprocessor Systems Design I
Computer Organization & Design Microcode for Control Sec. 5
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Communication Protocol
Overheads for Computers as Components
Introduction Object-oriented design. Unified Modeling Language (UML).
Introduction Example: model train controller..
Chapter 2: Database System Concepts and Architecture
Object-Oriented Design
Serial Communication Interface: Using 8251
Documenting an Architecture
Unified Modeling Language
IMAT5205 Systems Analysis and Design
Processes and operating systems
Layering & protocol stacks Johan Lukkien
DESIGN OF SEQUENTIAL CIRCUITS
CS 8532: Advanced Software Engineering
Overheads for Computers as Components, 2nd ed.
Overheads for Computers as Components, 2nd ed.
Design Yaodong Bi.
Error Detection and Correction
Chapter 9: Data Link Control
Automotive Technology Principles, Diagnosis, and Service
Presentation transcript:

Overheads for Computers as Components Introduction Example: model train controller. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Purposes of example Follow a design through several levels of abstraction. Gain experience with UML. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Model train setup rcvr motor power supply console ECC address header command © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Requirements Console can control 8 trains on 1 track. Throttle has at least 63 levels. Inertia control adjusts responsiveness with at least 8 levels. Emergency stop button. Error detection scheme on messages. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Requirements form © 2000 Morgan Kaufman Overheads for Computers as Components

Conceptual specification Before we create a detailed specification, we will make an initial, simplified specification. Gives us practice in specification and UML. Good idea in general to identify potential problems before investing too much effort in detail. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Basic system commands © 2000 Morgan Kaufman Overheads for Computers as Components

Typical control sequence :console :train_rcvr set-inertia set-speed set-speed estop set-speed © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Message classes command set-speed set-inertia estop value: integer value: unsigned- integer © 2000 Morgan Kaufman Overheads for Computers as Components

Roles of message classes Implemented message classes derived from message class. Attributes and operations will be filled in for detailed specification. Implemented message classes specify message type by their class. May have to add type as parameter to data structure in implementation. © 2000 Morgan Kaufman Overheads for Computers as Components

Subsystem collaboration diagram Shows relationship between console and receiver (ignores role of track): 1..n: command :console :receiver © 2000 Morgan Kaufman Overheads for Computers as Components

System structure modeling Some classes define non-computer components. Denote by *name. Choose important systems at this point to show basic relationships. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Major subsystem roles Console: read state of front panel; format messages; transmit messages. Train: receive message; interpret message; control the train. © 2000 Morgan Kaufman Overheads for Computers as Components

Console system classes 1 1 1 1 1 1 panel formatter transmitter 1 1 1 1 receiver* sender* © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Console class roles panel: describes analog knobs and interface hardware. formatter: turns knob settings into bit streams. transmitter: sends data on track. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Train system classes train set 1 1..t 1 1 train 1 motor interface 1 receiver 1 1 1 controller 1 1 1 detector* pulser* © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Train class roles receiver: digitizes signal from track. controller: interprets received commands and makes control decisions. motor interface: generates signals required by motor. © 2000 Morgan Kaufman Overheads for Computers as Components

Detailed specification We can now fill in the details of the conceptual specification: more classes; behaviors. Sketching out the spec first helps us understand the basic relationships in the system. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Train speed control Motor controlled by pulse width modulation: duty cycle + V - © 2000 Morgan Kaufman Overheads for Computers as Components

Console physical object classes knobs* pulser* train-knob: integer speed-knob: integer inertia-knob: unsigned- integer emergency-stop: boolean pulse-width: unsigned- integer direction: boolean sender* detector* mouse_click() draw_box send-bit() read-bit() : integer © 2000 Morgan Kaufman Overheads for Computers as Components

Panel and motor interface classes speed: integer train-number() : integer speed() : integer inertia() : integer estop() : boolean new-settings() © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Class descriptions panel class defines the controls. new-settings() behavior reads the controls. motor-interface class defines the motor speed held as state. © 2000 Morgan Kaufman Overheads for Computers as Components

Transmitter and receiver classes current: command new: boolean send-speed(adrs: integer, speed: integer) send-inertia(adrs: integer, val: integer) set-estop(adrs: integer) read-cmd() new-cmd() : boolean rcv-type(msg-type: command) rcv-speed(val: integer) rcv-inertia(val:integer) © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Class descriptions transmitter class has one behavior for each type of message sent. receiver function provides methods to: detect a new message; determine its type; read its parameters (estop has no parameters). © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Formatter class formatter current-train: integer current-speed[ntrains]: integer current-inertia[ntrains]: unsigned-integer current-estop[ntrains]: boolean send-command() panel-active() : boolean operate() © 2000 Morgan Kaufman Overheads for Computers as Components

Formatter class description Formatter class holds state for each train, setting for current train. The operate() operation performs the basic formatting task. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Control input cases Use a soft panel to show current panel settings for each train. Changing train number: must change soft panel settings to reflect current train’s speed, etc. Controlling throttle/inertia/estop: read panel, check for changes, perform command. © 2000 Morgan Kaufman Overheads for Computers as Components

Control input sequence diagram :knobs :panel :formatter :transmitter change in control settings read panel panel-active change in speed/ inertia/estop panel settings send-command read panel send-speed, send-inertia. send-estop panel settings read panel change in train number train number change in panel settings new-settings set-knobs © 2000 Morgan Kaufman Overheads for Computers as Components

Formatter operate behavior update-panel() panel-active() new train number idle send-command() other © 2000 Morgan Kaufman Overheads for Computers as Components

Panel-active behavior current-train = train-knob update-screen changed = true panel*:read-train() F T current-speed = throttle changed = true panel*:read-speed() F ... ... © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Controller class controller current-train: integer current-speed[ntrains]: integer current-direction[ntrains]: boolean current-inertia[ntrains]: unsigned-integer operate() issue-command() © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Setting the speed Don’t want to change speed instantaneously. Controller should change speed gradually by sending several commands. © 2000 Morgan Kaufman Overheads for Computers as Components

Sequence diagram for set-speed command :receiver :controller :motor-interface :pulser* new-cmd cmd-type rcv-speed set-speed set-pulse set-pulse set-pulse set-pulse set-pulse © 2000 Morgan Kaufman Overheads for Computers as Components

Controller operate behavior wait for a command from receiver receive-command() issue-command() © 2000 Morgan Kaufman Overheads for Computers as Components

Refined command classes type: 3-bits address: 3-bits parity: 1-bit set-speed set-inertia estop type=010 value: 7-bits type=001 value: 3-bits type=000 © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Summary Separate specification and programming. Small mistakes are easier to fix in the spec. Big mistakes in programming cost a lot of time. You can’t completely separate specification and architecture. Make a few tasteful assumptions. © 2000 Morgan Kaufman Overheads for Computers as Components