GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 :...

26
GELE5343 Chapitre 1 : Introduction aux syst` emes ` a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit´ e de Moncton Hiver 2013 Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 1 / 26

Transcript of GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 :...

Page 1: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

GELE5343 Chapitre 1 :Introduction aux systemes a microprocesseurs

Gabriel Cormier, Ph.D., ing.

Universite de Moncton

Hiver 2013

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 1 / 26

Page 2: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Introduction

Contenu

1 Introduction

2 Definition

3 Marche

4 Caracteristiques

5 PIC32

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 2 / 26

Page 3: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Definition

Systeme embarque

Dispositif contenant un microprocesseur

Parfois invisible a l’utilisateur

Pas necessaire d’avoir un systeme a la fine pointe

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 3 / 26

Page 4: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Definition

Systeme embarque

Utile pour :

Flexibilite : plus facile a modifier le logiciel (software) que le materiel(hardware)

Plus facile a corriger les erreurs

Permet d’ajouter de la fonctionnalite plus tard (peut etre une sourcede revenus)

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 4 / 26

Page 5: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Definition

Exemples

Sonicare Elite : Brosse a dent electrique (8 bit)

Imprimantes

Carte de controle de disque dur

Automobiles, avions

Camera numerique

Sante : pacemaker, equipement de diagnostique

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 5 / 26

Page 6: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Marche

Selon certains estimes : 100 fois plus de microcontroleurs vendus quede microprocesseurs de PC

Marche de gros volume, mais moins grand revenus

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 6 / 26

Page 7: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Marche des microprocesseurs en 2002

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

Volume Dollars

32-Bit

16-Bit

8-Bit

4-Bit

DSP

Marche en 2002

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 7 / 26

Page 8: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Marche des microprocesseurs en 2006

0% 10% 20% 30% 40% 50% 60%

Type

64-Bit

32-Bit

16-Bit

8-Bit

4-Bit

Marche en 2006

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 8 / 26

Page 9: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Marche des microprocesseurs en 2012

DSP; 7%

4/8 bit; 6%

16 bit; 7%

32 bit; 10%

MPU; 70%

PART DU MARCHÉ DES MICROPROCESSEURS, 2012(73.8 G$)

Source : IC Insights

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 9 / 26

Page 10: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Marche des microprocesseurs en 2011

0

5000

10000

15000

20000

25000

2005 2010 2011 2016

Marché des microcontrolleurs (M$)

4/8 bit 16 bit 32 bit

Source : IC InsightsGabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 10 / 26

Page 11: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Langage de programmation des microprocesseurs en 2006

0% 10% 20% 30% 40% 50% 60% 70%

C

C++

C#

Java

Assembleur

Autres

Langages de programmation en 2006

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 11 / 26

Page 12: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Langage de programmation des microprocesseurs en 2011

0% 10% 20% 30% 40% 50% 60% 70%

C

C++

.NET

Java

Assembleur

Autres

Source : Embedded.comGabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 12 / 26

Page 13: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Croissance prevue du marche 2011 – 2016

0.0% 2.0% 4.0% 6.0% 8.0% 10.0% 12.0% 14.0% 16.0%

Communications

Automobile

Total

Industriel

Gov./Mil.

Ordinateur

Consommateur

Source : IC InsightsGabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 13 / 26

Page 14: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Marche

Vendeurs principaux en 2011

Entreprise Rang 2011 Marche % changement de 2010

Renesas Electronics 1 17.3% -1%

Freescale Semiconductor 2 10.1% 4%

Atmel 3 7.4% 25%

Microchip 4 6.7% 6%

Infineon 5 6.6% 18%

Texas Instruments 6 5.5% 4%

Fujitsu 7 5.5% -17%

NXP Semiconductors 8 4.8% -2%

ST Microlectronics 9 4.4% -3%

Samsung 10 3.4% -1%

Autres 28.4% 2%

Source : Databeans

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 14 / 26

Page 15: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Microcontroleurs : Caracteristiques

Tres souvent des systemes a temps reel

Contraintes de minutage tres importantes

Deux categories : Critique et non critique

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 15 / 26

Page 16: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Systemes critiques

