introducing embedded systems and the microcontrollers

37
Introducing Embedded Systems and the Microcontrollers Ravikumar Tiwari Assistant Professor Dept. of Electronics, G.H. Raisoni College of Engineering(Autonomous),Nagpur [email protected]

Upload: ravikumar-tiwari

Post on 16-Aug-2015

35 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Introducing Embedded Systems and the Microcontrollers

Introducing Embedded Systems and the Microcontrollers

Ravikumar TiwariAssistant Professor

Dept. of Electronics,

G.H. Raisoni College of Engineering(Autonomous),Nagpur

[email protected]

Page 2: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

System DefinitionA way of working, organizing or

performing one or many tasks according to a fixed set of rules, program or plan.

Page 3: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

System Definition• Also an arrangement in which all

units assemble and work together according to a program or plan.

Page 4: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Examples of SystemsTime display system – A watchAutomatic cloth washing system

– A washing machine

Page 5: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded System Definitions:1. “An embedded system is a

system that has software embedded into computer-hardware, which makes a system dedicated for an application (s) or specific part of an application or product or part of a larger system.” –Rajkamal

Page 6: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded System Definitions:2. “An embedded system is one that has a dedicated purpose software embedded in a computer hardware.” –Rajkamal

Page 7: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded System Definitions:3. “It is a dedicated computer based system for an application(s) or product. It may be an independent system or a part of large system. Its software usually embedsinto a ROM (Read Only Memory) or flash.” – Rajkamal

Page 8: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded System Definitions:“It is any device that includes a programmable computer but is not itself intended to be a general purpose computer.” – Wayne Wolf

Page 9: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded System Definitions:“Embedded Systems are the electronic systems that contain a microprocessor or a microcontroller, but we do not think of them as computers–

the computer is hidden or embedded in the system.” – Todd D. Morton

Page 10: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Let’s consider a Computer

A computer is a system that has the following or more components.

A microprocessorA large memory comprising the

following two kinds:(a) Primary memory

(semiconductor memories - RAM, ROM and fast accessible caches)

Page 11: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Computer(b) Secondary memory

