Microcontroller Architectures and Examples



Ähnliche Dokumente
Pipelining for DLX 560 Prozessor. Pipelining : implementation-technique. Pipelining makes CPUs fast. pipe stages

Tube Analyzer LogViewer 2.3

Wozu dient ein Logikanalysator?

auf differentiellen Leitungen

prorm Budget Planning promx GmbH Nordring Nuremberg

Use of the LPM (Load Program Memory)

Geekclock. Chaos Singularity Code and Hardware Walkthrough. Andreas Müller

Routing in WSN Exercise

NEWSLETTER. FileDirector Version 2.5 Novelties. Filing system designer. Filing system in WinClient

Where are we now? The administration building M 3. Voransicht

Released energy meters for PIKO IQ / PLENTICORE plus

Can I use an older device with a new GSD file? It is always the best to use the latest GSD file since this is downward compatible to older versions.

Bedienungsanleitung / Manual für il-debug_i Interface für den Debugger il_debug

How-To-Do. Hardware Configuration of the CC03 via SIMATIC Manager from Siemens

1. General information Login Home Current applications... 3

Word-CRM-Upload-Button. User manual

IDS Lizenzierung für IDS und HDR. Primärserver IDS Lizenz HDR Lizenz

Struktur der CPU (1) Die Adress- und Datenpfad der CPU: Befehl holen. Vorlesung Rechnerarchitektur und Rechnertechnik SS Memory Adress Register

Weather forecast in Accra

Presentation of a diagnostic tool for hybrid and module testing

Vortrag zur Seminarphase der PG Solar Doorplate MSP430 Wichtigste Grundlagen von David Tondorf

p^db=`oj===pìééçêíáåñçêã~íáçå=

Übung 3: VHDL Darstellungen (Blockdiagramme)

Asynchronous Generators

Java Tools JDK. IDEs. Downloads. Eclipse. IntelliJ. NetBeans. Java SE 8 Java SE 8 Documentation

Father of most computers is the classic universal computing automaton

rot red braun brown rot red RS-8 rot red braun brown R S V~

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL - USER GUIDE June 2016

ONLINE LICENCE GENERATOR

MATLAB driver for Spectrum boards

H o c h s c h u l e D e g g e n d o r f H o c h s c h u l e f ü r a n g e w a n d t e W i s s e n s c h a f t e n

Model-based Development of Hybrid-specific ECU Software for a Hybrid Vehicle with Compressed- Natural-Gas Engine

The Single Point Entry Computer for the Dry End

Cycling and (or?) Trams

Industrial USB3.0 Miniature Camera with color and monochrome sensor

Cycling. and / or Trams

Snap-in switch for switches PSE, MSM and MCS 30

Bedienungsanleitung. User Manual. FLAT PAR TRI 5x3W TRI, IR Remote LIG

BVM-Tutorial 2010: BlueBerry A modular, cross-platform, C++ application framework

Systemaufbau Blockdiagramm / System structure

SARA 1. Project Meeting

Zusatz zur Betriebsanleitung Addendum to the Operating Instructions

Accelerating Information Technology Innovation

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL USER GUIDE June 2016

Tuning des Weblogic /Oracle Fusion Middleware 11g. Jan-Peter Timmermann Principal Consultant PITSS

vcdm im Wandel Vorstellung des neuen User Interfaces und Austausch zur Funktionalität V

Walter Buchmayr Ges.m.b.H.

Informatik - Übungsstunde

USB -> Seriell Adapterkabel Benutzerhandbuch

How-To-Do. OPC-Server with MPI and ISO over TCP/IP Communication. Content. How-To-Do OPC-Server with MPI- und ISO over TCP/IP Communication

p^db=`oj===pìééçêíáåñçêã~íáçå=

Mercedes OM 636: Handbuch und Ersatzteilkatalog (German Edition)

Developing Interactive Integrated. Receiver Decoders: DAB/GSM Integration

Software development with continuous integration

Memory. Jian-Jia Chen (Slides are based on Peter Marwedel) Informatik 12 TU Dortmund Germany 2014 年 11 月 12 日. technische universität dortmund

Die Bedeutung neurowissenschaftlicher Erkenntnisse für die Werbung (German Edition)

ITAC Bedienungsanleitung User manual. Originalbedienungsanleitung in deutscher Sprache. Für künftige Verwendung aufbewahren.

Ein Stern in dunkler Nacht Die schoensten Weihnachtsgeschichten. Click here if your download doesn"t start automatically

