Docsity

Introduction to ARM Embedded Systems, Essays (university) of Embedded Systems

Toggle sidebar
bg1
MICROCONTROLLERS AND EMBEDDED SYSTEMS
18CS44
SEMESTER - IV
MODULE 1
An Integrated circuit is a special component which is
fabricated with thousands of transistors, resistors, diodes and
other electronic components on a tiny silicon chip. These are
the building blocks of current electronic devices like cell
phones, computers, etc.
Resistors are two-terminal components that oppose current.
They produce a voltage drop between each terminal, following
Ohm law which states "the electrical resistance is equal to the
voltage drop across the resistor divided by the current through
the resistor while the temperature remains the same (R=V/I)".
Voltage is the difference in charge between two points.
Current is the rate at which charge is flowing.
Resistance is a material's tendency to resist the flow of
charge (current).
Capacitors store energy in the electric field between a pair of
conductors called plates. The storing of energy occurs by
"charging" the capacitor. Storing occurs when electric charges
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Introduction to ARM Embedded Systems and more Essays (university) Embedded Systems in PDF only on Docsity!

MICROCONTROLLERS AND EMBEDDED SYSTEMS

18CS

SEMESTER - IV

MODULE 1

An Integrated circuit is a special component which is fabricated with thousands of transistors, resistors, diodes and other electronic components on a tiny silicon chip. These are the building blocks of current electronic devices like cell phones, computers, etc. Resistors are two-terminal components that oppose current. They produce a voltage drop between each terminal, following Ohm law which states "the electrical resistance is equal to the voltage drop across the resistor divided by the current through the resistor while the temperature remains the same (R=V/I)".  Voltage is the difference in charge between two points.  Current is the rate at which charge is flowing.  Resistance is a material's tendency to resist the flow of charge (current). Capacitors store energy in the electric field between a pair of conductors called plates. The storing of energy occurs by "charging" the capacitor. Storing occurs when electric charges

of equal magnitude, but opposite polarity, build up on each plate. Transistors are a semiconductor device used to amplify or switch electronic signals. Registers: In computer architecture, a processor register is a quickly accessible location available to a computer's central processing unit. Fig: Different Electrical components Clock Speed: A good way to understand how a processor works is to imagine that your job is to tell a thousand people how to do their jobs. The faster you can do that, the faster everyone works. Computer processors, or chips, operate in a similar fashion. A processor provides the instructions that multiple applications and processes need to perform their jobs.

Fig: architecture of 8051 micro controller. And you can see all the required components for a small project is present in a single chip. Microprocessor Microprocessor has only a CPU inside them in one or few Integrated Circuits. Like microcontrollers it does not have

RAM, ROM and other peripherals. They are dependent on external circuits of peripherals to work. But microprocessors are not made for specific task but they are required where tasks are complex and tricky like development of software’s, games and other applications that require high memory and where input and output are not defined. It may be called heart of a computer system. Some examples of microprocessor are Pentium, I3, and I5 etc From this image of architecture of microprocessor, it can be easily seen that it has registers and ALU as processing unit and it does not have RAM, ROM in it.

RISC AND CISC

Imagine you are training a dog. You teach it to understand certain specific instructions like ‘sit’ or ‘fetch’ and then associate those words with certain tasks. So that later on, when you say ‘fetch’, and throw a ball, the dog will fetch it. A CPU (and I will use this term to mean both microcontrollers and processors in general) works in a similar way. There are certain instructions that the CPU knows and when we give them those instructions, different transistors inside it switch ON and OFF to perform those instructions. The instructions that we input are in the form of 1’s and 0’s, or opcode. Since it is hard for us to remember combinations of 1’s and 0’s, we tend to use shorthand’s for those instructions, called assembly language, and a compiler converts it into opcode. The number of instructions that a particular CPU can have is limited and the collection of all those instructions is called the Instruction Set. The Instruction Set is very important. High-level programming languages are designed based on how the instruction set is and a proper design of hardware and instruction set can determine how fast the CPU is.

A processor also known as the Central Processing Unit (CPU) mainly performs the instruction fetching, decoding, execution. For the processor to perform its operations, it requires standard set of instructions, these are called Instruction sets. There are two types of instruction set architectures. They are RISC and CISC. Instruction set or instruction set architecture is the structure of the computer that provides commands to the computer to guide the computer for processing data manipulation. Instruction set specifies processor functionality including the operations supported by the processor, storage mechanisms of the processor, and the way of compiling the programs to the processor. Instruction set consists of instructions, addressing modes, native data types, registers, interrupt, exception handling and memory architecture. Instruction set can be emulated in software by using an interpreter or built into hardware of the processor. Instruction Set Architecture can be considered as a boundary between the software and hardware. Classification of microcontrollers and microprocessors can be done based on the RISC and CISC instruction set architecture. In layman terms Instruction set is the basic/fundamental structure which bridges the gap between hardware and software

ARM EMBEDDED SYSTEMS

Fig: A chipset designed by ARM An ARM processor is one of a family of CPUs based on the RISC (Reduced Instruction Set Computer) architecture developed by Advanced RISC Machines (ARM). ARM makes 32-bit and 64-bit RISC multi-core processors (A multi-core processor is an integrated circuit (IC) to which two or more processors have been attached for enhanced performance, reduced power consumption, and more efficient simultaneous processing of multiple tasks). RISC processors are designed to perform a smaller number of types of computer instructions so that they can operate at a higher speed, performing more millions of instructions per second (MIPS). RISC Reduce the cycles per instruction at the cost of the increases number of instructions per program. RISC processors provide outstanding performance at a fraction of the power demand of CISC (complex instruction set computing) devices. As the name indicates in CISC, the main idea is to make hardware complex, as a single instruction will do all loading, evaluating and storing operations. The CISC approach attempts to minimize the number of instructions per program by making them complex but at the cost of increase in number