Defaillance peut etre catastrophique : freins dans voiture, systeme decoussins gonflables, stimulateur cardiaque, etc.

Le microprocesseur doit detecter correctement les entrees et appliquerla sortie appropriee selon le delai prescrit.

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 16 / 26

Page 17: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Systemes non critiques

Systeme ou la defaillance n’est pas catastrophique

Erreurs de minutage ou de fonctionnement pas critiques

Ex : lecteur MP3

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 17 / 26

Page 18: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Autres caracteristiques

Auto-demarrage

Horloge de surveillance

Cout

Fiabilite

Consommation de puissance

Performance

Design et developpement

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 18 / 26

Page 19: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Design et developpement

Generalement, a base d’evenements

Communiques au processeur par des interruptions (interrupt)

Doit gerer ces interruptions (ex : plus d’un en meme temps) ; priorites

Controle des exceptions (ex : division par zero ?)

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 19 / 26

Page 20: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Design et developpement

Generalement, choisir le microcontroleur le moins cher qui fait letravail.

Ne pas negliger l’experience avec un manufacturier

Verifier si du code peut etre reutilise

Verifier la facilite et cout des outils de developpement

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 20 / 26

Page 21: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Design et developpement

Souvent, les microcontroleurs n’ont pas de systeme d’exploitation(operating system)

Si oui, c’est un systeme d’exploitation en temps reel (SETR ou RTOS)

Reagit a des evenements de facon consistante (delai toujours lememe)

Pas comme Windows qui vous dit d’attendre !

Quelques exemples :

INTEGRITYLynxOSOSEWindows CE

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 21 / 26

Page 22: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Erreur logicielles catastrophiques

Attention aux erreurs logiciels

Therac-25 (1985 – 1987) : quelques patients morts a cause de dosesmassives de radiation, due a une mauvaise sequence de clavier dansun intervalle de 8 s lors de traitements pour le cancer.

Ariane 5 - vol 501 (1996) : fusee et satellite de 500M$ detruit a caused’erreur de conversion d’une valeur 64 bit virgule flottante a 16 bitentier (overflow ou depassement).

Phobos 1 (1998) : code de debogage a ete active par erreur de 1caractere, et la sonde n’a pas pu recharger ses batteries et a eteperdue.

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 22 / 26

Page 23: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Erreur logicielles catastrophiques

Apollo 11 (1969) : Armstrong a ete force de faire un atterrissagemanuel a cause d’une erreur dans le manuel.

Missile Patriot (1991) : Un missile Patriot n’a pas intercepte un Scudirakien causant la mort de 28 personnes, due a une erreurd’arrondissement de 1/1011. Le systeme n’etait pas concu pour operercontinuellement, et l’erreur d’arrondissement s’est multipliee et acause une erreur de minutage.

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 23 / 26

Page 24: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

Caracteristiques

Manufacturiers

AMD : www.amd.com

Analog Devices : www.analog.com/processors

ARM : www.arm.com/products/CPUs/embedded.html (IP)

ATMEL : www.atmel.com/products

Freescale : www.freescale.com (Motorola)

Intel : www.intel.com/design/embedded/solutions

Microchip : www.microchip.com (PIC)

MIPS : www.mips.com/products/processors (IP)

TI : focus.ti.com

ZiLOG : www.zilog.com

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 24 / 26

Page 25: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

PIC32

PIC32

Caracteristiques :

80 MHz, 1.56 DMIPS/MHz

Multiplication en 1 cycle

Cache 256 Bytes

Controleur DMA 8 canaux

Convertisseur A/N 10 bit

Port parallele 16 bit pour video (QVGA)

USB, Ethernet

Unite arithmetique en entier (pas de FPU)

512 KB memoire, 128KB RAM (PIC32MX460F512L)

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 25 / 26

Page 26: GELE5343 Chapitre 1 : Introduction aux systèmes à … · 2013. 1. 30. · GELE5343 Chapitre 1 : Introduction aux syst emes a microprocesseurs Gabriel Cormier, Ph.D., ing. Universit

PIC32

Gabriel Cormier (UdeM) GELE5343 Chapitre 1 Hiver 2013 26 / 26