Konfiguration von eduroam. Configuring eduroam

Neue Prozessor-Architekturen für Desktop-PC

Duell auf offener Straße: Wenn sich Hunde an der Leine aggressiv verhalten (Cadmos Hundebuch) (German Edition)

Computational Models

EtherNet/IP Topology and Engineering MPx06/07/08VRS

Eingebettete Taktübertragung auf Speicherbussen

How-To-Do. Hardware Configuration of the CPU 317NET with external CPs on the SPEED Bus by SIMATIC Manager from Siemens

Introduction Workshop 11th 12th November 2013

Mikroprozessoren Grundlagen AVR-Controller Input / Output (I/O) Interrupt Mathematische Operationen

Dexatek's Alexa Smart Home Skills Instruction Guide

How-To-Do. Communication to Siemens OPC Server via Ethernet

UNIGATE CL Konfiguration mit WINGATE

Outline. Cell Broadband Engine. Application Areas. The Cell

Newest Generation of the BS2 Corrosion/Warning and Measurement System

MSP 430. Einführung. Was kann er? Hauptthemen. Wie sieht er aus? 64 / 100 polig. Was kann er? MSP 430 1

PROFIBUS-DP Repeater 1 to 1 and 1 to 5 with optional level converter module

Freigegebene Energiezähler für PIKO IQ / PLENTICORE plus Released energy meters for PIKO IQ / PLENTICORE plus

Dynamic Hybrid Simulation

yasxtouch Firmware Update

Registration of residence at Citizens Office (Bürgerbüro)

NOREA Sprachführer Norwegisch: Ein lustbetonter Sprachkurs zum Selbstlernen (German Edition)

miditech 4merge 4-fach MIDI Merger mit :

Cell Broadband Engine

Bedienungsanleitung. User Manual

Operation Guide AFB 60. Zeiss - Str. 1 D Dauchingen

Network premium POP UP Display

WP2. Communication and Dissemination. Wirtschafts- und Wissenschaftsförderung im Freistaat Thüringen

Magic Figures. We note that in the example magic square the numbers 1 9 are used. All three rows (columns) have equal sum, called the magic number.

Geometrie und Bedeutung: Kap 5

Freigegebene Energiezähler für PIKO IQ / PLENTICORE plus Released energy meters for PIKO IQ / PLENTICORE plus

Pressglas-Korrespondenz

Order Ansicht Inhalt

Microcontroller VU Exam 1 (Programming)

Fachübersetzen - Ein Lehrbuch für Theorie und Praxis

Prinzipien und Komponenten eingebetteter Systeme

Exercise (Part II) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Datenblatt. Remote-I/O - u-remote UR20-4AO-UI or 4-wire connection; 16-bit resolution; 4 outputs

Anleitung zur Verwendung des Update-Tools für

AS Path-Prepending in the Internet And Its Impact on Routing Decisions

Mitglied der Leibniz-Gemeinschaft

Transkript:

Microcontroller Architectures and Examples Thomas Basmer telefon: 0335 5625 334 fax: 0335 5625 671 e-mail: basmer [ at ] ihp-microelectronics.com web:

Outline Microcontroller in general Introduction Main components Low-power features Architectures Von Neumann vs. Harvard RISC vs. CISC CPU in general Main components Instruction execution Microcontroller examples AVR LEON2 MSP430(X) ipms_430(x) Kapitel 1 Seite 2

Microcontroller in geneneral(1) Microcontroller µ very small control unit supervisor Kapitel 1 Seite 3

Microcontroller in general(2) Core Memory Peripherals I/O Microcontroller: Minimal processor Simple and small instruction set (< 50) Clock speed: < 20 MHz Data and address bus: 8, 16, (32) bit Normal Processor: Instruction set: 480 (x86) Clock speed: up to 3,6 GHz Data and address bus: 32, 64 bit Kapitel 1 Seite 4

Microcontroller in general(3) Core Memory Peripherals I/O Microcontroller: Timer Multiplication unit Comperator Cryptographical Components UART, SPI, I²C, ADC, DAC Normal Processor: Timer, ALU Graphical unit All you can expect ;-) Kapitel 1 Seite 5

Microcontroller in general(4) Core Memory Peripherals I/O Microcontroller: RAM: <32 kib ROM(EEPROM/FLash): <256 kib up to 1 MiB external Memory More Memory only for Data, e.g. via SPI That s it! No MMU, no virtual address space No memory/stack protection Normal Processor: Cache L1, L2, L3: <12 MiB RAM: < 4 GiB ROM: x TiB MMU, virtual address space Kapitel 1 Seite 6

