EEE226

Lecture 1 - Introduction

Design: The end product of the software design process is a ‘plan’ or ‘drawing’

Real time system: Must deliver result within a specified time. (used for safety critical) (Real time bugs can be expensive and hard to fix)

Embebded system: a system operating as a part of a larger system

Real time system:

Lecture 2 - Embeded systems programming

Embeded system - A system designed to do one task (not a general purpose machine)
Accululator (A-register) - for adding quickly
B register - For dividing quickly
R Registers - General purpose
Data pointer - Only 2 byte user accessible register, used by commands to point to data
Program counter - 2 byte register to count what line of code you’re on
Stack pointer - used to keep an address to point to the next stack item (the top one because it’s a stack)
Machine cycle:

machine cycles can take any amount of clock cycles to complete
Bitwise operators - and (&) or (|) not(~) xor(^) shift operators (<<,>>,<<<,>>>,<<=,>>=,<<<=,>>>=)

Lecture 3

Interrupts - important signal sent to the cpu to pause current operation and swap the current processing. can be internal or external.
IE index - this is the priority of interrupts with power off being most important

Lecture 4 - Verification and validation

V Model - Same stages as waterfall but shows how the design links to each testing stage. Same issues as waterfall with the lack of mobility.
Waterfall stages -

Unit testing :

Static verification - Checking code meets convention and shows bad practice code. (this is called a lint (splint is popular for C))
Unit test - programmed to run specific tests (such as CUnit)
Coverage testing - Used to see if all code is run (Such as Gcov)
Memory Behaviour analysis - used to detect memory leaks (Such as Valgrind)

CUnit:
GCov:

Integration testing:

Should follow after through Unit testing
Well defined functions make integration testing easier

Big Bang:

Bottom Up:

Top-Down:

Sandwich:

System and Integration Testing:

Acceptance tests:

Bugs:

Lecture 5 - Design Methodologies

Models give a representation of software development.
Default steps:

Waterfall Model

Start at the top and finish at the bottom, each stage must be met before going to the next.
You can only go down the model never back.
This is the most basic methodology and is linear.
Each phase is verified and validated
The model is easy to follow and definitive, generally top-down
Model cannot adapt to changes

Evolutionary Development

Processes can iterate aka multiple design stages to fix errors after testing
Single description sets off a loop of specification, development and validation which then outputs an initial version the intermediate versions and then a final version.
This is looped untill the final version meets the initial outline description.
Each version is thrown away after getting feedback (throw away prototyping)

Advantages:
Disadvantages:

Incremental Model

The requirements are interperated as a system and then this system is split into many increments. Each increment is treated as a waterfall and then each increment added.

Advantages:
Disadvantages:

Spiral Model

The spiral model has 4 quadrants:

  1. Determine objectives
  2. Identify and resolve risk
  3. Development and test
  4. Plan iteration
    Each revolution of the spiral model costs more and takes more time. But every revolution should mark a customer report on progress meaning more progress in the beginning of the project and less further on.

Agile Development

95% of buisness now use agile development to plan and build products.
On average about 80% of buisnes.
Use agile for small teams with weak existing requirements.
Agile defines 12 principles 5 of which are:

Scrum

Most common method of agile development is scrum.

  1. Group of user stories (requirements) is called the product backlog (A wish list)
  2. Roles: Scrum master, Developer, Tester,
  3. Product backlog is reduced into a specification (release backlog)
  4. This release backlog is then time estimated and prioritised for each object
  5. These are then split into sprints where a release is produced at the end of the sprint
  6. Sprints are measured with burndown charts showing what needs to be done and whether it’s on time
  7. Daily meetings show off what’s been done and keeps everybody up-to date
Weaknesses:
XP(Extreme Programming)
Weaknesses:
Used when:

Lecture 6 - Structured Programming Diagrams

Structured programs should be:

  1. Modular
  2. Modifiable
  3. Robust
  4. Readable
Conditioning:

Jackson Structure charts

Jackson Structure Charts Extended Notation

Jackson Structure Charts CASE (Computer-Aided Software Engineering)

Program writing

With the JSC built writing the code is easy simply write the system from top down dealing with each level before branching off. This generates code that can be tested throughout and keeps the program design simple.
This code is then validated and verified.

Lecture 9 - Object Orientated Programming

Object orientated programming is programming which is orientated around objects taking advantage of encapsulation, polymorphism and inheritance to increase re-use of code.
Generally a OOP langauage can be used for both OOP and POP (Procedure orintated programming)
A class has properties, properties are a collection of attributes (such as color) and can also have methods.
A class is a shell for an object to be made.
Classes are then instantiated into objects, these objects have all of the properties and methods of the class but are defined (such as color=brown)
Encapsulation - The use of modifiers to make properties only accessible from certain sections of the program. (This is good to protect objects properties)
Constructor - This is the command called to create an instance of the class
Destructor - This is the command called to delete an instance of a class
Inheritance - The idea a class can take the properties of another class
Polymorphism (Function overriding) - Functions with the same name can be over-ridden depending on the parameters input (A class that inherits from another can use a function with the same name to over-ride aka if a doubledecker is a deviation from bus the bus can have a function size which is length by width and a function for doubldecker for size can be length by width by height)
Function Overloading - A class that has multiple functions with the same name with different input types (sting/int/char), depending on the data type input a different function is run.