T3 Embedded Systems and Instruction Sets
T3 Embedded Systems and Instruction Sets
T3 Embedded Systems and Instruction Sets
Exam questions
Two computers are being sold in a shop for the same price. The
specification of the CPU in each computer is listed below:
Computer 1 Computer 2
Clock Speed: 2.3 GHz Clock Speed: 3.4 GHz
Cache Memory: 2 MB
Cache Memory: 2 MB L2
L2
Number of Cores: 4 Number of Cores: 2
(a)A customer will mainly be buying the computer for video editing.
Exam questions
Describe how the use of cache in a computer system can affect the
performance of the CPU.
Cache is faster to transfer data from than RAM (1).
If it finds it / has a hit, (1) then it will have saved time waiting for the data from
RAM (1).
If it doesn’t find it in cache / there is a miss (1) then it will need to request it
from
slower RAM.
Most data that the CPU needs will be stored in cache (if there is a suitable
amount
of it) (1),
so there is a significant increase in the speed that the CPU can obtain data
from memory (1).
Cache has different levels (1). The faster levels are tried first (1).
Increasing the amount of cache will increase the number of hits (1) which will
increase the performance of the CPU (1).
Embedded systems and instruction sets
Computer architecture and storage
Exam questions
A computer system has 16 GB of RAM and 8 MB of cache which is faster
than RAM.
Cache is far more expensive to produce than RAM (1) so the cost of the
computer/CPU/cache would significantly increase (1) but there would not be a
significant increase in speed (as most data needed is stored in the lower
amount of cache) (1).
Embedded systems and instruction sets
Computer architecture and storage
Exam questions
A dual-core computer system has two cores.
Registers (1) that are used to store small amounts of data (1).
Control unit (1) which controls the timing of all operations (1).
(L1) cache (1) that is dedicated memory to be used by the individual core (1).
Accept answers of the individual registers and their use, e.g., MAR / Memory
Address Register, MDR / Memory Data Register, CIR / Current Instruction
Register / Accumulator, PC / program counter.
Embedded systems and instruction sets
Computer architecture and storage
Exam questions
The CPU features a number of different buses that make up the system bus.
Exam questions
(b) State the role of each bus in a CPU.
Component Purpose
Responsible for transferring the address of the
Address bus
memory or device to be read from or written to.
Carries control signals to coordinate the
Control bus activities of the CPU.
Transports data between the CPU and RAM, and
Data bus between CPU and IO and storage devices.
Embedded systems and instruction sets
Computer architecture and storage
Starter
• CPUs fetch, decode and execute instructions
• In a high level language, you may program an instruction
such as
total 0
FOR i 1 TO 10 DO
total total + i
ENDFOR
Starter
• CPUs use very simple instructions known as
machine code or assembly language
• A high level instruction such as total 0 may use an
instruction such as LOAD ACC, #0
• Harder instructions are broken down into
simpler assembly code instructions
• For example,
FOR i 1 TO 10 DO
may need several
instructions to move
data between RAM
and the Accumulator
Embedded systems and instruction sets
Computer architecture and storage
Instruction sets
• Instruction sets are all the possible instructions that
are able to be decoded and executed by a CPU
• A particular CPU will have its own instruction set
• Programs written for one type of CPU won’t work on another
• For example, a program written for an Intel Core i7 won’t work
on an ARM processor contained in a smartphone
Embedded systems and instruction sets
Computer architecture and storage
5 + 7
Operand Operator Operand
Embedded systems and instruction sets
Computer architecture and storage
Worksheet
• Complete Task 1 on Worksheet
Embedded systems and instruction sets
Computer architecture and storage
Microprocessor
• A microprocessor is an integrated circuit that is all
contained on a single chip
• CPUs are one type of microprocessor, they include Pentium
microprocessors and ARM microprocessors
• Microcontrollers contain not only the
microprocessor, but also RAM and
ROM or flash memory for volatile and
non-volatile storage – this allows
for an entire computer to
be contained on one chip
Embedded systems and instruction sets
Computer architecture and storage
Embedded systems
• Do these devices have inputs, processes and
outputs?
• Could they be classed as computers?
• Why or why not?
Embedded systems and instruction sets
Computer architecture and storage
Embedded computers
• An embedded computer is a single microprocessor
that includes RAM, ROM and a CPU
• An embedded computer is frequently used to control a device
using simple inputs
Embedded systems and instruction sets
Computer architecture and storage
Embedded systems
• Without embedded systems, a digital device
would not be able to perform specific functions
• For example, a dishwasher wouldn’t know when to heat
the water, or a satnav wouldn’t know how to communicate
with a satellite
• What embedded functions do cars use?
Embedded systems and instruction sets
Computer architecture and storage
Worksheet
• Complete Task 2 on Worksheet
Embedded systems and instruction sets
Computer architecture and storage
Plenary
• Work with a partner to explain
the following terms:
• Embedded system
• Microprocessor
• Instruction set
• Assembly code
• Machine code
• Opcode and operands
Embedded systems and instruction sets
Computer architecture and storage
Plenary
• Embedded system – a single processor that includes, RAM,
ROM and processor as one unit
• Microprocessor – a type of integrated circuit on a single chip
• Instruction set – a list of all the commands that can be
processed by a CPU
• Assembly code – code written in assembly language. The
instructions written are exact 1:1 representations of the
machine code that will be executed on the CPU
• Machine code – The binary representation of the assembly
code program. This will be executed by the CPU
• Opcode and operands – The opcode is the instruction and the
operands are the values that the instruction works on