Microcontroller in general(5) Core Memory Peripherals I/O Microcontroller: GPIO UART, SPI, I²C, RS323 newer one s: USB Normal Processor: USB, P/S2, LAN, PCI, Kapitel 1 Seite 7

Microcontroller in general(6) Microcontroller low-power features: Different energy modes: Idle, Active, Sleep (and some modes between) Power consumption (based on MSP430) Active mode: ~ 200 µa per MHz Idle mode: 0.7 µa Sleep mode: 0.1 µa Microcontrollers are very power efficient, because they are often used in areas where power is limited (e.g. AA batteries) Kapitel 1 Seite 8

Outline Microcontroller in general Introduction Main components Low-power features Architectures Von Neumann vs. Harvard RISC vs. CISC CPU in general Main components Instruction execution Microcontroller examples AVR LEON2 MSP430(X) ipms_430(x) Kapitel 1 Seite 9

Architectures(1) Core Von Neumann Architecture Control unit ALU Peripherals 1 memory for data and program code No memory protection The single bus is the bottleneck Same width for data and instructions Memory I/O Kapitel 1 Seite 10

Architectures(2) Core Harvard Architecture Control unit ALU Peripherals 2 separate memory Load code and data in parallel Protection of the program memory Used for DSP(Digital Signal Processor) Different width of data and instructions is possible Program Memory Data Memory I/O Kapitel 1 Seite 11

Architectures(3) v. Neumann Harvard Pro 1. Memory is flexible usable for data and code - smaller memories - Memories are the biggest part of a chip - 16kB RAM ~ 3mm² - Ipms_430x ~ 0,4 mm² - Memories are power wasting Con 1. Code and data using one bus 2. Malware can destroy or change program code 1. Faster (get instruction and data in parallel) 2. Memory protection (Malware does not affect program code) 3. Different sizes of data word and instruction word 1. If only small amount of data or code, memory space is wasted Kapitel 1 Seite 12

Architectures(4) Reduced Instruction Set Computing (RISC) no complex instructions decoding is easier fast execution 1 cyle per instruction for register to register operations several small instructions one after another fast reaction on interrupts interrupt is serviced when instruction has finished important for microcontrollers an embedded systems every instruction is hard-wired complex instructions are emulated by simple ones typical instructions: ADD, SUB, SHL, SHR, MOV, Kapitel 1 Seite 13

Architectures(5) Complex Instruction Set Computing (CISC) long instructions expensive decoding slower execution special instructions instructions are not hard-wired every instruction starts a microprogram it executes the different tasks of the instruction microprograms can be changed for optimization today pure CISC is only rare used e.g. Pentium Pro has a CISC architecture but a functional unit transfers instructions from CISC to RISC Kapitel 1 Seite 14

Architectures(6) RISC Pro 1. few instructions 2. Fast decoding and execution 3. Fast reaction on interrupts Con 1. Instructions are hard-wired optimization or correction of mistakes impossible 2. No parallel execution possible CISC 1. Complex instructions 2. Paralelism is possible 3. Changes on instruction set is possible 1. Slower decoding slower execution 2. Slow reaction on interrupts Kapitel 1 Seite 15

Outline Microcontroller in general Introduction Main components Low-power features Architectures Von Neumann vs. Harvard RISC vs. CISC CPU in general Main components Instruction execution Microcontroller examples AVR LEON2 MSP430(X) ipms_430(x) Kapitel 1 Seite 16

CPU in general(1) Decodes the instruction generates the control signals for Aritmetical Logical Unit Multiplexers and Demultiplexers Control Unit Register File Programm Counter (PC) address of the next instruction Status Register (SR) current system state Stack Pointer (SP) address of the last stack entry General Purpose Registers interim values, constants etc. Is controled by signals of the control unit Executes arithmetical logical operations like ADD, SUB, MOV, Shift left, Shift right, is fed by memory or register file ALU Kapitel 1 Seite 17

CPU in general(2) mem_o MUX MUX Control Unit ALU Register File DE MUX mem_i mab Kapitel 1 Seite 18

Stack Part of the memory CPU in general(3) Stack 0x22 It s a LIFO (Last In First Out) memory It s read and written by special operation Push, pop Contains return addresses and special data like register content Register 4 Status Register Program Counter 0x10 Current Inst. PUSH R4 SP 0x16 Kapitel 1 Seite 19

