Chpm3 Flashcards
The central processing unit (CPU)
(also known as a microprocessor or processor) is central to all modern computer systems (including tablets and smartphones). The CPU is very often installed as an integrated circuit on a single microchip. The CPU has the responsibility for the execution or processing of all the instructions and data in a computer application.
CPU consist of
Control unit
Arithmetic and logic unit ALU
Register and buses
The von Neumann architecture had the following main nove
ompute
features (none of which were avaitable in computers prior to the mid-1940s)
the concept of a central processing unit (CPU or processor)
* the CPU was able to access the memory directly
» computer memories could store programs as well as data
stored programs were made up of instructions which could be executed in sequential order
Arithmetic & Logic Unit (ALU)
allows the required arithmetic (e.g. +, - and shifting) or logic (e.g. AND, OR) operations to be carried out while a program is being run; it is possible for a computer to have more than one ALU to carry out specific functions. Multiplication and division are carried out by a sequence of addition, subtraction and left or right logical shift operations.
Control u it
reads an instruction from memory. The address of the location where the instruction can be found is stored in the Program Counter (PC). This instruction is then interpreted using the Fetch-Decode-Execute cycle (see later in this section). During that process, signals are generated along the control bus to tell the other components in the computer what to do. The control unit ensures synchronisation of data flow and program instructions throughout the computer. A
system clock
is used to produce timing signals on the control bus to ensure this vital synchronisation takes place - without the clock the computer would simply crash!
The ram holds
The RAM holds all the data and programs needed to be accessed by the CPU. The RAM is often referred to as the Immediate Access Store (IAS). The CPU takes data and programs held in backing store (e.g. a hard disk drive) and puts them into RAM temporarily. This is done because read/write operations carried out using the RAM are considerably faster than read/write operations to backing store; consequently, any key data needed by an application will be stored temporarily in RAM to considerably speed up operations.
Registered
Registers can be general or special purpose. We will only consider the special purpose registers.
CIR current instruction register
this register stores the current instruction being decoded and executed
ACC accumslotst
this register is used when carrying out ALU calculations; it stores data temporarily during the calculations
MAR memory address register
this register stores the address of the memory location currently being read from or written to
MDR memory data register
this register stores data which has just been read from memory or data which is about to be written to memory
PC program counter
this register stores the address where the next instruction to be read can be found
What are the three buses
Control bus
Address bus
Data bus
Partition
The computer memory is made up of a number of partitions, each partition consists of an address and it’s contenteds
The address in partitions
The address will uniquely identify every location in the memory and the contents will be the binary value stored in each location
Let us now considerate examples of how the MAR and MDR registers can be use when carrying out a read and write operation to and from memory:
the address of location 1111 0001 to be read from is first written into the
MAR (memory address register):
read signal’ is sent to the computer memory
» the contents of memory location 1111 0001 are then put into the MDR (memory data register):
Now let us now consider the WRITE operation. Again, we will use the memory section shown in Table 3.2. Suppose this time we want to show how the value 1001 0101 was written into memory location 1111 1101:
» the data to be stored is first written into the MDR (memory data register):
this data has to be written into location with address: 1111 1101: so this
address is now written into the MAR:
finally, a write signal’ is sent to the computer memory and the value 10010101 will then be written into the correct memory location.
Input and output devices
They are the main method of entering data into and getting data out of computer systems.
Input devices
Input devices convert external data into a form the computer can understand and can then process (e.g. keyboards, touch screens and microphones).
Output devices
Output devices show the results of computer processing in a human understandable form (e.g. printers, monitors and loudspeakers).
System busses
(yetem) buses are used in computers as parallel transmission components; each the von the bus transmits one bit of era ta. heal ate three common buses used in the von Neumann architecture known as: address bus, data bus and control bus.
System busses
(yetem) buses are used in computers as parallel transmission components; each the von the bus transmits one bit of era ta. heal ate three common buses used in the von Neumann architecture known as: address bus, data bus and control bus.
Address bus
As the name suggests, the address bus carries addresses throughout the computer system. Between the CPU and memory, the address bus is unidirectional (i.e, bits can travel in one direction othe a this prevents addresses being carried back to the CPU, which would ee tin undesirable feature.
The wider the bus
The more memory locations that can be directly addressed at any given time
Data bus
The data bus is bidirectional (allowing data to be sent in both directions along the bus). This means data can be carried from CPU to memory (and vice versa) and to and from input/output devices. It is important to point out that data can weath address, an instruction or a numerical value As wipine address bus, the with of the data bus is important; the wider the bus the larger the word length a singan be transported. (A word is a group of bits which can be regarded as a single unit e.g. 16-bit, 32-bit or 64-bit word lengths are the most common.)
Larger word lengths can improve the computer’s overall performance.
Control bus
The control bus is also bidirectional. It carries signals from the control unit (CU) to all the other computer components. It is usually 8-bits wide. There is no real need for it to be any wider since it only carries control signals.
Fevtch decode execute cycle
To carry out a set of instructions, the CPU first of all fetches some data and instructions from memory and stores them in suitable registers. Both the address bus and data bus are used in this process. Once this is done, each instruction Fetesto be decoded before finally being executed. This is all known as the Fetch-Decode-Execute cycle.
Fetch
Both data and instruction can be stored in MDR. In the Fetch-Decode-Execute cycle, the next instruction is fetched from the memory address currently stored in the MAR and the instruction is stored in the MDR. The contents of the MDR are then copied to the Current Instruction Register (CIR). The pt is then incremented (increased by 1) so that the next instruction can be then be processed.
Decode
The instruction is then decoded so that it can be interpreted in the next part o the cycle.
Execute
The CPU passes the decoded instruction as a set of control signals to the appropriate components within the computer system. This allows each instru to be carried out in its logical sequence.
Fetch decode execute cycle with the von Neumann model
Any instructions ?
The Program Counter (PC) contains the address of the memony location of the next instruction which has to be fetched
This address is then copied from the PC to the memory address register
(MAR); this is done using the address bus
The contan chico a the memory location (address) contained in
MAR are then copied temporanly into the memory data register (MDR)
The contents finstruction) of the MOR are then copied and placed into the
Current instruction Register (CIR)
The value in the PC is then incremented by 1 so that it now points to the
next instruction which has to be fetched
The instruction is finally decoded and then executed by sending out signals (via the control bus) to the various components of the computer system
Role of the system clock
The clock defines the clock cycle that synchronises all computer operations. As mentioned earlier, the control bus transmits timing signals ensuring everything is fully synchronised.
By increasing clock speed
increasing clock speed, the processing speed of the computer is also increased (a typical current value is 3.5 GHz
Although the speed of the computer may have been increased
Although the speed of the computer may have been increased, it isn’t possible to say that a computer’s overall performance is necessarily increased by using higher clock speed.
Factors to considered
Overclocking is a factor to consider. The clock speed can be changed by accessing the BIOS (Basic Input/Output Systempe and altering the settings.
However, using a clock speed higher than the computer was designed for can lead to problems,
Problems that can be caused by using a higher clock speed than the computer is designed to handle,
execution of instructions outside design limits can lead to seriously
unsynchronised operations (i.e. an instruction is unable to complete in
time before the next one is due to be executeds - the computer would frequently crash and become unstable
overclocking can lead to serious overheating of the CPU again leading to unreliable performance.
The use of cache memories can also improve
3 The use of cache memories can also improve CPU performance.
Ram and cache memory
Unlike RAM, cache memory is located within the CPU itself, which means it has much faster data access times than RAM. Cache memory stores frequently used instructions and data that need to be accessed faster, which improves CPU performance.
CPU wishes to read memory
When a CPU wishes to read memory, it will first check out the cache and then move on to main memory/RAM if the required data isn’t there.
The larger the cache memory size the better the CPU performance.
The use of a different number of cores
4 The use of a different number of cores can improve computer performance.
One core is made up of an ALU, a control unit and the registers. Many computers are dual core (the CPU is made up of two cores) or quad core (the CPU is made up of four cores). The idea of using more cores alleviates the need to continually increase clock speeds.
Doubling the number of cores
However, doubling the number of cores doesn’t necessarily double the computer’s performance since we have to take into account the need for the CPU to communicate with each core; this will reduce overall performance.
Dual core
with a dual core the CPU communicates with both cores using one channel reducing some of the potential increase in its performance:
Quad core
with a quad core the CPU communicates with all four cores using six channels, considerably reducing potential performance:
these factors need to be taken into account when considering computer performance.
increasing bus width (data and address buses) increases the performance and speed of a computer system
» increasing clock speed will potentially increase the speed of a computer
computer’s performance can be changed by altering bus widtt
cock speen
“ use co merries can also speed up a CPUs performance.
In a computer system, instructions are a set of operations which are decoded in sequence.
Each operation will instruct the ALU and CU (which are part of the CPU). An operation is made up of an opcode and an operand.
In a computer system, instructions are a set of operations which are decoded in sequence.
Each operation will instruct the ALU and CU (which are part of the CPU). An operation is made up of an opcode and an operand.
opcodes that can be used.
opcodes that can be used; this is known as the instruction set.
All software running on a computer will contain a set of
Instructions
The Fetch-Decode-Execute cycle is the
sequence of steps used by the CPU to process each instruction in sequence.
Instructions
instruction sets are the low-level language instructions that instruct the CPU how to carry out an operation. Program code needs interpreters or compilers to convert the code into the instruction set understood by the computer. Some examples of instruction set operations include: ADD, JMP, LDA, and so on.)
Embedded system
An embedded system is a combination of hardware and software which is designed to carry out a specific set of functions. The hardware is electronic. electrical or electro-mechanical.
Embedded system can be based on
this has a CPU in addition to some RAM and ROM and other peripherals all embedded onto one single chip (together they carry out a specific task)
microprocessor:
integrated circuit which only has a CPU on the chip (there is no RAM, ROM or peripherals - these need to be added)
system on chips (SoC):
this may contain a microcontroller as one of its components they almost always will include CPU. memory. input/output (1/0) ports and secondary storage on a single microchipl
Embedded system
When installed in a device, either an operator can input data manually (for example, select a temperature from a keypad or turn a dial on an oven control panel) or the data will come from an automatic source, such as a sensor. This sensor input will be analogue or digital in nature, for example, inputs such as oxygen levels or fuel pressure in a car’s engine management system. The output will then carry out the function of the embedded system by sending signals to the components that are being controlled (for example, increase the power to the heating elements in an oven or reduce fuel levels in the engine).
Depending on the device, embedded systems are either
programmable or non-programmable. Non-programmable devices need, in general, to be replaced if they require a software upgrade.
Programmable devices permit upgrading by two methods:
» connecting the device to a computer and allowing the download of updates t the software (for example, this is used to update the maps on a GPS system used in a vehicle
” automatc updtes ti w:.tlteor.cotorginanagenetroy/
for exame e, mates mode cars allow updates to engine management systo, and other components via satellite link).
Benefits of devices being controlled using embedded systems
They are small in size and therefore easy to fit into devices
Compared to other systems, they are relatively low cost to make
They are usually dedicated to one task allowing simple interfaces and often no requirements for an operating system
They consume little power
They can be controlled remotely using a mobile phone
Very fast reaction to changing input
With mass production comes reliability
Drawbacks of embedded systems
It can be difficult to upgrade some devices to take advantages of new technology
Troubleshooting faults in the device becomes a specialist task
Although the interface can appear to be more simple more confusing
Any device that can be accessed I’ve the internet is also open to hackers and viruses
Due to difficult in upgrading and fault finding devices are often just thrown away rather than being repaired
Can lead to an increase in the throw away society if devices are discarded just because they have become out of date
Because embedded systems can be commected to the inten
et 1 is seting t
control them remotely using a smartphone of computer. For example, setting the
central heating system to swit Shar or orf whte away from home or remote
instructing a set top ox to witch a televisibile agramme. Since embedded systems are dedicated to a specific set of tasks, engineers can optimise their designs to reduce the physical size and cost of the devices. The range of applications are vast, ranging from a single microcontroller (for example, in an MP3 player) to a complex array of multiple units (for example, in a medical imaging system).
It is worth mentioning here that a computer is not an example of an embedded system.
It is worth mentioning here that a computer is not an example of an embedded system. Computers are multi-functional (that is, they can carry out many different tasks which can be varied by using different software) which means they can’t be classed as embedded systems.
Examples of the use of embedded systems
Motor vehicles
Modern cars have many parts that rely on embedded systems to function correctly. Figure 3.7 shows some of the many components that are controlled in this way.