Multi-threaded projects Services and Drivers Alternate ways of doing Labs 1, 2, 3 and 4.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

All of Lab. 4 using Services Audio, LED, GPIO, LightSensor, Thermal Sensors, LCD Code by A. Tran / M. Smith Talk by M. Smith with slides from D. Lannigan.
Real-time Systems Lab, Computer Science and Engineering, ASU Please Standby Galileo Tech Talk at ASU Will Begin Shortly.
A look at interrupts What are interrupts and why are they needed.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Blackfin BF533 EZ-KIT Control The O in I/O Activating a FLASH memory “output line” Part 2.
Lab 3 Details. Lab 3 Develop a bio-feedback system based on a PWM (pulse width modulated) thermal sensor Use temperature setting to control the delays.
Boot Issues Processor comparison TigerSHARC multi-processor system Blackfin single-core.
Thermal arm-wrestling Design of a video game using two programmable flags (PF) interrupts Tutorial on handling 2 Hardware interrupts from an external device.
Lab. 2 – More details – Tasks 4 to 6 1. What concepts are you expected to understand after the Lab. 2 is finished? 2. How do you demonstrate that you have.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
A look at interrupts What are interrupts and why are they needed in an embedded system? Equally as important – how are these ideas handled on the Blackfin.
Engineering H193 - Team Project Gateway Engineering Education Coalition P. 1 Spring Quarter 2008 Robot Programming Tips Week 4 Day 2 By Matt Gates and.
1 Color Discriminating Tracking System Lloyd Rochester Sam Duncan Ben Schulz Fernando Valentiner.
A look at interrupts What are interrupts and why are they needed.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Just enough information to program a Blackfin Familiarization assignment for the Analog Devices’ VisualDSP++ Integrated Development Environment.
7/14/20151 Introduction toVisual DSP Kernel VDK for Multi-threaded environment ENCM491 – Real Time (in 1 hour) M. Smith, Electrical and Computer Engineering,
SM3121 Software Technology Mark Green School of Creative Media.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Tutorial Essentially all the Blackfin instruction you need for all of ENCM511. The instructions are easy. Its knowing when to use them that is the difficult.
HD44780 LCD programming From the Hardware Side
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
1 RoboSapien Based Autonomous Humanoid Robot Researched and Presented by Nick Repka.
Peripherals and their Control An overview of industrially available “peripheral devices” that use “pulse-width modulation” for information passing. Review.
Using Analog Devices’ Blackfin for Embedded Processing Diana Franklin and John Seng.
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Live Action First Person Shooter Game Patrick Judd Ian Katsuno Bao Le.
 Introduction to Operating System Introduction to Operating System  Types Of An Operating System Types Of An Operating System  Single User Single User.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Over-view of Lab. 1 See the Lab. 1 web-site and later lecture notes for more details.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
INTRODUCTION SOFTWARE HARDWARE DIFFERENCE BETWEEN THE S/W AND H/W.
The System Services way of doing Lab. 2 Task 8. What was Lab. 2 zActivate EBIU, Flash memory, Flash LED, GPIO flags zConnect light sensor to PF11 zEach.
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system Manual control of RC car.
Moving Arrays -- 1 Completion of ideas needed for a general and complete program Final concepts needed for Final Review for Final – Loop efficiency.
Support Across The Board ™ Visual DSP Kernel (VDK)
Lab. 2 Overview. Echo Switches to LED Lab1 Task 7 12/4/2015 TDD-Core Timer Library, Copyright M. Smith, ECE, University of Calgary, Canada 2 / 28.
Over-view of Lab. 1 See the Lab. 1 web-site and the lecture notes for more details.
By Noordiana Kasim. MODERN I/O DEVICES 1. PRINTER 2. MONITOR 3. KEYBOARD 4. AUDIO SPEAKER 5. DVD DRIVE.
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
“Lab. 5” – Updating Lab. 3 to use DMA Test we understand DMA by using some simple memory to memory DMA Make life more interesting, since hardware is involved,
Over-view of Lab. 1 See the Lab. 1 web-site and latter lecture notes for more details.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Developing Tasks to use with a co-operative scheduler Ideas for Assignment 2 Lab. 2, 3 and 4 Review for Midterm on Lab. 2 Ideas of defects, errors and.
An operating system (OS) is a collection of system programs that together control the operation of a computer system.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Case Study #1 Microcontroller System. What is a microcontroller? A microcontroller can be considered a self-contained system with a processor, memory.
See the Lab. 1 web-site and later lecture notes for more details
VDK Concepts and Features How to Create a Project with VDK support
Lab. 2 Overview – Earlier Tasks Prelaboratory T1, T3, T4 and T5
Thermal arm-wrestling
TigerSHARC processor and evaluation board
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Thermal arm-wrestling
Single Value Processing Multi-Threaded Process
See the Lab. 1 web-site and later lecture notes for more details
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
HD44780 LCD programming From the Hardware Side
EE 472 – Embedded Systems Dr. Shwetak Patel.
Lab. 1 – GPIO Pin control Using information ENEL353 and ENCM369 text books combined with Blackfin DATA manual.
VDK Concepts and Features How to Create a Project with VDK support
Lab. 2 Overview Move the tasks you developed in Lab. 1 into the more controllable TTCOS operating system.
Thermal arm-wrestling
VDK Concepts and Features How to Create a Project with VDK support
Embedded System Development Lecture 12 4/4/2007
Presentation transcript:

