Monthly Archives: November 2013

Embedded software architectures

There are several different types of software architecture in common use.

Simple control loop

In this design, the software simply has a loop. The loop calls subroutines, each of which manages a part of the hardware or software.

Interrupt controlled system

Some embedded systems are predominantly interrupt controlled. This means that tasks performed by the system are triggered by different kinds of events. An interrupt could be

Generated for example by a timer in a predefined frequency, or by a serial port controller receiving a byte.

These kinds of systems are used if event handlers need low latency and the event handlers are short and simple.

Usually these kinds of systems run a simple task in a main loop also, but this task is not very sensitive to unexpected delays.

Sometimes the interrupt handler will add longer tasks to a queue structure. Later, after the interrupt handler has finished, these tasks are executed by the main loop. This method brings the system close to a multitasking kernel with discrete processes.

Cooperative multitasking

A nonpreemptive multitasking system is very similar to the simple control loop scheme, except that the loop is hidden in an API. The programmer defines a series of tasks, and each task gets its own environment to “run” in. When a task is idle, it calls an idle routine, usually called “pause”, “wait”, “yield”, “nop” (stands for no operation), etc.

The advantages and disadvantages are very similar to the control loop, except that adding new software is easier, by simply writing a new task, or adding to the queue-interpreter.

Preemptive multitasking or multi-threading

In this type of system, a low-level piece of code switches between tasks or threads based on a timer (connected to an interrupt). This is the level at which the system is generally considered to have an "operating system" kernel. Depending on how much functionality is required, it introduces more or less of the complexities of managing multiple tasks running conceptually in parallel.

As any code can potentially damage the data of another task (except in larger systems using an MMU) programs must be carefully designed and tested, and access to shared data must be controlled by some synchronization strategy, such as message queues, semaphores or a non-blocking synchronization scheme.

Because of these complexities, it is common for organizations to buy a real-time operating system, allowing the application programmers to concentrate on device functionality rather than operating system services, at least for large systems; smaller systems often cannot afford the overhead associated with a generic real time system, due to limitations regarding memory size, performance, and/or battery life.

Microkernels and exokernels

A microkernel is a logical step up from a real-time OS. The usual arrangement is that the operating system kernel allocates memory and switches the CPU to different threads of

Execution. User mode processes implement major functions such as file systems, network interfaces, etc.

In general, microkernels succeed when the task switching and intertask communication is fast, and fail when they are slow.

Exokernels communicate efficiently by normal subroutine calls. The hardware, and all the software in the system are available to, and extensible by application programmers.

Monolithic kernels

In this case, a relatively large kernel with sophisticated capabilities is adapted to suit an embedded environment. This gives programmers an environment similar to a desktop operating system like Linux or Microsoft Windows, and is therefore very productive for development; on the downside, it requires considerably more hardware resources, is often more expensive, and because of the complexity of these kernels can be less predictable and reliable.

Common examples of embedded monolithic kernels are Embedded Linux and Windows CE.

Despite the increased cost in hardware, this type of embedded system is increasing in popularity, especially on the more powerful embedded devices such as Wireless Routers and GPS Navigation Systems. Here are some of the reasons:

• Ports to common embedded chip sets are available.

• They permit re-use of publicly available code for Device Drivers, Web Servers, Firewalls, and other code.

• Development systems can start out with broad feature-sets, and then the distribution can be configured to exclude unneeded functionality, and save the expense of the memory that it would consume.

• Many engineers believe that running application code in user mode is more

Reliable, easier to debug and that therefore the development process is easier and

The code more portable.

• Many embedded systems lack the tight real time requirements of a control system. A system such as Embedded Linux has fast enough response for many applications.

• Features requiring faster response than can be guaranteed can often be placed in hardware.

• Many RTOS systems have a per-unit cost. When used on a product that is or will become a commodity, that cost is significant.

Exotic custom operating systems

A small fraction of embedded systems require safe, timely, reliable or efficient behavior unobtainable with the one of the above architectures. In this case an organization builds a

System to suit. In some cases, the system may be partitioned into a "mechanism controller" using special techniques, and a "display controller" with a conventional operating system. A communication system passes data between the two.

Additional software components

In addition to the core operating system, many embedded systems have additional upper – layer software components. These components consist of networking protocol stacks like CAN, TCP/IP, FTP, HTTP, and HTTPS, and also included storage capabilities like FAT and Flash memory management systems. If the embedded devices has audio and video capabilities, then the appropriate drivers and codecs will be present in the system. In the case of the monolithic kernels, many of these software layers are included. In the RTOS category, the availability of the additional software components depends upon the commercial offering.

