Embedded Software Design

Download Report

Transcript Embedded Software Design

Embedded Software Design
Week III
Processor Basics
Raspberry Pi -> Blinking LEDs & pushing buttons
Stand-Alone Processors
• Dedicated exclusively to the processing functions
• Require additional support circuitry for their basic operations
• DRAM controller
• System bus addressing configuration
• external peripheral devices such as keyboard controllers and serial ports
IBM 970FX
• A 64-bit implementation of the popular Power Architecture
• Deeply pipelined design, for very-high-performance computing
applications
• Static and dynamic power-management features
• Multiple sleep modes, to minimize power requirements and maximize
battery life
• Dynamically adjustable clock rates, supporting lower-power modes
• Optimized for high-performance, low-latency storage management
Intel Core M
• Based on the popular x86 architecture & widely supported by a large
ecosystem of hardware and software vendors.
• It consumes less power than most other x86 processors.
• Advanced power-management features enable low-power operating
modes and multiple sleep modes.
• Dynamic clock speed capability enhances battery-powered operations such
as standby.
• On-chip thermal monitoring enables automatic transition to lower power
modes to reduce power consumption in over temperature conditions.
• Multiple frequency and voltage operating points (dynamically selectable)
are designed to maximize battery life in portable equipment.
• Vs Atom?
Freescale MPC7448
• Used in networking and telecommunications applications
• FFT, Filtering, MPEG encoding, DES, MD5, SHA
• Operating clock rates in excess of 1.5GHz
• 1MB onboard L2 cache
• Advanced power-management capabilities, including multiple sleep
modes
• Advanced AltiVec vector-execution unit
• Register file containing 32 very wide (128-bit) registers
• Set of instructions to manipulate this vector register file
• Voltage scaling for reduced-power configurations
Processor /
Chipset relationship
Integrated Processors: Systems on Chip
• SoC?
• Power Architecture - PS3
• Freescale Power (68K)
• PowerQUICC (v I, II, III)
• MIPS – used in variety of electronics – PS1 & PS2
• RISC
• 32 & 64 bit
Integrated Processors: Systems on Chip
• ARM – used in smart phones (iPhone), RaspberryPi
• BeagleBoard & BeagleBone
• OMAP
• Freescale ARM
Summary
• SoC dominates embedded market
• Linux supports many stand-alone and SoC platforms
• Trend is moving towards commercial off-the-shelf products (COTS)
Get your hands dirty
• Lets blink some LEDs and click some buttons
Raspberry Pi
rev. I Model B
Pin Layout
Raspberry Pi
rev. 2
Pin Layout
Wiring LED with a breadboard
LED ON/OFF Example (Python)
#!/usr/bin/python
import RPi.GPIO as GPIO
#!/usr/bin/python
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.cleanup()
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)
print ("Lights off")
GPIO.output(17,GPIO.LOW)
GPIO.setmode(GPIO.BCM)
GPIO.cleanup()
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)
print ("Lights on")
GPIO.output(17,GPIO.HIGH)
Keyes Momentary Button Module
Wiring Button module with a breadboard
Button module example (Python)
#!/usr/bin/python
import os
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(10, GPIO.IN)
print("------------------")
print(" Button + GPIO ")
print("------------------")
print GPIO.input(10)
while True:
if ( GPIO.input(10) == False ):
print("Button Pressed")
os.system('date')
print GPIO.input(10)
time.sleep(5)
else:
os.system('clear')
print ("Waiting for you to press a button")
time.sleep(1)