the george washington university school of engineering & applied science department of...

34
The George Washington University School of Engineering & Applied Science Department of Electrical & Computer Engineering ECE Senior Design Design vs. Implementation Professor Tom Manuccia

Upload: amberlynn-stanley

Post on 17-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

The George Washington UniversitySchool of Engineering & Applied Science

Department of Electrical & Computer Engineering

ECE Senior Design

Design vs. Implementation

Professor Tom Manuccia

Lecture Agenda

• What is design• Ways to describe design• What is implementation

• With a running example

What is Design?

• The process of translating the Requirements and Specifications into a well thought out plan that fully describes the system

• The “What” and “Why” of your project

• The high level blueprints of what you will build

What is Implementation

• The process of defining how the design blocks perform their functions and building the actual design blocks to function according to the design

• The “How” of your project

• The realization of the design

Design vs. Implementation

• Design is generally block diagrams & specs

• It is the abstract, planning part of the activity

• It contains those specs so critical that if not followed, the project will not be successful.

– Example: Should I use the 1 MHz (10 Hz / deg C) crystal oscillator circuit from the ARRL handbook or the 1 MHz (1 Hz / deg C) crystal oscillator circuit from Horowitz and Hill?

• Implementation

• It is the part of a project when a design is reduced to practice.

• Implementation contains options that are equally viable in that they won’t affect the overall performance or success of the project.

– Example: Should I buy a 1 kohm, 1 watt resistor from Digikey or Allied?

– Example: Should I use the 1 MHz (1 Hz / deg C drift) crystal oscillator circuit from the ARRL handbook or from Horowitz and Hill?

• Schematics and mechanical drawings can be either design or implementation depending on the importance of the decisions represented on them.

An Example

• I want to control the headlights of my car with a computer; I have a 1990 Nissan Maxima

• Start by building a proof of concept (POC)• Requirements

– Turn low beam on and off– Turn high beam on and off– All control is through a standard PC

• Specifications– 12Vdc, 100W Halogen Dual Beam Headlamp– GUI with three buttons:

• OFF, LOW, and HIGH

Concept of the Example

Control

Design Example

Software(PC)

User InputInterface

LogicHeadlamp

Ways to Describe the Design

• System Architecture (Design Blocks)– Describes functional blocks and how they interact

• Data throughput analysis– Describes the data path and calculate the rate of data throughput at each

step to find the overall throughput

• Execution Flow diagram– Illustrate the steps and decision points that the execution unit will follow– Your algorithm

• Use cases– Describes different scenarios of how the user can interact with the project– For each different scenario, explain user’s input and the response of the

system

Ways to Describe the Design(Continued)

• Timing Diagrams– For hardware modules it describes the details of the timing of the

inputs and outputs of the module

• HCI (Human Computer Interaction) Mockups– Describes the main points of the user interface, this includes

GUIs and physical interfaces such as switches and displays

• 3-D Mechanical Drawings– Describes the mechanical aspects of the design, the dimensions

of the chasses and any other relevant information

• Interface Control Document– Describes the verbose details of any interfaces to the device, i.e.

the details of a data port, command set, etc.

System Architecture Example

GUICommandInterface

MessageTransmitter

EmbeddedLogic Controller

Interface Circuit

Function call

Command Data

RS-232 Byte

Enable[1:0] Low Voltage Enable[1:0]

High Voltage Headlamp

Data throughput analysis

PCEmbedded

Logic Controller9600 bps

Execution Flow ExampleButton Press

WhichButton?

Send“High Off”Command

Send“Low Off”Command

Send“High On”Command

Send“Low On”Command

Send“Low Off”Command

Send“High Off”Command

High

Off

Low

Use Cases Example

Scenario User Input System Response

# 1User clicks on a

buttonHeadlamp responds

accordingly

Context Diagrams

• Presents the reader with the context in which the project exists

• Illustrates what interactions the system has with its surroundings

• Explains system level interfaces and their functions

Context Level Diagram Example

SystemUser Input

State of headlamp

Level One Design Diagram

• The first level of decomposition of the project

• Describes the fundamental design blocks and their interactions at the top level

• The most common form of describing the system architecture

Level One Design Diagram Example

Software(PC)

User InputInterface

LogicHeadlamp