High vs Low Volume

For high volume systems such as portable music players or mobile phones, minimizing cost is usually the primary design consideration. Engineers typically select hardware that is just “good enough” to implement the necessary functions.

For low-volume or prototype embedded systems, general purpose computers may be adapted by limiting the programs or by replacing the operating system with a real-time operating system.

Reliability

Embedded systems often reside in machines that are expected to run continuously for years without errors, and in some cases recover by themselves if an error occurs. Therefore the software is usually developed and tested more carefully than that for personal computers, and unreliable mechanical moving parts such as disk drives, switches or buttons are avoided.

Specific reliability issues may include:

1. The system cannot safely be shut down for repair, or it is too inaccessible to repair. Examples include space systems, undersea cables, navigational beacons, bore-hole systems, and automobiles.

2. The system must be kept running for safety reasons. "Limp modes" are less tolerable. Often backups are selected by an operator. Examples include aircraft navigation, reactor control systems, safety-critical chemical factory controls, train signals, engines on single-engine aircraft.

3. The system will lose large amounts of money when shut down: Telephone

Switches, factory controls, bridge and elevator controls, funds transfer and market making, automated sales and service.

A variety of techniques are used, sometimes in combination, to recover from errors— both software bugs such as memory leaks, and also soft errors in the hardware:

• watchdog timer that resets the computer unless the software periodically notifies the watchdog

• subsystems with redundant spares that can be switched over to

• software "limp modes" that provide partial function

• Designing with a Trusted Computing Base (TCB) architecture ensures a highly secure & reliable system environment

• An Embedded Hypervisor is able to provide secure encapsulation for any subsystem component, so that a compromised software component cannot interfere with other subsystems, or privileged-level system software. This encapsulation keeps faults from propagating from one subsystem to another, improving reliability. This may also allow a subsystem to be automatically shut down and restarted on fault detection.

• Immunity Aware Programming

IMPURITY DIFFUSION COEFFICIENTS

TEMPERATURE ("C)

IMPURITY DIFFUSION COEFFICIENTS

TEMPERATURE (°С)

IMPURITY DIFFUSION COEFFICIENTS

TEMPERATURE (°С)

Подпись: TEMPERATURE (°С) IMPURITY DIFFUSION COEFFICIENTS

(b)

FIGURE D10.1

Impurity diffusion coefficients in (a) Si (I = (After Refs 1-3)

(c)

I, S = substitutional), (b) Ge, and (c) GaAs

[1]s2

[2] 4

ELECTRIC FIELD ST (kV/cm)

[3] Anodically grown oxide, in plasma or in solution.

inversely proportional to frequency, a capacitor can block DC signals while being able to couple AC signals. It can be used to bypass components at high

[5] L m

when carriers are in the mobility regime, velocity saturation regime, or ballistic regime, respectively. These equations assume that there is negligible barrier limiting the injection of carriers. In the case of an SIT, the barrier created by the gate bias controls the onset of the SCL current. In other words, SCL current starts when the 0* is lowered by VD to approximately zero. Because of this, VD in Eqs. (24.13) to (24.15) has a threshold value and should be replaced by (VD + aVG) where a is another constant similar in nature to 77 and 0.26 With this substitution, the SCL current becomes a function of Vq. Also, comparing Eq. (24.13) to Eq. (24.12), one can now see more clearly the fundamental difference between an analog transistor and an SIT. As discussed by Nishizawa, in an analog transistor, the SCL current does not have an exponential

[6] J I Nishizawa, E Iwanami, S Aral, M Shimbo, K Tanaka and A Watanabe, “Low-power SITL IC,” IEEE J Solid-State Circuits, SC-17, 919 (1982)

[7] J I Nishizawa, T Tamamushi, Y Mochida and T Nonaka, “High speed and high density static induction transistor memory,” IEEE J Solid-State Circuits, SC-13, 622 (1978)

[8] A Yusa, J 1 Nishizawa, M Imai, H Yamada, J I Nakamura, T Mizoguchi, Y Ohta and M Takayama, “SIT image sensor Design considerations and characteristics,” IEEE Trans Electron Dev, ED-33, 735(1986)

[9] Fiber-optics communication: An LED can be the light source in optical-fiber communication. The structure for a surface-emitting LED is shown in Fig. 47.7. Edge-emitting LED can also be used in this application. For

ION-IMPLANTATION RANGES AND STANDARD DEVIATIONS


(D9.1)

Подпись: (D9.1). Dose per area N(x) = = exp

2A R2

Подпись: 2A R2J27T&R

TABLE D9.1

Ion implantation projected range (Rp) and standard deviation (ARp) into Si.1

ANTIMONY

ARSENIC

BORON

PHOSPHORUS

ENERGY

RP

ARp

RP

ARp

RP

ARp

RP

**P

(keV)

frim)

