© 2000 Morgan Kaufman Overheads for Computers as Components 2 nd ed. Introduction zExample: model train controller.

Slides:



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

System Integration and Performance
Give qualifications of instructors: DAP
EML 2023 – Motor Control Lecture 4 – DAQ and Motor Controller.
CS Fall Final Project Final Project Report and Grading Randy H. Katz Computer Science Division Electrical Engineering and Computer Science.
1-1 ROPES Rapid Object-Oriented Process for Embedded Systems.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
Computerized Train Control System by: Shawn Lord Christian Thompson Advisor: Dr. Schertz.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Networks zExample: elevator controller.
Long distance communication Multiplexing  Allow multiple signals to travel through one medium  Types Frequency division multiplexing Synchronous time.
Chapter 1 Embedded Computing 金仲達教授 清華大學資訊工程學系 (Slides are taken from the textbook slides)
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
© 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.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Program design and analysis zSoftware modem.
Lecture 4: Programmable logic Controllers
Module 2: Hardware and Terminology
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
INPUT-OUTPUT ORGANIZATION
Chapter 7: The Object-Oriented Approach to Requirements
Servo Motors # A servo is a motor that you can position at any angle very accurately. # Servos have a limited servo range; most servos have a range of.
Computerized Train Control System by: Shawn Lord Christian Thompson.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
© 2000 Morgan Kaufman Overheads for Computers as Components Networks zExample: elevator controller.
© 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.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zWhat are embedded systems? zChallenges in embedded computing system design.
1. 2 Purpose of This Presentation ◆ To explain how spacecraft can be virtualized by using a standard modeling method; ◆ To introduce the basic concept.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Connecting to the Network Networking for Home and Small Businesses.
Embedded Computer Systems Chapter1: Embedded Computing Eng. Husam Y. Alzaq Islamic University of Gaza 1 © 2010 Husam Alzaq Computers as Components.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
Object Management Group (OMG) Specifies open standards for every aspect of distributed computing Multiplatform Model Driven Architecture (MDA)
GLAST LAT ProjectDelta PDR/Baseline Review July 29-August 1, 2002 Section 7.3 AntiCoincidnce Detector Technical Status 1 GLAST Large Area Telescope: AntiCoincidence.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
Computer Architecture Lecture 2 System Buses. Program Concept Hardwired systems are inflexible General purpose hardware can do different tasks, given.
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.
Microprogrammed Control Chapter11:. Two methods for generating the control signals are: 1)Hardwired control o Sequential logic circuit that generates.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
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.
Communication Architecture and Network Protocol Layering Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by:
Recap of Layers Application, Data Link and Physical.
Lab 3 Specification and Requirements analysis Example: model train controller. Follow a design through several levels of abstraction. Gain experience.
Basic Concepts Microinstructions The control unit seems a reasonably simple device. Nevertheless, to implement a control unit as an interconnection of.
Wireless Power How it works
Overheads for Computers as Components
Micro-programmed Control
Overheads for Computers as Components
Computer Organization & Design Microcode for Control Sec. 5
Introduction Example: model train controller..
Object-Oriented Design
Documenting an Architecture
Unified Modeling Language
Pololu DC Motor Controller
Overheads for Computers as Components 2nd ed.
Processes and operating systems
Overheads for Computers as Components, 2nd ed.
Overheads for Computers as Components, 2nd ed.
Computer Systems An Introducton.
Presentation transcript:

© 2000 Morgan Kaufman Overheads for Computers as Components 2 nd ed. Introduction zExample: model train controller.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Purposes of example zFollow a design through several levels of abstraction. zGain experience with UML.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Model train setup console power supply rcvrmotor ECCaddressheadercommand

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Requirements zConsole can control 8 trains on 1 track. zThrottle has at least 63 levels. zInertia control adjusts responsiveness with at least 8 levels. zEmergency stop button. zError detection scheme on messages.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Requirements form

Digital Command Control zDCC created by model railroad hobbyists, picked up by industry. zDefines way in which model trains, controllers communicate. yLeaves many system design aspects open, allowing competition. zThis is a simple example of a big trend: yCell phones, digital TV rely on standards. © 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed.

DCC documents zStandard S-9.1, DCC Electrical Standard. yDefines how bits are encoded on the rails. zStandard S-9.2, DCC Communication Standard. yDefines packet format and semantics. © 2008 Wayne Wolf Overheads for Computers as Components, 2 nd ed.

DCC electrical standard zVoltage moves around the power supply voltage; adds no DC component.  1 is 58  s, 0 is at least 100  s. © 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. time logic 1logic 0 58  s>= 100  s

DCC communication standard zBasic packet format: PSA(sD)+E. zP: preamble = zS: packet start bit = 0. zA: address data byte. zs: data byte start bit. zD: data byte (data payload). zE: packet end bit = 1. © 2000 Morgan Kaufman Overheads for Computers as Components

