Embedded and Real Time Systems Unit II.pptx

vanitha292520 16 views 63 slides Aug 10, 2024
Slide 1
Slide 1 of 63
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63

About This Presentation

This ppt covers topic in Embedded Systems - Embedded Computing Platform Design


Slide Content

UNIT II EMBEDDED COMPUTING PLATFORM DESIGN

SYLLABUS The CPU Bus- Memory devices and systems – Designing with computing platforms – consumer electronics architecture – Platform- level performance analysis – Components for embedded programs- Models of programs-

SYLLABUS Assembly , linking and loading – Compilation techniques- Program level performance analysis – Software performance optimization – Program level energy and power analysis and optimization – Analysis and optimization of program size- Program validation and testing.

Basic Computing Platform

1. CPU Bus Bus is the mechanism by which CPU communicates with memory and I/O devices

Bus Organization and Protocol 4 way handshake

DMA (Direct Memory Access)

System Bus configuration

AMBA BUS (Advanced Microcontroller Bus Architecture) AMBA bus supports CPU’s, memories and peripherals integrated in a system-on-silicon. AMBA specification includes 2 buses:

AMBA BUS

2 .Memory Devices and Systems

Memory Device Organization

RANDOM ACCESS MEMORY

Types of DRAM

READ ONLY MEMORY (ROM)

Memory System Organization Memory chips have complex organization that allow us to make some useful optimization. Memories are usually divided into several smaller memory arrays. Channels and Banks are the two ways to add parallelism to the memory system. Channel is a connection to a group of memory components. Bank can perform accesses in parallel because each has its own memory arrays and addressing logic.

3 . Designing with computing platforms

Beagle Board

Evaluation Boards

Choosing a Platform Hardware: CPU, Bus, Memory, Input / Output Devices Software: Run Time Components: An operating system is required to control the CPU and its multiple processes. Support Components: are critical to making use of complex hardware platforms.

4. Consumer Electronics Architecture Consumer electronics refers to any device containing an electronic circuit board that is intended for everyday use by individuals. TV, digital cameras, DVD, Clock, smart phones. Most devices select features from a common menu.

4. Consumer Electronics Architecture Types of functions Functional Requirements: Multimedia, Data storage and Management, Communications Non-functional Requirements: Battery operated. Should be inexpensive and provide high performance.

5. Platform level Performance Analysis CPU plays very important role in design. Since any part of system can affect total system performance and slow down the system platform level performance analysis is important.

5. Platform level Performance Analysis Consider the simple system – Move data from memory to CPU Read from memory Transfer over the bus to the cache Transfer from the cache to the CPU The rate at which data can be moved is known as bandwidth. Bandwidth can be increased in two ways: Increase the clock rate of the bus Increase the amount of data transferred per clock cycle

5. Platform level Performance Analysis Bus Bandwidth formulas t= TP t- bus cycle counts T – bus cycles P-bus cloak period

6. Components for Embedded programs Three components to write embedded programs State machine Circular buffer Queue State Machine: When inputs given to any kinds of systems, the reaction of most systems can be characterized in terms of the input received and the current state of the system

State machine

6. Components for Embedded programs Circular Buffers and Stream Oriented Programming Circular buffer is a data structure that handles streaming data in an efficient way. Signal flow graph is used to represent different types of filtering structures.

6. Components for Embedded programs Queues Queues are used whenever data may arrive and depart at unpredictable time or when variable amount of data may arrive. Queues can be built in two ways: linked list or arrays Circular buffer always has a fixed number of data elements while a queue may have a varying number of elements in it.

7. Models of Program Programs are collection of instructions to execute a specific task. CDFG – control data flow graph is the fundamental model for programs. A data flow graph is a model of a program with no condition. Code segment with no condition have only one entry and exit point is known as a basic block.

7. Models of Program

7. Models of Program In the above code ‘X’ is having two assignments and it appears twice on the left side of an assignment. Code should be rewritten in single-assignment form, in which a variable appears only once on the left side .

we use two types of nodes in the graph round nodes denote operators Square nodes represent values .

In CDFG, we have two types of nodes: decision nodes and data flow nodes. Decision nodes are used to describe the control in a sequential program. A data flow node encapsulates a complete data flow graph to represent a basic block.

8. Assembly, Linking and Loading

8. Assembly, Linking and Loading

8. Assembly, Linking and Loading Program may be built from many files, the final step is determining the address of instructions and data are performed by the linker. Linker will produce an executable binary file. Loader will load the program into memory for execution.

9. Compilation Techniques A compiler is a special program that processes statements written in a particular language and turns them into machine language or code that a computer’s processor uses.

10. Program Level Performance Analysis CPU performance is important but it will not reflect program performance. The execution time of the program varies with the input data values because those values select different execution paths in the program. The execution time of an instruction in a pipeline depends not only on that instruction but on the instruction around it in the pipeline.

11. Software Performance Optimization Loop Optimization Cache Optimization

Loop Optimization Loop Unrolling- It helps expose parallelism that can be used by later stages of compiler. Loop Fusion-It combines two are more loops into a single loop. Loop Distribution is the opposite of loop fusion that is decomposing a single loop into multiple loops. Loop tiling breaks up a loop into a set of nested loops, with each inner loop performing the operations on a subset of the data. Array padding adds dummy data elements to a loop in order to change the layout of the array in the cache.

Dead Code Elimination Dead code is the code that can never be executed. Dead code elimination analyzes code for reachability and trims away dead code.

Induction Variable Elimination

Strength Reduction Y = X * 2 Can use left shift instead of multiplication by 2.

Cache Optimization If the cache is too small, the program runs slowly. If the cache is too large, the power consumption is high. At intermediate values the execution time and power consumption are good.

Program Level Energy And Power Analysis And Optimization Fast chips run hot, and controlling power consumption is an important element of increasing reliability and reducing system cost. We may be able to replace the algorithms with others that do things in clever ways that consume less power. By optimizing memory accesses we may be able to significantly reduce power. We may be able to turn off parts of the system—such as subsystems of the CPU, chips in the system, and so on when we do not need them in order to save power .

12. Analysis and Optimization of Program Size The memory size of program is determined by the size of its data and instructions. Both must be considered to minimize program size. Data depends on program size Programs have many copies of the same data. Eliminating duplications lead to memory utilization.

13. Program Validation and Testing Complex system need testing the ensure the system works correctly. Breaking the problem into sub problems and analyzing each sub problems Two types: Black Box: generate tests without looking at the internal structure of the program. Clear Box (White Box Test ): methods generate tests based on the program structure.

Clear Box Testing

Black Box Test
Tags