The ARM architecture was originally developed by Acorn Computers in the 1980s. THE RISC DESIGN PHILOSOPHY Earlier when programming was done using assembly language, a need was felt to make instruction do more task because programming in assembly was tedious and error prone due to which CISC architecture evolved but with up rise of high level language dependency on assembly reduced RISC architecture prevailed. The microcontroller architecture that utilizes small and highly optimized set of instructions is termed as the Reduced Instruction Set Computer or simply called as RISC. It is also called as LOAD/STORE architecture. RISC is used in portable devices due to its power efficiency. For Example, Apple iPod and Nintendo DS. RISC is a type of microprocessor architecture that uses highly-optimized set of instructions. RISC reduces the cycles per instruction at the cost of the number of instructions per program. ARM uses the RISC architecture. The RISC philosophy is implemented with four major design rules or Characteristics i. Instructions: RISC processors have a reduced number of instruction classes (Complexity of the instruction is reduced and not the number of lines in instruction). These classes provide simple operations that can each execute in a single cycle. The compiler achieves complex tasks by executing several simple instructions. Hence each instruction is executed in single cycle. In contrast, in CISC processors the instructions are often of variable size and take many cycles to execute. ii. Pipeline: The processing of instructions is broken down into smaller units that can be executed in parallel by pipelines. Pipelining attempts to keep every part of

the processor busy with some instruction by dividing incoming instructions into a series of sequential steps (hence the name "pipeline") performed by different processor units with different parts of instructions processed in parallel. An instruction pipeline reads instruction from the memory while previous instructions are being executed in other segments of the pipeline. Thus we can execute multiple instructions simultaneously. There is no need for an instruction to be executed by a mini program called microcode as on CISC processors.

iii. Registers —RISC machines have a large general- purpose register set. Any register can contain either data or an address_. In contrast, CISC processors have dedicated registers for specific purposes._ iv. Load-store architecture —The processor operates on data held in registers. Separate load and store instructions transfer data between the register bank and external memory. In contrast, with a CISC design the data processing operations can act on memory directly. The ARM Design Philosophy There are a number of physical features that have driven the ARM processor design.

  1. portable embedded systems require some form of battery power. The ARM processor has been specifically designed to be small to reduce power consumption and extend battery operation—essential for applications such as mobile phones and personal digital assistants (PDAs).
  2. High code density is another major requirement since embedded systems have limited memory due to cost and/ or physical size restrictions. High code density is useful

for applications that have limited on-board memory, such as mobile phones and mass storage devices.

  1. In addition, embedded systems are Price sensitive and use slow and low-cost memory devices. For high-volume applications like digital cameras, every cent has to be accounted for in the design. The ability to use low-cost memory devices produces substantial savings.
  2. Another important requirement is to reduce the Area of the die taken up by the embedded processor. For a single- chip solution, the smaller the area used by the embedded processor, the more available space for specialized peripherals. This in turn reduces the cost of the design and manufacturing since fewer discrete chips are required for the end product.
  3. ARM has incorporated hardware debug technology within the processor so that software engineers can view what is happening while the processor is executing code. With greater visibility, software engineers can resolve issues faster, which has a direct effect on the time to market and reduces overall development costs. 6. The ARM core is not a pure RISC architecture because of the constraints of its primary application—the embedded system. In some sense, the strength of the ARM core is that it does not take the RISC concept too far. In today’s systems the key is not raw processor speed but total effective system performance and power consumption. Instruction Set for Embedded Systems The ARM instruction set differs from the pure RISC definition in several ways that make the ARM instruction set suitable for embedded applications:  Variable cycle execution for certain instructions — Not every ARM instruction executes in a single cycle. For example, load-store-multiple instructions vary in the number of execution cycles depending upon the number of registers being transferred. The transfer can occur on sequential memory addresses, which increases performance since sequential memory accesses are often faster than random accesses. Code density is also

Embedded System Hardware

Above figure shows a typical embedded device based on an ARM core. Each box represents a feature or function. The lines connecting the boxes are the buses carrying data. We can separate the device into four main hardware components:  The ARM processor controls the embedded device. An ARM processor comprises a core (the execution engine that processes instructions and manipulates data) plus the surrounding components that interface it with a bus. These components can include memory management and caches.  Controllers coordinate important functional blocks of the system. Two commonly found controllers are interrupt and memory controllers.  The peripherals provide all the input-output capability external to the chip and are responsible for the uniqueness of the embedded device.

 A bus is used to communicate between different parts of the device.

ARM BUS TECHNOLOGY

AMBA stands for Advanced Microcontroller Bus Architecture. AMBA specification specifies an on chip communication standard. This is used to design embedded microcontrollers with high performance. Embedded systems use different bus technologies. The Peripheral Component Interconnect (PCI) bus connects devices such as video card and disk controllers to the X 86 processor buses. This is called External or off chip bus technology. The Advanced High-performance Bus (AHB) The ARM System Bus (ASB) The Advanced Peripheral Bus (APB)