Jon Stanley EE382N-4 Spring 2011.  Objectives  Tasks  Keil MCB2300 ARM7 Evaluation Board ◦ System overview ◦ Measurement setup ◦ Instruction power.

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
Advertisements

Superscalar and VLIW Architectures Miodrag Bolic CEG3151.
Lecture 1 – Arduino Basics
Real-Time Library: RTX
Lab7: Introduction to Arduino
1 Advanced Computer Architecture Limits to ILP Lecture 3.
Intro to Computer Org. Pipelining, Part 2 – Data hazards + Stalls.
ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.
Last update: August 9, 2002 CodeTest Embedded Software Verification Tools By Advanced Microsystems Corporation.
1 Lecture: Pipeline Wrap-Up and Static ILP Topics: multi-cycle instructions, precise exceptions, deep pipelines, compiler scheduling, loop unrolling, software.
29 April 2005 Part B Final Presentation Peripheral Devices For ML310 Board Project name : Spring Semester 2005 Final Presentation Presenting : Erez Cohen.
ECE 480: Team 3 Pre-Proposal Rituraj Behera – Presentation Prep Samuel Flynn – Team Manager Da Ke - Webmaster Sungsoo Kim – Lab Coordinator Eric Myers.
7/2/ _23 1 Pipelining ECE-445 Computer Organization Dr. Ron Hayne Electrical and Computer Engineering.
ECE 4220 Real Time Embedded Systems Final Project Presentation Spring 2014 University of Missouri Columbia By: Michael Brauch Temperature Data Logger.
Getting Started with a Cortex-M3 Board
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Intel Do-It-Yourself Challenge Hello World with the Arduino IDE Nicolas Vailliet Intel.
Robotics Research Laboratory Louisiana State University.
Resources: Hardware and Software Senior Design – Fall 2011.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
SINGLE BOARD COMPUTERS -KEVIN JOSE. WHY DO WE USE THEM? Good performance at low price GPIO capability to interact with the outside world Small form factor,
Drivers Station 2010 Joe Ross Team /12/2009.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
EE 1106: Introduction to EE Freshman Practicum
Breathing New Life Into An Old Laptop. Give an Old Laptop New Life with Cheap (or Free) Projects Picture frame Wireless Bridge File Server Printer server.
Beagle Board Fast Boot Hui Chen Keji Ren Dec 10 th, 2009 EE382N-4 Project.
The IT700 PIM only supports up to network layer, all other above layers must be executed by other processor. Therefore in the PLC control network two types.
Grant Thomas Anthony Fennell Justin Pancake Chris McCord TABLEGAMES UNLIMITED.
What’s iTeach Educational Purposes Only Connect to Internet Upload/ Download files Stream/Play Video and Audio (Lectures) Reading Textual Documents Browse.
NIOS II Ethernet Communication Final Presentation
David Abbott - JLAB DAQ group Embedded-Linux Readout Controllers (Hardware Evaluation)
Real-time Closed Loop Controller Raffaele Cetrulo Rolando Ortega Hector Rubio.
Terminal Servers in Schools A second life for your older computers.
Getting To Know Computers COMPUTER BASICS. WHAT IS A COMPUTER? A computer is an electronic device that manipulates information, or “data.” It has the.
Anritsu Automation Platform (AAP) AAP PC Connects to the system via IP connection (system switch) AAP was developed to add features that were requested.
Lecture 7: Overview Microprocessors / microcontrollers.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Week1: Introduction to Computer Networks. Copyright © 2012 Cengage Learning. All rights reserved.2 Objectives 2 Describe basic computer components and.
Embedded Systems Design with Qsys and Altera Monitor Program
Using Linux with ARM Tutorial #3.
졸업 프로젝트 발표 1/74 Trinity Snapshot Boot 날 짜: 팀 명: Trinity
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Lecture 01: Computer Architecture overview. Our Goals ● Have a better understanding of computer architecture – Write better (more efficient) programs.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Introducing the Arduino Uno Presented by Dave Mawdsley, DACS Member, Linux SIG Member (wiring, programming and running a cute traffic light simulation)
TriLUG Beagle Board Overview and Demo. Beagle Board overview and demo What is a Beagle Board? What is the Beagle Board not? Why is the Beagle Board important?
By Ganesan Alagu Ganesh Feb 26, 2008
Computer System Laboratory
Chapter A - The Raspberry Pi Computer
Development Environment Introduction
UBUNTU INSTALLATION
A microcontroller Raspberry Pi 2 Model B V1.1 RPi
Raspberry Pi Pi 2 Model B.
Invent the future of small intelligent devices here.
Computer Basics.
Future Designs, Inc. Your Development Partner
Journey: Introduction to Embedded Systems
Introducing the Arduino Uno
CSCI1600: Embedded and Real Time Software
Odroid XU4.
CSCI1600: Embedded and Real Time Software
Optimizing ARM Assembly
Invent the future of small intelligent devices here.
Single Board Computers and Dev Boards
Introduction to Single Board Computer
Multiply Instructions
CON-FMC Connect any computer to FPGA through USB June 2019
What is “Control System” or “Framework”?
Raspberry Pi Hardware By: Mike Kwiatkowski.
Edge TPU Coral Dev Board: A tutorial
Presentation transcript:

