嵌入式系统代写代做代考 Embedded Systems Reconfigurable computing

Reconfigurable computing

Small Embedded Systems

Unit 1.1 Overview of the Module Organisation and Themes

Aims of the Module
Learn practical skills and theory relating to Embedded Systems design, including real-time control and embedded networking
Consider a range of Embedded Systems application domains and processors
Learn programming techniques appropriate for embedded systems
Apply key design criteria and design tools for Embedded Systems design
Make suitable choices of communications protocols and
peripheral devices for Embedded Systems

Teaching and Learning
Main teaching period is weeks 7, 8, 9
Lectures are online videos, ~5-6 hours per week
There will be lab activities for each week
Week 7 labs are online activity using free simulator
Week 8 and 9 labs have on-campus version and online version
One problem sheet per week
I will go through solutions in the following week

Assessment
Group assignment (15%) – submit in week 11
Individual assignment (35%) – submit in January
Final exam-style assessment (50%) – January

Labs are not directly assessed, but are important as preparation for assignment and exam

Coursework Assignment
Design a smart object that can be used in a smart home: an embedded system that can sense and respond to its surroundings, and can communicate over the Internet for remote monitoring and/or control.
The choice of sensors you use, the communications protocol, the system architecture is up to you.
You will work in teams and prepare a video for your proposed system. This will help generate design concepts and review alternative designs.
You will submit an individual report , showing your interpretation, analysis and design for this project.
You are not expected to actually build a prototype, but your analysis and design should be sufficiently detailed that the design can be fully evaluated.
Details will be given later in the module

Suggested Reading
Blum, J. (2020), Exploring Arduino, Wiley
Electronic copy available from library
Wolf, M (2017), Computers as Components: Principles of Embedded Computing System Design, Morgan Kaufmann
Electronic copy and hardcopy available from library
Hamacher, V.C. (2012) Computer organization and embedded systems, McGraw-Hill
Hardcopy available from library

What is an Embedded System
Computer embedded within larger system
Runs one program from switch-on to switch-off to give system its function
Typical purposes:
sense state of system,
to control system,
allow user interaction,
relay information on to larger computer system

Embedded System Example
Modern car has many sensors, controlling many functions

Embedded system

www.cars.com
Music
Airbag
Engine temperature
Door open
Anti-lock braking
Traction control

Embedded System Example
Modern car has many sensors, controlling many functions

Embedded system
Tyre pressure
Crash sensor
Bluetooth
Door open
Wheel speed
Engine temp
Sensors
Outputs
Warning light
Inflate Airbag
Play music
Warning light
Pump brakes
Warning light
Actuation
Processing
Inputs

Embedded System Example
Processor can do one task at a time
Various task must take turns
Tasks run repeatedly
Tyre pressure
Crash sensor
Bluetooth
Door open
Wheel speed
Engine temp

Embedded system
Warning light
Inflate Airbag
Play music
Warning light
Pump brakes
Warning light
Warning light
Tyre pressure
Crash sensor
Inflate Airbag
Play music
Bluetooth

It Would be Nice and Easy if …
Processor can decide when it wants to run tasks
All tasks are equally important
All task take same amount of time
Processor can complete one task before it moves to next
Tyre pressure
Crash sensor
Bluetooth
Door open
Wheel speed
Engine temp

Embedded system
Warning light
Inflate Airbag
Play music
Warning light
Pump brakes
Warning light

It Would be Nice and Easy if …
We could write one piece of code that would run efficiently on any embedded system
We didn’t need to know much about the internal structure of the processor

Part 1 of the Module: Basic Ideas
We will learn a simple programming environment that is (mostly) independent of the processor and its details
We will look at simple programs where tasks are done in turn and programmer decides the timing
We will look at how C represents data, and see some techniques that will be useful later
We will look at how C is complied into assembler and machine code
We will look at a simple processor structure and see its basic principles of operation
We will look at why inputs and outputs are sometimes not as simple as they seem (rapid switching, high output power levels, etc.)