Multi-threaded projects Services and Drivers Alternate ways of doing Labs 1, 2, 3 and 4.

ENCM415 – “Ideal” final project zPlans for a “complete” Lab. 4 yRun the audio input and output (Lab. 0) yReading the light sensor (Lab. 2) yReading the thermal sensor (Lab. 3) yDisplaying values in the Flash LED (Lab. 1) yDisplaying values on the external LCD screen over the SPI interface (Lab. 4) yUsing interrupts (Labs. 2, 3 and 4) yControl that robot car (Lab. 17) and plane (Lab ) yDo-able with knowledge we already have ySpend 40 hours to complete – is there a simpler way 12/7/20152 / 28

A simpler way zSome teams prefer to use development approaches essentially equivalent to what we have done in Labs 1, 2 and 3 zBecomes easier with practice, but does not come easy. zOther teams are using “prepared” code from the manufacturer. yThreads yServices and Drivers yReliability issues “forcing” manufacturers to ensure “prepared code” works well 12/7/20153 / 28

Doing Lab. 4 project in industry zWe might not develop a final “.dxe” executable zWe might get each task to run by its self zThen add each task as a “thread” inside a multi- threaded operating system. zThe processor (using core timer interrupts) would automatically switch between tasks as each data became available zEasier to integrate new Lab. with the previous labs z Straight forward to do with Analog Devices VDK – Visual DSP Kernel, uCLinux, uC-OS etc etc 12/7/20154 / 28

12/7/2015 Initialization Thread

12/7/20156 / 45 Main Thread – example Each Lab. 4 task has its own thread function which replaces the sleep While task “pends” (wait till ready), it automatically gets switched out of the processor

12/7/20157 / 45 VDK History shows tasks switched out when they have to wait Concept of task priority

Would VDK make 415 easier zNO, using VDK would make 415 harder as you have another interface to learn yHow do you debug a function (LED display) when the function works with one thread and not with another? yAnswer – with great difficulty zBut learning VDK would make the ENCM491 (real time) and ENCM515 (DSP architectures) easier to learn as you could cut 6 weeks out of each class because of the extra 6 weeks needed in ENCM415 (a saving of 6 weeks). 12/7/20158 / 28

Would threads make industry easier? zPROBABLY NOT, using threads the first time makes the project harder, you have another interface to learn zHowever “PROVIDED” the real-time operating system is “inexpensive” and “reliable” you have a common interface that many developers on your team can all use. Product is shorter time and lower cost zHowever, many developers don’t want to use “commercial” OS as “too slow”, “too difficult to customize” for the product. They would rather use the techniques you have used in ENCM415. zAlso, using threads only changes about 20% of the code you have to develop. Basically all you have is better “while loops” and “easier semaphores” and”messaging” 12/7/20159 / 28

System Services zMuch of this presentation is based on Analog Devices on-line Blackfin training by David Lannigan at my.analog.com/onlinetraining/Static/BOLDList.html There are audio and video presentations on Blackfin® Device Drivers (May 2006) Blackfin System Services (Jan. 2006) Introduction to VDK (Sept. 2006) It is recommended that users have some understanding of the Blackfin architecture, basic knowledge of software terminology and experience in embedded systems. Meaning have taken ENCM415 12/7/ / 28

12/7/ / 28

Would system services help in ENCM415? zFor Labs. 1, 2 and 3 – No yYou have to know the sort of thing that is supposed to happen with the hardware in some very simple cases (Flash memory, GPIO, LEDs) yHow do you start an interrupt? yHow do you build an interrupt service routine? yHow can you build a fast ISR in assembly code? 12/7/ / 28

Would system services help in Lab. 4? zSystem services provide you all the functions that you developed in Labs. 1, 2 and 3 for GPIO etc zIf the services are simple to learn how to use for GPIO control, then perhaps we can quickly get it to work for the SPI interface. zAnalog Devices has just recently updated their “services” software, so using services has potential 12/7/ / 28

Proposed Lab. 4 – Demo-based zDemonstrate in class using services to do Labs. 1 and 2 z50% -- Connect LCD screen to logic lab and switches. Place commands in an array. Manually (using switches) send commands to LCD screen to show “Happy 415 Christmas” z30% -- Demonstrate Lab. 4 Temperature and Light sensor using – You will need to add a modified “CalculateTemperature( )” from Lab. 3 and the PF9 service z20% -- Add a “SPI SERVICE” to transfer the commands from the Blackfin to the LCD 12/7/ / 28

12/7/ / 28 All true, the third time you try using it However, that’s what you do in an industrial environment

12/7/ / 28 All the non-hardware stuff from Lab. 1, 2 and 3 stays the same VDK All the hardware stuff from Lab. 1, 2 and 3 – “better?”

12/7/ / 28

12/7/ / 28 Powerful – once we know how to use it

Lots of new syntax to learn 12/7/ / 28

Something related to Lab. 2 12/7/ / 28

Some of these functions are recognizable 12/7/ / 28

12/7/ / 28

Interrupt handler hidden 12/7/ / 28

But there is much to learn 12/7/ / 28

Service for fast memory transfer 12/7/ / 28

12/7/ / 28

Sounds like Lab. 2 12/7/ / 28

12/7/ / 28

Many functions recognizable 12/7/ / 28

12/7/ / 28

Perhaps try for Lab. 4 12/7/ / 28