23
Embedded System Control Embedded System Control Case Studies Case Studies COE718: Embedded Systems Design http://www.ee.ryerson.ca/~courses/coe718/ Dr. Gul N. Khan http://www.ee.ryerson.ca/~gnkhan Electrical and Computer Engineering Electrical and Computer Engineering Ryerson University Ryerson University______________ Overview Overview Elevator Controller HP Plotter Bluetooth Baseband Controller Part of Chapter 8 (Section 8.7) of Text by Wolf

Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

Embedded System Control Embedded System Control Case StudiesCase Studies

COE718: Embedded Systems Designhttp://www.ee.ryerson.ca/~courses/coe718/

Dr. Gul N. Khanhttp://www.ee.ryerson.ca/~gnkhan

Electrical and Computer EngineeringElectrical and Computer EngineeringRyerson UniversityRyerson University______________

OverviewOverview• Elevator Controller• HP Plotter• Bluetooth Baseband Controller

Part of Chapter 8 (Section 8.7) of Text by Wolf

Page 2: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:2

Elevator SystemsElevator Systems

CRC cards is a well-known method for analyzing a system and developing an architecture.

CRCCRCClassesResponsibilitiesCollaborators

Elevator Control ClassesElevator car, Passenger, Floor control, Car control, Car

sensors, etc.

Architectural ClassesCar state, Floor control reader, Car control reader, Car control sender, Scheduler.

Page 3: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:3

Elevator Responsibilities and Elevator Responsibilities and CollaboratorsCollaborators

class responsibilities collaborators

Elevator car* Move up and down Car control, carsensor, car controlsender

Car control* Transmits carrequests

Passenger, floorcontrol reader

Car state Reads currentposition of car

Scheduler, carsensor

Page 4: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:4

Elevator SystemElevator System

floor

floor

floor

floor

floor

Hoistway-1 Hoistway-2

TerminologyTerminology

Elevator CarElevator Car

HoistwayHoistway

Car control panelCar control panel

Floor control panel:Floor control panel:

Page 5: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:5

Elevator OperationElevator Operation

• Each floor has control panel, display• Each car has control panel:• Controlled by a single controller• Elevator control has up and down

To stop, disable both• Master controller:

reads elevator positionsreads requestsschedules elevatorscontrols movementcontrols doors

Page 6: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:6

Elevator Position SensingElevator Position Sensing

coarse

sensor

fine

Page 7: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:7

Elevator System RequirementsElevator System Requirements

name elevator systeminputs F floor control, N position, N car

control, 1 masteroutputs F displays, N motor controllersfunctions responds to requests, operates

safelyperformance elevator control is time-criticalmanufacturing cost electronics is small part of totalpower electronics consumes small

fraction of totalphysical size/weight cabling is important

Page 8: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:8

Elevator System ClassesElevator System Classes

Car

Floor

Master-Control-Panel*

Controller

Motor*

Coarse-Sensor*

Fine-Sensor*

Car-Control-Panel*

Floor-Control-Panel*

1

1

1NF

1

1N

1

11

1

1 1

1

1

Page 9: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:9

Physical InterfacesPhysical Interfaces

Sensor*hit: boolean

Coarse-sensor* Fine-sensor*

Motor*

speed: {o,s,f}

Floor-control-panel*

up, down: boolean

Car-control-panel*Floors[1..F]: booleanemergency-stop:

booleanopen-door, close-door:

boolean

Master-control-panel...

Sensor*hit: boolean

Coarse-sensor* Fine-sensor*

Motor*

speed: {o,s,f}

Floor-control-panel*

up, down: boolean

Car-control-panel*Floors[1..F]: booleanemergency-stop:

booleanopen-door, close-door:

boolean

Master-control-panel...

Page 10: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:10

ArchitectureArchitecture

Computation and I/O occur at:Computation and I/O occur at:• Floor control panels/displays• Elevator cars• System controller

Panels ControllerPanels Controller

Cab ControllerCab Controller• read buttons and send events to system controller• read sensor inputs and send to system controller

Page 11: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:11

System ControllerSystem Controller

Must take inputs from many sources:Must take inputs from many sources:

Must control cars to hard realMust control cars to hard real--time deadlinestime deadlinesUser interface, scheduling are soft deadlinesUser interface, scheduling are soft deadlines

TestingTestingBuild an elevator simulator using SystemC and/or FPGABuild an elevator simulator using SystemC and/or FPGA

• Simulate multiple elevators• Simulate real-time control demands.

Page 12: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:12

HP Drafting PlotterHP Drafting Plotter

Plots up to 36 inches wide at 300 DPI.Plots up to 36 inches wide at 300 DPI.Combines a variety of tasks:Combines a variety of tasks:

Design ConsiderationsDesign ConsiderationsMemory utilization is importantMemory utilization is important

36 inches 36 inches X large large X 300 DPI 300 DPI X n bits/pixel is a lot of n bits/pixel is a lot of memorymemory

Needs clever algorithms to minimize raster memory Needs clever algorithms to minimize raster memory requirementsrequirements

• Requires real-time control• Requires concurrency

Page 13: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:13

HP Plotter HWHP Plotter HW--ArchitectureArchitecture

i960KA adrslatch

busi/f

1 MBROM

2 MBDRAM

proc.supportASIC

||i/f

RS-422

penctrl

ASIC

swathRAM

servoprocessor