But Life isn’t Always Easy
Embedded systems vary greatly in their requirements:
Some embedded systems must be very low cost
Others are safety critical, and high cost is OK
Some must last a long time on one battery charge
Others must have maximum processing speed
Different systems need different devices and controllers on their processor chips
There is a huge range of different microcontrollers
Their detail differs, so the way we program them differs if we want to use them efficiently

Communications Protocols
Communication can be done on different protocols
Some are very cheap, but low performance
Others are expensive, but high performance or have special built-in safety features
Tyre pressure
Crash sensor
Bluetooth
Door open
Wheel speed
Engine temp

Embedded system
Warning light
Inflate Airbag
Play music
Warning light
Pump brakes
Warning light

Communications Protocols
Communication can be done on different protocols
Some are very cheap, but low performance
Others are expensive, but high performance or have special built-in safety features
Embedded systems often use several different communication subsystems:
Slow devices grouped on same subsystem
Fast device grouped on a different subsystem
Safety critical devices on a different subsystem
We need to understand the characteristics and principles of operation of different communication methods

Timing of Tasks
Some tasks need very infrequent attention
Other tasks must be done frequently
Processor must deal with tasks whose timing requirements are independent, and may be very different
Tyre pressure
Crash sensor
Bluetooth
Door open
Wheel speed
Engine temp

Embedded system
Warning light
Inflate Airbag
Play music
Warning light
Pump brakes
Warning light

Part 2 of the Module: Intermediate
We will look at:
how to schedule tasks to activate according to a timer
how to schedule tasks to activate when an external event occurs
simple low-cost communication protocols
how we can write code that uses the specific characteristics and capabilities of the microcontroller
how to make a processor sleep to maximise battery lifetime

Sometimes Time Life is Complicated
Suppose we are in the middle of changing the music …
… and the car crashes
The airbag controller must respond within 30 milliseconds
Tyre pressure
Crash sensor
Bluetooth
Door open
Wheel speed
Engine temp

Embedded system
Warning light
Inflate Airbag
Play music
Warning light
Pump brakes
Warning light

Real Time Systems
Suppose we are in the middle of changing the music …
… and the car crashes
The airbag controller must respond within 30 milliseconds
Issues:
The crash sensor is driven by an external event, not when the processor decides to give it attention
The airbag is more important than the music; the processor must find out that it needs to stop working on the music control and respond to the crash sensor
The programmers of the processor must be able to guarantee that this will happen within 30 ms, otherwise the system cannot get certification

Consistency of Shared Data
If one task can take over the processor before another task has completed, we have a problem if both can write to the same data items
Issues:
Suppose task 1 is updating a data item, but has not completed the update
Task 2 takes over the processor before task 1 completes
If task 1’s data is changed by task 2, then when task 1 resumes it will use the wrong value
Sharing data between tasks can be problematic

Reliable Systems & Safety Critical Systems
System designers may be required to quantify the probability of failure of their designed system
Components in any engineering system will eventually fail
Many components have been characterised according to a statistical distribution of how often they will fail
If we build a system from such components, we need to know how to do calculations on the overall system using the data from the constituent components
We need to know the regulatory requirements on failure rate that we must comply with
We need to know how to enhance reliability, e.g. by using multiple copies of critical components

Distributed Systems
Most complex systems will not use one single microcontroller. They will use:
A larger number of different microcontrollers (probably cheap and not too powerful), each looking after a few sensors or actuators and
A small number of powerful devices that are responsible for overall coordination
System design must allow for many different devices that may wish to take initiative at any time
Some may have higher priority
Some may be safety critical

Part 3 of the Module: Advanced
We will look at
Advanced communications for distributed systems:
Internet of Things devices
Industrial and automotive standards
Systems that must respond by a deadline
Real time operating systems
How to ensure safe sharing of data between tasks
How to calculate the reliability of a system
Ways to enhance reliability and safety of a system

dashboard door open warning

/docProps/thumbnail.jpeg