Level N Design Diagram

• The result of further decomposition of the design

• Each step of the recursive process of design

• The next level of decomposition of the design block above in the design hierarchy

• Like the level one design diagram, describes the design blocks and their interactions

• Still the most common form of describing the system architecture

• Stops at the point where the function of a design block is so basic that any further decomposition would lead to schematics, pseudo code, mechanical model, etc.

Level 1 Design Diagram Example

Software(PC)

User InputInterface

Logic

GUICommandInterface

MessageTransmitter

Function call

Command Data

Headlamp

Level 1 Design Diagram Example

Software(PC)

User InputInterface

Logic

EmbeddedLogic Controller

Interface CircuitEnable[1:0] Low Voltage

Headlamp

Implementation Example

• Software written in Visual Basic 6.0• GUI• commandTx( int buttonCode);

• Hardware• CB-7520 (RS-232 to RS-485 Converter)• CB-7050 (15-bit Digital I/O Module, 7-bit

Input, 8-bit Output)• Reed Relay• Automotive Relay• 120Vac to 12Vdc power Transformer

Implementation Example

GUI CommandTx

PCCB-7520 CB-7050

RS-232 RS-485

2X Reed Relay 2X Auto Relay Headlamp

2 x Open Collector Outputs with 10 mA current

2 x Circuit with 350 mA current

2 x Circuit with 10A current

Power Transformer120VAC @ 60Hz

12VDC @ 10 A

GND

Distinguishing Design from Implementation

• Caution needed

• Example#1: Should I buy a low or high performance op-amp

» In many projects, this decision wouldn’t make any difference (other than cost). In this case it would be implementation.

» In other projects, the subsystem will not meet specs with a low-performance op-amp. In this case this decision would be part of the design process.

» Such decisions are often indicated on a schematic instead of in a block diagram, but if the choice is critical to success it is clearly part of the design process.

• Example #2: Should I power an op-amp from +5 v, plus and minus 5v, or plus and minus 15 volts?

• Example #3: Should I position my components and route the traces on my PCB in a particular way, or is this little more than an “art” left to a technician?

Logic vs. Physical

• Logically separate design blocks– Have interfaces and functions

• Physical parts– Can serve as implementations of logical

blocks

• What is the mapping of the logical to the physical?

• This is where design and implementation can meet

An Example

• You want to build a real-time point-to-point telephone that uses encryption to secure the channel

• There are only two phones in the system

• One person calls the other, and the channel is encrypted

Concept

Your PhonePoint A

Your PhonePoint B

Encrypted Link

Basic Needs

• Data Throughput (rate)– Raw sampling rate: 8 KHz @ 8-bits– Compression: ADPCM 2-bits per

sample– Effective end to end rate: 64Kbps or

8KBps– Link rate: 16 Kbps or 2KBps

Architecture (Part 1)

Block Encrypter

ADCAnti-aliasing

FilterSwingBufferVoice

Call Request

Link Data

Controller

Place Call

Answer Call

Call RequestBlock

Compressor

Transmitter

Architecture (Part 2)

Block Decrypter

DACLow Pass

Filter

SwingBuffer

Call Request

Link Data

Controller

Place Call

Answer Call

Call Request

BlockDecompressor

Receiver

Speech

Data Throughput

Block Encrypter

ADC

Anti-aliasingFilter

BlockCompressor

Block Decrypter

DAC

Low-passFilter

BlockDecompressor

SpeechVoice

Digital Cipher Text

Audio 4 KHz Bandwidth

Audio 4 KHz Bandwidth

Audio 8 KHz cut off

8-bit words @ 8 KHz

2-bit words @ 8 KHz

Analog Speech 2 KHz Center

8-bit words @ 8 KHz

2-bit words @ 8 KHz

Implementation Options

• Microcontroller with CODEC• FPGA with CODEC

Physical Implementation 1(One Side)

Physical Implementation 2(One Side)

CODEC(ADC)(DAC)

BlockCompression

BlockEncrypter

Transmitter(serializer)

Receiver(deserilizer)

BlockDecrypter

BlockReconstriction

FPGA

RS-232Line Driver

/Receiver

ReceiverSM

TransmitterSM

LED

Push-Buttons

LED

Push-Buttons