Lecture Agenda

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

description

The George Washington University School 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. - PowerPoint PPT Presentation

Transcript of Lecture Agenda

Page 1: Lecture Agenda

The George Washington UniversitySchool of Engineering & Applied Science

Department of Electrical & Computer Engineering

ECE Senior Design

Design vs. Implementation

Professor Tom Manuccia

Page 2: Lecture Agenda

Lecture Agenda

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

• With a running example

Page 3: Lecture Agenda

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

Page 4: Lecture Agenda

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

Page 5: Lecture Agenda

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.

Page 6: Lecture Agenda

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

Page 7: Lecture Agenda

Concept of the Example

Control

Page 8: Lecture Agenda

Design Example

Software(PC)

User InputInterface

LogicHeadlamp

Page 9: Lecture Agenda

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

Page 10: Lecture Agenda

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.

Page 11: Lecture Agenda

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

Page 12: Lecture Agenda

Data throughput analysis

PCEmbedded

Logic Controller9600 bps

Page 13: Lecture Agenda

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

Page 14: Lecture Agenda

Use Cases Example

Scenario User Input System Response

# 1User clicks on a

buttonHeadlamp responds

accordingly

Page 15: Lecture Agenda

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

Page 16: Lecture Agenda

Context Level Diagram Example

SystemUser Input

State of headlamp

Page 17: Lecture Agenda

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

Page 18: Lecture Agenda

Level One Design Diagram Example

Software(PC)

User InputInterface

LogicHeadlamp

Page 19: Lecture Agenda

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.

Page 20: Lecture Agenda

Level 1 Design Diagram Example

Software(PC)

User InputInterface

Logic

GUICommandInterface

MessageTransmitter

Function call

Command Data

Headlamp

Page 21: Lecture Agenda

Level 1 Design Diagram Example

Software(PC)

User InputInterface

Logic

EmbeddedLogic Controller

Interface CircuitEnable[1:0] Low Voltage

Headlamp

Page 22: Lecture Agenda

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

Page 23: Lecture Agenda

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

Page 24: Lecture Agenda

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?

Page 25: Lecture Agenda

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

Page 26: Lecture Agenda

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

Page 27: Lecture Agenda

Concept

Your PhonePoint A

Your PhonePoint B

Encrypted Link

Page 28: Lecture Agenda

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

Page 29: Lecture Agenda

Architecture (Part 1)

Block Encrypter

ADCAnti-aliasing

FilterSwingBufferVoice

Call Request

Link Data

Controller

Place Call

Answer Call

Call RequestBlock

Compressor

Transmitter

Page 30: Lecture Agenda

Architecture (Part 2)

Block Decrypter

DACLow Pass

Filter

SwingBuffer

Call Request

Link Data

Controller

Place Call

Answer Call

Call Request

BlockDecompressor

Receiver

Speech

Page 31: Lecture Agenda

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

Page 32: Lecture Agenda

Implementation Options

• Microcontroller with CODEC• FPGA with CODEC

Page 33: Lecture Agenda

Physical Implementation 1(One Side)

Page 34: Lecture Agenda

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