(^m)

(^m)

(nm)

(M-m)

(jim)

(im)

(M-ni)

10

0.0088

0.0026

0.0097

0.0036

0 0333

0.0171

0.0139

0.0069

20

0.0141

0.0043

0.0159

0.0059

0.0662

0.0283

0.0253

0.0119

30

0.0187

0.0058

0.0215

0.0080

0 0987

0.0371

0 0368

0.0166

40

0.0230

0.0071

0.0269

0.0099

0.1302

0.0443

0.0486

0.0212

50

0.0271

0.0084

0 0322

0 0118

0 1608

0.0504

0 0607

0.0256

60

0.0310

0.0096

0.0374

0.0136

0.1903

0.0556

0.0730

0.0298

70

0.0347

0.0107

0.0426

0.0154

0 2188

0.0601

0 0855

0.0340

80

0.0385

0.0118

0.0478

0.0172

0 2465

0.0641

0 0981

0.0380

90

0.0421

0.0130

0.0530

0 0189

0.2733

0.0677

0.1109

0.0418

100

0.0457

0.0140

0.0582

0.0207

0 2994

0.0710

0.1238

0.0456

110

0.0493

0.0151

0.0634

0 0224

0.3248

0.0739

0.1367

0.0492

120

0.0529

0.0162

0 0686

0.0241

0.3496

0.0766

0 1497

0.0528

130

0.0564

0.0172

0.0739

0.0258

0.3737

0.0790

0.1627

0.0562

140

0.0599

0.0183

0.0791

0.0275

0.3974

0.0813

0 1757

0.0595

150

0.0634

0.0193

0.0845

0.0292

0.4205

0 0834

0 1888

0 0628

160

0.0669

0.0203

0.0898

0.0308

0.4432

0.0854

0.2019

0.0659

170

0.0704

0.0213

0.0952

0 0325

0.4654

0.0872

0.2149

0.0689

180

0.0739

0.0224

0 1005

0.0341

0 4872

0.0890

0 2279

00719

190

0.0773

0.0234

0.1060

0 0358

0 5086

0.0906

0.2409

0.0747

200

0.0808

0.0244

0.1114

0.0374

0.5297

0.0921

02539

0.0775

220

0.0878

0.0264

0.1223

0.0407

0.5708

0.0950

0 2798

0.0829

240

0 0947

0.0283

0.1334

0.0439

0 6108

0 0975

0.3054

0.0880

260

0.1017

0.0303

0.1445

0.0470

0.6496

0 0999

0.3309

0 0928

280

0 1086

0.0322

0 1558

0.0502

0.6875

0.1020

0 3562

0.0974

300

0 1156

0 0342

0 1671

0 0533

0 7245

0 1040

0 3812

0 1017

TABLE D9.2

Ion implantation projected range (Rp) and standard deviation (ARp) into Si02.‘

ANTIMONY

ARSENIC

BORON

PHOSPHORUS

ENERGY

Rp

A Rp

Rp

**P

Rp

A Rp

RP

**P

(keV)

(*im)

fain)

fam)

fttm)

ftim)

(jim)

(Mm)

(fim)

10

0 0071

0 0020

0.0077

0 0026

0 0298

0 0143

0.0108

0.0048

20

0.0115

0.0032

0.0127

0.0043

0 0622

0.0252

0.0199

0.0084

30

0.0153

0.0042

0.0173

0 0057

0.0954

0.0342

0.0292

0.0119

40

0.0188

0.0052

0.0217

0 0072

0.1283

0 0418

0.0388

0.0152

50

0.0222

0 0061

0 0260

0 0085

0 1606

0.0483

0 0486

00185

60

0.0254

0.0070

0 0303

0 0099

0.1921

0.0540

0.0586

0.0216

70

0.0286

0 0078

0 0346

0.0112

0.2228

0 0590

0 0688

0.0247

80

0.0316

0.0086

0 0388

0 0125

0 2528

0 0634

0 0792

0.0276

90

0 0347

0 0094

0 0431

O. OI38

02819

0 0674

0 0896

0.0305

100

0 0377

0 0102

0.0473

0 0151

0 3104

0 0710

0 1002

0 0333

110

0.0406

0.0110

00516

0.0164 1

0 3382

0.0743

0.1108

0.0360

120

0 0436

