6
Senior Design Software-1 Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with external events Polling or interrupts Major software structures Device drivers Bridge between HW and SW

Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Embed Size (px)

DESCRIPTION

Senior DesignSoftware-3Seattle Pacific University External Synchronization External events may be discovered in two ways Polling  Check for new data on a regular basis  Main program has to integrate polls into the main loop Interrupts  External events announce themselves  Must carefully write interrupt handlers  Main program doesn’t have to be aware of what is going on with interrupts Choices If your product is driven mostly by external events, use interrupt-driven If your produce systematically goes through processes, use polling

Citation preview

Page 1: Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Senior Design Software-1Seattle Pacific University

High-level Software Design

Context Diagram Connections between major components

Synchronization with external events Polling or interrupts

Major software structuresDevice drivers Bridge between HW and SW

Page 2: Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Senior Design Software-2Seattle Pacific University

Context DiagramShow software connections between components

Indicate which drivers are needed Indicate where interrupt handlers are needed

RTC

Buttons

EEROM

LCD

A/D

RS232

Example for logging meter(Interrupt Driven)

MCU

Read Data

Change Mode

Store Data

Set Clock

Send Data toPC

Display Data

Driver

Driver

I/H

Driver

Driver

Driver

I/H

DataControl

Main Loop(Do nothing)

Reset(To all Drivers)

Page 3: Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Senior Design Software-3Seattle Pacific University

External Synchronization External events may be discovered in two ways

Polling Check for new data on a regular basis Main program has to integrate polls into the main loop

Interrupts External events announce themselves Must carefully write interrupt handlers Main program doesn’t have to be aware of what is going

on with interruptsChoices

If your product is driven mostly by external events, use interrupt-driven

If your produce systematically goes through processes, use polling

Page 4: Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Senior Design Software-4Seattle Pacific University

Device DriversInterface between hardware and software Provide a package of easy-to-use subroutines

to control and transfer data to external device Main software never “touches” I/O ports –

instead uses device driver subroutinesBenefits If hardware changes, only the device driver

changes, not the main software Programmers don’t have to understand the

details of all of the hardware Consistent methods of accessing and

controlling external devices

Page 5: Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Senior Design Software-5Seattle Pacific University

Software Architecture Document

Introduction Explain the role of software in your product

Context diagram Draw a diagram showing how the major

hardware components of your system are connected with software Indicate where device drivers and interrupt

handlers will be usedSoftware structure overview Describe major control flow

Interrupt-driven, polling, hybrid, etc… Include rationale for your choice

Page 6: Senior DesignSoftware-1Seattle Pacific University High-level Software Design Context Diagram Connections between major components Synchronization with

Senior Design Software-6Seattle Pacific University

Software Architecture Document

Main software routines Describe main software routines

Purpose, inputs, outputs and effects Include diagrams when useful

Device drivers (separate document, due later) Describe software interface to each device

driver List all driver subroutines including parameters Describe data structures needed

Indicate which MCU port pins/busses will be used for each hardware component