Download - 2013 embedded processors
Embedded ProcessorsSACE IT REVISION WORKSHOP 2013
Examples of Embedded Processors
Devices that are not immediately recognisable as computers: GPS units
Exercise Machines
Watch
Calculator
Modem / Router
Smart TV
And heaps of other devices with a microprocessor built in…
Make a list of 5 other devices that have embedded processors.
Why Embedded Processors?
We are modelling computer architecture (the way computers are designed)
The “Von Neumann architecture” was first implemented in the 1950s and remains the model for computers now Input, Output, CPU, Control Unit, ALU, Memory
Nowadays, the main difference is different levels of memory, including cache etc.) and extra speed / sophistication
Embedded Processors reduces the scope of the questions to focus on a specific task (eg. The GPS unit is calculating how far to go)
Yes, there are limitations to the model we use to explain the way computers work, but it is satisfactory at our level – if you study Computer Science at tertiary level you will go into greater depth
Data
It is all about data
Information is data that is organised and understandable to humans
Computers don’t care / know the interpretation of the data, they just use the binary digits: Read as input
Stored in memory
Processed (manipulated) in the CPU
Output
Input / Output
Input and Output generally relates to the input / output devices (rather than the data / information)
Examples: An output may be a speaker (rather than the sound that
is sent to the speaker)
An input may be a button, or a keyboard
To be safe in an exam question, mention both the device and the data: Example: “An output of the GPS unit is the speaker
which will play the sythnetic voice telling the user which direction to turn.”
CPU
There are 3 main components in the CPU: Control Unit: coordinates the processing and tell other
components what to do
ALU: Arithmetic / Logic Unit - the part that does arithmetic (mathematical) or logic (comparison) operations on data that is held in the registers
Registers: Small units of memory that holds immediate data being using in the CPU / ALU (current data).
Memory
There are 3 main types of memory we focus on: Registers: hold current data / immediate values required for
processing.
There are also other special registers such as: ‘instruction registers’ that hold the instruction being executed and the ‘program counter’ which stores where the next instruction to be executed is stored.
Primary / Main Memory: (eg. RAM) holds the loaded OS, software and instructions.
Volatile memory (loses it’s contents when the power is turned off)
Secondary Memory: (eg. ROM / EEPROM / HDD etc.) - holds the OS, software and other data (which, when required, will be loaded into primary memory).
Could be writeable (as with a traditional hard disk or SSD) or read only (ROM), but must be non-volatile so it doesn’t lose its contents when the power is turned off.
Control Unit
The control unit coordinates the processing of instructions and data, using a cycle of "fetch, decode, execute, store". Fetch: a special register called the "program counter" records where
the next instruction is located. The control unit will fetch this instruction and store it in a register. Fetch may also be reading from input, or reading data ready to be processed, therefore sometimes several fetch steps may be required to get all the data required for a given instruction to actually be executed.
Decode: once an instruction has been fetched, the control unit needs to decode it to determine a few things such as: What operation is it requiring of the ALU? Is there more data that must be loaded / fetched? Where will the result of the operation be placed?
Execute: once decoded, the ALU can actually perform the operation (execute), using either arithmetic (plus, minus etc.) or logic (or, and, comparison etc.) operation.
Store: finally, the control unit will store the result of this operation in the appropriate location (from the decode stage)
ALU
ALU stands for Arithmetic / Logic Unit
Does the arithmetic (mathematical) and logic (comparisons resulting in true / false) calculations.
An ALU has 3 inputs – 2 of which are for data, 1 of which is for operation / instruction, plus 1 output (the result). Of course, all data is represented using binary code.
The types of operations that can be done by an ALU are: Arithmetic (eg. add, multiply).
Logic (eg. greater than, OR, AND)
When calculating logic, the result is always TRUE (represented as a 1) or FALSE (represented as a 0). Generally, a computer recognises any value other than 0 as TRUE in a logical operation.
2011 Exam Question
2012 Exam Question
Bonus Question
Blade purchases an iPod Nano that contain an embedded processor.
Describe the type of memory that would have been used in the iPod Nano to enable its program to be updated at a later date.
(2 marks)
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Control Unit
Registers
ALU
Primary Memory
Secondary Storage
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Control Unit
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Control Unit
Registers
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Control Unit
Registers
ALU
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Control Unit
Registers
ALU
Primary Memory
Blade selects the next track on the iPod Nano. Describe the processes that occur for each of the components of the embedded process and the data used:
Input
Control Unit
Registers
ALU
Primary Memory
Secondary Storage
Suggest using an algorithm how the ALU calculates the time remaining for a particular song that is currently playing.
Blade would like to add the latest song to his iPod Nano, suggest 3 possible ways this could occur?
1)
2)
3)
Blade uses his iPod Nano until it is completely flat and shut down. Explain the process that the iPod Nano would go through to become functional and display the current track after it has been recharged.