(8052)

EEPROM

DRAMctrlfront panel stepper

motor

carriagePC board

Page 14: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:14

The Plotting ProcessThe Plotting Process

HP-GL/2 PostScript

Rasterizer

Raster memory

PlotterController

Page 15: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:15

Early Architectural DecisionsEarly Architectural DecisionsChose Intel 80960KA as main processorChose Intel 80960KA as main processor• Handled parsing, rasterization control, print engine

control.• Multiplexed bus reduced pin count.• Could be upgraded to floating-point if necessary.

Used modular I/O to host system.Used modular I/O to host system.Did not use disk for local storage.Did not use disk for local storage.System componentsSystem components2 MB RAM (SIMM sockets for more).2 MB RAM (SIMM sockets for more).Three ASICs:Three ASICs:

Servo processing performed by 8052 MicrocontrollerServo processing performed by 8052 Microcontroller

Page 16: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:16

Data FlowsData Flows

i960KAadrslatch

busif

1 MBROM

2 MBDRAM

proc.supportASIC

||if

RS-422

penctrl

ASIC

swathRAM

Servoproc.

(8052)

EEPROM

DRAMctrlFront panel

steppermotor

CarriagePC board

Page 17: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:17

Rasterization and OperationsRasterization and Operations

RasterizationRasterization• Plot is generated in swaths.• Pixels are generated in row order by main processor.• Pixels are fed to pens in column order.• Pen interface ASIC transforms row order to column order.

OperationsOperations• Servo processor controls stepper motor.• Carriage processor must write, read pen alignment marks.• Processor support ASIC provides multiple functions.• Motion controller decodes position of print carriage and paper.

Page 18: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:18

Pen Interface and Carriage ASICsPen Interface and Carriage ASICs

Pen Interface ASICPen Interface ASIC•

Interfaces to i960 bus, swath memory, carriage ASIC.

Pen interface reads pixels from swath in predetermined pattern using pixel address generator.

Must support bi-directional printing since head prints both ways.

Carriage ASICCarriage ASIC•

Interfaces to processor bus, pen interface ASIC, servo controller.

Reads timing control registers using the CPU bus.•

Delay registers add correction for pen alignment.

Page 19: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:19

Development ProcessDevelopment Process

Pixel shuffling algorithm for pen interface/carriage ASICs was Pixel shuffling algorithm for pen interface/carriage ASICs was prototyped in C.prototyped in C.

Software Development EnvironmentSoftware Development Environment•

Plotter software could be run on Unix workstation or target platform.

Used in-house RTOS, HP-GL/2 parser was legacy code•

Rewrote vector/raster converter from assembly language to C to port to i960.

Front panel developed on PC, tested by user i/f designers/marketing.

Paper loading designed by mechanical engineers.

Page 20: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:20

Bluetooth BasebandBluetooth Baseband ControllerControllerBluetooth is a deBluetooth is a de--facto standard for wireless data facto standard for wireless data communication for 2.4GHz band. It is developed by a communication for 2.4GHz band. It is developed by a consortium including, Ericsson, Intel, Nokia and Toshibaconsortium including, Ericsson, Intel, Nokia and Toshiba.

Bluetooth SupportBluetooth Support•

Short-range communication (10cm to 10m)

Intends to support laptop to cell phone, printer, fax machines, keyboards, etc.

Provide a bridge to existing data networks.•

A gross data rate of 1Mbit/s

Uses frequency hopping scheme and forward error correction.•

Robust communication in a noisy and uncoordinated environment.

Page 21: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:21

VLSI VLSI Bluetooth BasebandBluetooth Baseband Controller Controller OrganizationOrganization

ARM7TDMIcore

4 KbyteI-cache

16K x 32SRAM

internalROM

EBC

externalbus

control

control

address (20)

data (8/16)

radio interface

JTAGsignals (5)

block

clockcontrol

clock

USB i/f

I2C i/f

UART1,2,3

FIFOsI/O

modeselect

interruptcontroller

counter/timers

Page 22: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:22

Bluetooth BasebandBluetooth Baseband ControllerController

Uses an ARM7TDMI core withUses an ARM7TDMI core with•

64Kbytes of fast RAM.

4Kbyte of instruction cache.

Sharing pin peripheral modules of 3 UARTS & a USB interfaceSharing pin peripheral modules of 3 UARTS & a USB interface

Bluetooth Baseband Controller includes a power optimized Bluetooth Baseband Controller includes a power optimized hardware block, the Ericsson Bluetooth Core (EBC) that handles hardware block, the Ericsson Bluetooth Core (EBC) that handles all the Link Controller functionality.all the Link Controller functionality.•

EBC performs all the packet handling functions for point-to-point, multi-slot and point-to-multipoint communications.

The protocol uses a combination of circuit and packet switching.•

Slots that can be reserved for synch channels (e.g. to support voice transmission).

Page 23: Embedded System Controller Case Studiescourses/coe718/lectures/...Elevator Operation • Each floor has control panel, display • Each car has control panel: • Controlled by a single

©G. Khan Embedded System Case Studies Page:23

A Typical Bluetooth ApplicationA Typical Bluetooth Application

Baseband controller needs a radio module and Baseband controller needs a radio module and ROMROM

flashmemory

Flash BluetoothBasebandController

Control

Address

Data

Host interface

Memory RadioModule

(RS232/USB)