0 0118

0.0559

0.0176

0.3653

0 0774

0.1215

0.0387

130

0 0465

0 0126

0.0603

0 0189

03919

0.0801

0.1322

0.0412

140

0 0494

0 0133

0.0646

0.0201

0.4179

0.0827

0.1429

0.0437

150

0 0523

0 0141

0.0690

0 0214

0 4434

0 0851

0.1537

0.0461

160

0.0552

0 0149

0 0734

0 0226

0.4685

0.0874

0.1644

0 0485

170

0.0581

0 0156

0 0778

0 0239

0.4930

0 0895

0.1752

0.0507

ISO

0.06 О0

0.0164

0.0823

0 0251

0.5172

0.0914

0.1859

0.0529

190

0.0639

00171

0.0868

0.0263

0.5409

0 0933

0.1966

0.0551

200

0 0668

0 0178

0.0913

0 0275

0 5643

0.0951

0.2073

0.0571

220

0.0726

0.0193

0 1003

0.0299

0.6100

0.0983

0.2286

0 0611

240

0 0784

0.0208

0 1095

0 0323

0.6544

0.1013

0.2498

0.0649

260

0.0842

0.0222

0.1187

0 0347

0 6977

0.1040

0.2709

0.0685

280

0 0900

0.0237

0 1280

0 0370

0.7399

0.1065

0.2918

0.0719

300

0 0958

0 0251

0 1374

0 0394

0.7812

0.1087

0 3125

0 0751

TABLE D9.3

Ion implantation projected range (Rp) and standard deviation (ARP) into Si3N4.‘

ANTIMONY

ARSENIC

BORON

PHOSPHORUS

ENERGY

RP

ARp

RP

**P

Rp

**P

RP

(keV)

(H“)

(Hin)

ftim)

aim)

(H»n)

(H»n)

(^m)

10

0 0056

0 0015

0 0060

0.0020

0.0230

0.0ОI1

0.0084

0.0037

20

0.0090

0.0024

0.0099

0.0033

0 0480

0 0 О 96

0.0 О 54

0.0065

30

0.0ОО9

0.0033

0.0 О 35

0.0045

0.0736

0.0267

0.0226

0.0092

40

0.0147

0.0040

0.0169

0.0056

0.0990

0.0326

0 0300

0.0118

50

0.0173

0 0047

0 0202

0.0066

0.1239

0 0377

0.0376

0.0143

60

0.0197

0 0054

0 0235

0.0077

0.О482

0.0422

0.0453

0 0168

70

0.0222

0 006О

0 0268

0.0087

0.О7О9

0.046О

0.0532

0.0 О 92

80

0.0246

0.0067

0 030О

0 0097

0 1950

0 0496

0 0612

0 0215

90

0.0269

0.0074

0 0334

0 0108

0.2О76

0.0527

0.0693

0.0237

О00

0.0292

0 0080

0.0367

00118

0 2396

0 0555

0 0774

0 0259

no

0.0315

0 0086

0 0400

0 0127

0.26 О 0

0.058О

0.0856

0.0280

О20

0.0338

0.0092

0 0433

00137

0.2820

0.0605

0.0939

0 030О

О30

0.0360

0.0098

0.0467

0 0147

0.3025

0.0627

0.О022

0 0321

О40

0.0383

0.0104

0.0500

0 0157

0 3226

0.0647

0.1105

0 0340

150

0.0405

0 01О0

0 0534

00167

0 3424

0.0666

0 1188

0 0358

О60

0.0428

0.0О О6

0.0568

0 0176

0.3617

0.0684

0.О27О

0.0377

О 70

0 0450

0.0О22

0.0603

0.0186

0.3807

0 0700

0.О354

0.0394

180

0.0472

0.0О28

0.0637

0 0195

0.3994

0.0716

0.О437

0 04ОО

190

0.0495

0 0134

0.0672

0 0205

0.4О78

0 073 О

0.О520

0.0428

200

0.0517

0.0О39

0.0706

0 0214

0.4358

0.0744

0.1602

0.0444

220

0.0562

0.0О5О

0 0776

0.0233

0.4712

0.0770

0.1767

0.0475

240

0.0606

0.0162

0.0847

0.0252

0.5056

0.0793

0.1931

0.0505

260

0.065 О

0.0 О 74

0.09О8

0.0270

0.5390

0.0815

0.2094

0.0533

280

0.0696

0.0 85

0.0990

0 0289

0.5717

0.0834

0.2255

0.0559

300

0 074О

0 0О96

0 1063

0 0307

0 6037

0 0852

0.2415

0 0584