Jon Stanley EE382N-4 Spring 2011

 Objectives  Tasks  Keil MCB2300 ARM7 Evaluation Board ◦ System overview ◦ Measurement setup ◦ Instruction power usage ◦ Code power comparison  Beagleboard-XM ◦ System overview ◦ Android and Ubuntu OS experience ◦ Measurement setup ◦ Code power comparison  Summary  Other notes

 Explore several points in Lecture 16 on Power Aware Computing  Characterize power of an ARM processor  Characterize energy use of code ◦ Low level (bare metal) ◦ High level (Linux OS) ◦ Coding methods

 Power and energy measurements  Software ◦ Instruction level ◦ Small routines ◦ C-code comparisons:  Delays, timer interrupts, OS scheduling ◦ Linux OS impact ◦ Optimization impact ◦ Data type size impact  Hardware ◦ Keil MCP2300 and Beagleboard-XM

 NXP LPC2387 microcontroller ◦ ARM7 processor core ◦ GPIO to LEDs, ADC I/O, etc.  uVision IDE and Flash Magic for programming  Bare metal code ◦ More accurate measure of power ◦ Can measure power of each instruction type

 Measurement setup ◦ Ammeter with uA resolution due to tiny changes in power consumption of different instructions ◦ Use good shielded probe to VBUS jumper on board ◦ Careful of current drift if instrument isn’t high quality

0loopADD R0, R0, #1 1ADD R1, R1, #1 2ADD R2, R2, #1 3ADD R3, R3, #1 4ADD R4, R4, #1 5ADD R0, R0, #1 … 999ADD R4, R4, #1 B loop  Same instruction 1000 times to minimize effect of Branch on power  Consider data hazards when writing test code

InstructionCurrent (mA) NOP41.94 MOV41.56 ADD41.59 ADD with stall41.51 ADD with LSL41.52 MOV with LSL41.57 MUL41.65 B41.05 PC Load to Jump40.86  NOP uses more power?  Stalled pipeline uses less power, but uses more energy due to longer execution time  ADD uses less power than MUL  MOV to PC uses less power than Branch