Stack Part of the memory CPU in general(4) Stack 0x22 It s a LIFO (Last In First Out) memory It s read and written by special operation Push, pop Contains return addresses and special data like register content Status Register Program Counter 0x10 Current Inst. POP R4 SP 0x14 Kapitel 1 Seite 20

CPU in general(5) At least 4 clockcycles needed to process an instruction 1. Instruction fetch 2. Instruction decode 3. Execute 4. Write back To speed up execution a pipeline is used Step: Fetch Decode Execute Write Back Program: Inst 1 Inst 1 Inst 1 Inst 1 Kapitel 1 Seite 21

CPU in general(6) Pipeline In a pipeline all 4 steps are separated into stages When one instruction passed one of the steps the next one is loaded Through-put raises with a factor of 4 Problems Non linear program flow (jumps, branches, ) Stalls in the pipeline needed Step: Fetch Decode Execute Write Back Program: Inst 4 Inst 3 Inst 2 Inst 1 Kapitel 1 Seite 22

Outline Microcontroller in general Introduction Main components Low-power features Architectures Von Neumann vs. Harvard RISC vs. CISC CPU in general Main components Instruction execution Microcontroller examples AVR LEON2 MSP430(X) ipms_430(x) Kapitel 1 Seite 23

Microcontroller examples(1) AVR 8 bit microcontroller from Atmel ATtiny(<16kB Flash), ATmega(<256kB Flash, <16kB RAM) AVR32 (32 bit DSP) RISC architecture, Harvard architecture No pipeline One instruction per cycle for register operations Instruction set: 50-135 Clock speed: <10 MHz (caused by slow memory access) Flash access: ~100 ns RAM access: ~10 ns Kapitel 1 Seite 24

Microcontroller examples(2) AVR ATtiny11/12: Power consumption at 4 MHz: Active: 2.2 ma Idle: 0.5 ma Power down: <1 µa Clock speed: <8 MHz ATmega: Power consumption at 4 MHz: Active: 1.6 ma, Power down: 0.4µA Clockspeed: <20MHz Kapitel 1 Seite 25

Microcontroller examples(3) LEON2 32 bit soft-core from Aerospace Gaisler (VHDL) Designed for space applications under contract from ESA Provided under Less GNU Public license (LGPL) and GNU Public license (GPL) Sparc V8 architecture (Scalable Processor Architecture) RISC architecture, Harvard architecture (for cache subsystem only) 5 Stage pipeline (FET,DEC,EXE,MEM,WR) Configurable register windows, MMU, interrupt controller, cache size, FPU, Kapitel 1 Seite 26

Microcontroller examples(4) Kapitel 1 Seite 27

Microcontroller examples(5) MSP430(X) 16 bit microcontroller from Texas Instruments MSP430 16 bit address bus MSP430X 20 bit address bus RISC architecture, von Neumann architecture Instruction set: 27 core instructions 24 emulated instructions Memory: < 32kB Flash, < 1kB RAM Power consumption at 4 MHz for the 5 operating modes: Active 1.2 ma LPM0: 55 µa, LPM2: 17 µa, LPM3: 0.9 µa, LPM4: 0.1 µa Kapitel 1 Seite 28

Microcontroller examples(6) Instruction width: 16 bit For MSP430X: 16 bit extension word is used Kapitel 1 Seite 29

Microcontroller examples(7) Kapitel 1 Seite 30

Microcontroller examples(8) Kapitel 1 Seite 31

Microcontroller examples(9) ACK Kapitel 1 Seite 32

Microcontroller examples(10) ipms_430(x) 16 bit microcontroller soft-core (VHDL) from Fraunhofer IPMS in Dresden ipms_430: 16 bit address bus ipms_430x: 20 bit address bus Is instruction set compatible to the MSP430(X) Same tool chain can be used Contains only the CPU and no peripherals Kapitel 1 Seite 33

References MSP430x2xx User s Guide SLAS383B (MSP430 Data Sheet) ATMEL ATtiny11 ATtiny12 Data sheet ATMEL ATmega1284P Data sheet LEON2 User s Manual Sparc Architecture Manual Version 8 ipms_430 and ipms_430(x) User s Guide www.gidf.de Kapitel 1 Seite 34

Goodby! Thank you for your attention! Kapitel 1 Seite 35