[(magnetic memory located in hard disks, diskettes and cartridge tapes, optical memory in CD-ROM or memory stick (in mobile computer)] using which different user programs can load into the primary memory and can be run.

I/O units such as touch screen, modem, fax cum modem etc.

Page 12: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

ComputerInput units such as keyboard, mouse,

digitizer, scanner, etc.Output units like LCD screen, video

monitor, printer, etc.Networking units like Ethernet card,

front-end processor-based server, bus drivers, etc.

Operating system (OS).General purpose user interfaces and

application- software, mostly in secondary memory

Page 13: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Now consider Embedded system

–Three main embedded components

1.Embeds hardware to give computer like functionalities

2.Embeds main application software generally into flash or ROM and the application software performs concurrently the number of tasks.

Page 14: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded system components3.Embeds a real time operating

system ( RTOS), which supervises the

application software tasks running on the hardware and organizes the accesses to system resources according to priorities and timing constraints of tasks in the system.

Page 15: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Embedded system RTOSEnables execution of concurrent

processes or threads or tasksProvides a mechanism to let the

processor run each process as per scheduling and to do context-switch between the various processes (threads or tasks)

RTOS sets the rules during execution of application processes to enable finishing of a process within the assigned time interval and with assigned priority.

Page 16: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Page 17: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Sophisticated Embedded System CharacteristicsDedicated functionsDedicated complex algorithmsDedicated (GUIs) and other user

interfaces for the application

Page 18: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Sophisticated Embedded System Characteristics-Contd.Real time operations— Defines the ways

in which the system works, reacts to the events and interrupts, schedules the system functioning in real time and executes by following a plan to control the latencies and to meet the deadlines. [Latency — Waiting interval between the instance at which a need to run the codes arises for task (or interrupt service routine) following an event and instance of start executing the codes]

Page 19: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Sophisticated Embedded System Characteristics-Contd.Multi-rate operations — Different

operations may take place at distinct rates. For example, the audio, video, network data or stream and events have the different rates and time constraints to finish associated processes.

Page 20: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Constraints of an Embedded System DesignAvailable system-memoryAvailable processor speedLimited power dissipation when

running the system continuously in cycles of the system start, wait for event, wake-up and run, sleep and stop.

Page 21: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

System design constraintsPerformance,power,size,non-recurring design cost, andmanufacturing costs.

Page 22: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

RISCRISC, or Reduced Instruction Set

Computer. is a type of microprocessor architecture that utilizes a small, highly-optimized set of instructions, rather than a more specialized set of instructions often found in other types of architectures.

Page 23: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Design Feature that Characterizes RISCone cycle execution time: RISC

processors have a CPI (clock per instruction) of one cycle. This is due to the optimization of each instruction on the CPU and a technique called pipelining.

pipelining: a techique that allows for simultaneous execution of parts, or stages, of instructions to more efficiently process instructions

Page 24: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Design Feature that Characterizes RISClarge number of registers: the

RISC design philosophy generally incorporates a larger number of registers to prevent in large amounts of interactions with memory

Page 25: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

How pipelining Works?Pipelining, a standard feature in

RISC processors, is much like an assembly line

Because the processor works on different steps of the instruction at the same time, more instructions can be executed in a shorter period of time

Page 26: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

How pipelining Works?A useful method of

demonstrating this is the laundry analogy.

Page 27: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

How pipelining Works?

Let's say that there are four loads of dirty laundry that need to be washed, dried, and folded. We could put the the first load in the washer for 30 minutes, dry it for 40 minutes, and then take 20 minutes to fold the clothes. Then pick up the second load and wash, dry, and fold, and repeat for the third and fourth loads. Supposing we started at 6 PM and worked as efficiently as possible, we would still be doing laundry until midnight.

Source: http://www.ece.arizona.edu/~ece462/Lec03-pipe/

Page 28: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

How pipelining Works?

However, a smarter approach to the problem would be to put the second load of dirty laundry into the washer after the first was already clean and whirling happily in the dryer. Then, while the first load was being folded, the second load would dry, and a third load could be added to the pipeline of laundry. Using this method, the laundry would be finished by 9:30.

Source: http://www.ece.arizona.edu/~ece462/Lec03-pipe/(Source: http://www.inf.fh-dortmund.de/person/prof/si/risc/intro_to_risc/irt0_index.html)

Page 29: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

RISC PipelineA RISC processor pipeline

operates in much the same way, although the stages in the pipeline are different.

While different processors have different numbers of steps, they are basically variations of these five, used in the MIPS R3000 processor

Page 30: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

RISC Pipeline1.fetch instructions from memory2.read registers and decode the

instruction3.execute the instruction or

calculate an address4.access an operand in data

memory5.write the result into a register

Page 31: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

RISC Pipelinethe length of the pipeline is

dependent on the length of the longest step

Page 32: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Pipeline Development(Methods of Pipelining)Superpipelining refers to dividing

the pipeline into more steps.The more pipe stages there are,

the faster the pipeline is because each stage is then shorter.

Ideally, a pipeline with five stages should be five times faster than a non-pipelined processor (or rather, a pipeline with one stage).

Page 33: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Pipeline Development(Methods of Pipelining)Examples;1.Instruction Fetch (First Half)2.Instruction Fetch (Second Half)3.Register Fetch4.Instruction Execute5.Data Cache Access (First Half)6.Data Cache Access (Second Half)7.Tag Check8.Write Back

Page 34: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Pipeline Development(Methods of Pipelining)• Superscalar pipelining involves

multiple pipelines in parallel. • Internal components of the

processor are replicated so it can launch multiple instructions in some or all of its pipeline stages

Page 35: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Pipeline Development(Methods of Pipelining)Dynamic pipelines have the

capability to schedule around stalls.

A dynamic pipeline is divided into three units: the instruction fetch and decode unit, five to ten execute or functional units, and a commit unit.

Page 36: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Pipeline Development(Methods of Pipelining)Dynamic is combination of

Superpipelining & superscalar pipeline

Page 37: Introducing Embedded Systems and the Microcontrollers

R.K.Tiwari([email protected])

Thank you for you Attention!!!

Any Question..??