350 likes | 510 Views
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.
E N D
The George Washington UniversitySchool of Engineering & Applied ScienceDepartment of Electrical & Computer EngineeringECE Senior DesignDesign vs. ImplementationProfessor 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) Interface Logic Headlamp User Input
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 GUI Command Interface Message Transmitter Function call Command Data RS-232 Byte Embedded Logic Controller Interface Circuit Enable[1:0] Low Voltage Enable[1:0] High Voltage Headlamp
Data throughput analysis PC Embedded Logic Controller 9600 bps
Execution Flow Example Button Press Which Button? Send “High Off” Command Send “Low Off” Command Low High Off Send “Low On” Command Send “High On” Command Send “Low Off” Command Send “High Off” Command
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 System State of headlamp User Input
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) Interface Logic Headlamp User Input
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) Interface Logic User Input Headlamp GUI Command Interface Message Transmitter Function call Command Data
Level 1 Design Diagram Example Software (PC) Interface Logic User Input Headlamp Embedded Logic Controller Interface Circuit Enable[1:0] Low Voltage
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
PC GUI CommandTx Implementation Example RS-232 CB-7520 RS-485 CB-7050 2 x Open Collector Outputs with 10 mA current 2X Reed Relay 2X Auto Relay Headlamp 2 x Circuit with 350 mA current 2 x Circuit with 10A current 12VDC @ 10 A GND Power Transformer 120VAC @ 60Hz
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 Phone Point A Your Phone Point 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) Call Request Place Call Controller Answer Call Call Request Block Compressor Voice Anti-aliasing Filter ADC Swing Buffer Block Encrypter Transmitter Link Data
Architecture (Part 2) Place Call Controller Call Request Answer Call Call Request Block Decompressor Receiver Swing Buffer Block Decrypter Link Data DAC Low Pass Filter Speech
Data Throughput Audio 4 KHz Bandwidth Audio 4 KHz Bandwidth Voice Anti-aliasing Filter Low-pass Filter Speech Analog Speech 2 KHz Center Audio 8 KHz cut off ADC DAC 8-bit words @ 8 KHz 8-bit words @ 8 KHz Block Compressor Block Decompressor 2-bit words @ 8 KHz 2-bit words @ 8 KHz Block Encrypter Block Decrypter Digital Cipher Text
Implementation Options • Microcontroller with CODEC • FPGA with CODEC
Physical Implementation 2(One Side) FPGA LED Block Compression Transmitter SM Push-Buttons RS-232 Line Driver / Receiver Block Encrypter Transmitter (serializer) CODEC (ADC) (DAC) Block Decrypter Receiver (deserilizer) Block Reconstriction Receiver SM LED Push-Buttons