loopADD R0, R0, #1 CMP R0, #1 ADDLT R1, R1, #1 ADDEQ R1, R1, #1 ADDGT R1, R1, #1 B loop  No measurable difference at instruction level  Branch would be better when there is large amounts of code between each conditional statement to reduce execution time loopADD R0, R0, #1 CMP R0, #1 BLT jump BEQ jump jumpADD R1, R1, #1 B loop MethodCurrent (mA) Conditional42.33 Branch42.33

 C Code  LED PWM dimming  Timer interrupt PWM ◦ Interrupt handler ◦ LED control by interrupt  Delay PWM ◦ Main loop uses delays ◦ Main loop controls LED  Surprising result? ◦ Delay did not put processor in idle (like OS sleep). ◦ Tests were repeated later in Linux OS. MethodCurrent (mA) Interrupt92.31 Delay92.31

 Released in 2010  Features: ◦ TI DM3730 microcontroller  1GHz ARM Cortex-A8 core ◦ 512MB DDR ◦ Ethernet 10/100 ◦ 4-port USB ◦ RS232 ◦ Stereo audio ◦ S-video and DVI ◦ Boots from 4GB MicroSD card ◦ Comes with Angstrom Linux OS verification image ◦ Power usage is a realistic scenario of a system

 Installation files: dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android _DevKit/02_00_00/exports/AM37X.tar.gz  README is contained within the tarball  PC with Ubuntu 10 to build file system on SD card  Android boot-up and program execution was slow  Not friendly for developing code within OS

 Installation files and instructions:  Use instructions for “ Demo Image - Maverick ” ◦ Installation will take at least 4 hours ◦ Need internet connectivity - use “dhclient usb1” to get IP ◦ Note: the NetInstall method resulted in broken OS for me  PC with Ubuntu 10 to build file system on SD card  Ubuntu GUI runs faster than Android ◦ Built-in terminal and friendly for developing within OS ◦ “sudo apt-get install gcc” to install GCC compiler

 Hardware: BeagleBoard with Ubuntu ◦ Fluctuating current consumption so a DMM is not practical for an average current measurement ◦ NI cDAQ-9174 with 9227 analog current module ◦ Sample current consumption at 2kS/sec ◦ Measure average current with ~1.5 minute window ◦ Turn off user-defined LEDs to reduce noise  echo none >/sys/class/leds/beagleboard\:\:usr0/trigger  echo none >/sys/class/leds/beagleboard\:\:usr1/trigger  Software: 2 C-codes for each test ◦ First code has simple for loop for current measure ◦ Second code uses gettimeofday() and runs the same for loop 1000 times to determine average runtime

 Simple code that accumulates iteration count main() { int i,c; while(1) { for(i=0;i<10000;i++) c += i; }

Idle OS Running Test Program

 HW2 exercise – gcc creates poor asm code that performs unnecessary memory operations  Direct correlation to energy consumption  Energy = V * (I code – I IdleOS ) * T  3x decrease in energy consumption by eliminating unnecessary memory operations TestCurrent (mA) Time (us) Coulomb (mA*us) Idle OS602 For loop sum in C Optimized for loop in asm

 Coulomb usage comparison of for loop sum code using different data types for the variable “c”  Coulomb usage appears correlated to both the complexity of the library function that performs the add and size of the data type TestBytesCurrent (mA) Time (us) Coulomb (mA*us) Idle OS602 Short Integer Float Double

 Test application: ◦ Loop that writes to variable. 50% duty. ~2ms period.  Test 1: Delay ◦ Cannot depend on CPU clock period for delay timing due to OS, so poll using gettimeofday  Test 2: OS Scheduler ◦ Use usleep for timing with us resolution TestCurrent (mA) Time (us) Coulomb (mA*us) Jitter (us) MinAvgMax Idle OS598 Delay Scheduler

 Smallest data type generally lower energy  Use better compilers or check assembly code  Direct correlation between code performance and energy usage for ARM processors ◦ Beware of stalling the pipeline ◦ Look at Coulomb usage of different code approaches  Fast algorithms may use more power than slow ones but use less energy overall ◦ Memory transactions are energy expensive ◦ Use interrupts or OS scheduler instead of polling in OS  Results may not entirely hold for x86 or other processors, but these can be characterized using the methods outlined here

 Issues: ◦ Difficult to find documentation ◦ Community-oriented development ◦ Fairly new board  Processor voltage and clock is adjustable but driver library not fully merged in Ubuntu yet ◦ cpufrequtils package  Processor current consumption is accessible to software on the board via device on I2C

 Processor current consumption is accessible to software on the board ◦ Not recommended for precision gauging because 10-bit ADC resolution yields ~53mA per LSB with series resistor  Hardware details in BeagleBoard user manual  Software: ◦ hread/thread/7810fb7a93e44a4e ◦ Software is currently broken ◦ /dev/I2C-1 file access issue in Ubuntu  “sudo i2cdump 1 0x4a” in terminal returns “Device or resource busy” error  Permission conflict with OS over i2c file access?  “sudo fuser –km /dev/i2c-1” will freeze the OS if attempting to kill any processes that use i2c-1

 Current consumption comparison of various system energy saving or shutdown options accessible from the Ubuntu GUI TestCurrent (mA) Idle OS602 Blank screen598 Suspend566 Processor halted (shutdown)380

 Embedded System Power ◦ Lecture 16 – Power Aware Programming ◦ power-consumption-of-embedded-systems/30528/ ◦ ◦ http : // ◦  Keil MCB2300 ◦  Beagleboard-XM ◦ Beagleboard.org ◦ Google Groups on Beagleboard topics