DCC packet types zBaseline packet: minimum packet that must be accepted by all DCC implementations. yAddress data byte gives receiver address. yInstruction data byte gives basic instruction. yError correction data byte gives ECC. © 2008 Wayne Wolf Overheads for Computers as Components, 2 nd ed.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Conceptual specification zBefore we create a detailed specification, we will make an initial, simplified specification. yGives us practice in specification and UML. yGood idea in general to identify potential problems before investing too much effort in detail.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Basic system commands

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Typical control sequence :console:train_rcvr set-inertia set-speed estop

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Message classes command set-inertia value: unsigned- integer set-speed value: integer estop

© 2008 Wayne Wolf Overheads for Computers as Components Roles of message classes zImplemented message classes derived from message class. yAttributes and operations will be filled in for detailed specification. zImplemented message classes specify message type by their class. yMay have to add type as parameter to data structure in implementation.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Subsystem collaboration diagram Shows relationship between console and receiver (ignores role of track): :console:receiver 1..n: command

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. System structure modeling zSome classes define non-computer components. yDenote by *name. zChoose important systems at this point to show basic relationships.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Major subsystem roles zConsole: yread state of front panel; yformat messages; ytransmit messages. zTrain: yreceive message; yinterpret message; ycontrol the train.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Console system classes console panelformattertransmitter receiver*sender*

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Console class roles zpanel: describes analog knobs and interface hardware. zformatter: turns knob settings into bit streams. ztransmitter: sends data on track.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Train system classes train set train receiver controller motor interface detector*pulser* 1 1..t

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Train class roles zreceiver: digitizes signal from track. zcontroller: interprets received commands and makes control decisions. zmotor interface: generates signals required by motor.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Detailed specification zWe can now fill in the details of the conceptual specification: ymore classes; ybehaviors. zSketching out the spec first helps us understand the basic relationships in the system.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Train speed control zMotor controlled by pulse width modulation: V + - duty cycle

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Console physical object classes knobs* train-knob: integer speed-knob: integer inertia-knob: unsigned- integer emergency-stop: boolean pulser* pulse-width: unsigned- integer direction: boolean sender* send-bit() detector* read-bit() : integer

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Panel and motor interface classes panel train-number() : integer speed() : integer inertia() : integer estop() : boolean new-settings() motor-interface speed: integer

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Class descriptions zpanel class defines the controls. ynew-settings() behavior reads the controls. zmotor-interface class defines the motor speed held as state.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Transmitter and receiver classes transmitter send-speed(adrs: integer, speed: integer) send-inertia(adrs: integer, val: integer) set-estop(adrs: integer) receiver current: command new: boolean read-cmd() new-cmd() : boolean rcv-type(msg-type: command) rcv-speed(val: integer) rcv-inertia(val:integer)

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Class descriptions ztransmitter class has one behavior for each type of message sent. zreceiver function provides methods to: ydetect a new message; ydetermine its type; yread its parameters (estop has no parameters).

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. 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()

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Formatter class description zFormatter class holds state for each train, setting for current train. zThe operate() operation performs the basic formatting task.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Control input cases zUse a soft panel to show current panel settings for each train. zChanging train number: ymust change soft panel settings to reflect current train’s speed, etc. zControlling throttle/inertia/estop: yread panel, check for changes, perform command.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Control input sequence diagram :knobs:panel:formatter:transmitter change in speed/ inertia/estop change in train number change in control settings read panel panel settings panel-active send-command send-speed, send-inertia. send-estop read panel panel settings read panel panel settings change in train number set-knobs new-settings

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Formatter operate behavior idle update-panel() send-command() panel-active()new train number other

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Panel-active behavior panel*:read-train() current-train = train-knob update-screen changed = true T panel*:read-speed() current-speed = throttle changed = true T F... F

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Controller class controller current-train: integer current-speed[ntrains]: integer current-direction[ntrains]: boolean current-inertia[ntrains]: unsigned-integer operate() issue-command()

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Setting the speed zDon’t want to change speed instantaneously. zController should change speed gradually by sending several commands.

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Sequence diagram for set- speed command :receiver:controller:motor-interface:pulser* new-cmd cmd-type rcv-speed set-speed set-pulse

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Controller operate behavior issue-command() receive-command() wait for a command from receiver

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Refined command classes command type: 3-bits address: 3-bits parity: 1-bit set-inertia type=001 value: 3-bits set-speed type=010 value: 7-bits estop type=000

© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. Summary zSeparate specification and programming. ySmall mistakes are easier to fix in the spec. yBig mistakes in programming cost a lot of time. zYou can’t completely separate specification and architecture. yMake a few tasteful assumptions.