Project Development & Software Design Lecturer: Sri Parameswaran Notes by Annie Guo. S1, 2006 COMP9032 Week12 1
Lecture Overview Basic project development steps Some software design techniques S1, 2006 COMP9032 Week12 2
Project Steps A project development process basically consists of a number steps: Project definition Design Hardware implementation and Software development Test S1, 2006 COMP9032 Week12 3
Includes: Project Definition Project requirement analysis Development of a complete operating specification and coarse or macro-level block diagram Possible Project Proposal Time spent: 10~15% of the total project time. S1, 2006 COMP9032 Week12 4
Determine Hardware design Design Hardware components required and their connection Overall system structure Hardware+software Software design Software data structures and flowchart Hardware and software interaction Basic tasks and their interaction Takes 40-50% project time S1, 2006 COMP9032 Week12 5
Software Design Consists of a number of steps: List tasks to be performed Prioritize the tasks and scheduling tasks if there are real time processing requirements often it is the case in embedded system design Design interrupts for task scheduling Create a software flowchart for each interrupt function or normal task Develop the code S1, 2006 COMP9032 Week12 6
Test Put the system developed in the project into use. It is tested in accordance with the operating specifications developed in the project definition. S1, 2006 COMP9032 Week12 7
Example Project 2: lift controller emulator Project specification It basically has been done for you Hardware resources: AVR lab board. Operating specification» But you need to provide more details in your Use s manual. S1, 2006 COMP9032 Week12 8
Example Project 2: lift controller emulator Hardware design and implementation The lab board is given, the basic hardware design and implementation has been done for you. What you need to do is to design how to use the available hardware resources As specified» Using motor to emulate the lift motion» Using LCD to display the status of the lift operation» Inputs: Encoding input keys of the keyboard and push buttons to represent all possible operations Additionally» Using LCD and LED bars to display values for debugging purpose S1, 2006 COMP9032 Week12 9
Example Project 2: lift controller emulator Software design How many tasks are there? Depending on your design and how you like your code organized.» One basic function one task» A group of related functions one task Example: two basic tasks (could be more than two)» Task1: Get the service requests» Task2: Control the lift operations: moving up, moving down, stop S1, 2006 COMP9032 Week12 10
Timer(s) keypad store requests get requests LCD task1 Data task2 push buttons delete requests Motor How data is stored? How the status of lift is represented? S1, 2006 COMP9032 Week12 11
Example Project 2: lift controller emulator Software design data structures: Important» Can simplify your algorithms» Can affect the efficiency of the your code Should be carefully designed Algorithms and flow diagrams The high level template of your code S1, 2006 COMP9032 Week12 12
Example Project 2: lift controller emulator Software design Algorithms and flow diagrams The high level template of your code Draw a control flow diagram for each task Verifying the control flow» Try to run some requests to see if the control flow design can lead to the expected operations. S1, 2006 COMP9032 Week12 13
Example Project 2: lift controller emulator Software design Set up the code template S1, 2006 COMP9032 Week12 14
Example Project 2: lift controller emulator Software design Write up the code complete each section Start from the definitions Develop and test each function individually Display function may be the first function to be completed since it may be used for testing other functions S1, 2006 COMP9032 Week12 15
Example Project 2: lift controller emulator Testing Doest it really work? Compile and run your code on the development board» Check for different operations If it is not working» Check the wiring» Debug the code» Analysis of bugs Until it is working»??? S1, 2006 COMP9032 Week12 16
Some Techniques in Software Code Development Develop and individually test each of the functions in the flowchart Use a simple main() function to exercise each of the the individual input/output device functions When the individual functions are working correctly, write the overall software in a stepwise fashion adding one additional function to the code and debugging it before adding more until the entire project is functionally correctly using the real or simulated inputs. It is often useful to develop the code to run output devices first so that you can use output devices to display results. S1, 2006 COMP9032 Week12 17
User s manual Document for users About docs The procedure to set up the emulator system. How to use the system Design manual Some typical operation examples Document for other technique persons including yourself for maintenance for system update S1, 2006 COMP9032 Week12 18