Multi-threaded projects Services and Drivers - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Multi-threaded projects Services and Drivers

Description:

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

Number of Views:59
Avg rating:3.0/5.0
Slides: 32
Provided by: MR22290
Category:

less

Transcript and Presenter's Notes

Title: Multi-threaded projects Services and Drivers


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

2
ENCM415 Ideal final project
  • Plans for a complete Lab. 4
  • Run the audio input and output (Lab. 0)
  • Reading the light sensor (Lab. 2)
  • Reading the thermal sensor (Lab. 3)
  • Displaying values in the Flash LED (Lab. 1)
  • Displaying values on the external LCD screen over
    the SPI interface (Lab. 4)
  • Using interrupts (Labs. 2, 3 and 4)
  • Control that robot car (Lab. 17) and plane (Lab.
    22000)
  • Do-able with knowledge we already have
  • Spend 40 hours to complete is there a simpler
    way

3
A simpler way
  • Some teams prefer to use development approaches
    essentially equivalent to what we have done in
    Labs 1, 2 and 3
  • Becomes easier with practice, but does not come
    easy.
  • Other teams are using prepared code from the
    manufacturer.
  • Threads
  • Services and Drivers
  • Reliability issues forcing manufacturers to
    ensure prepared code works well

4
Doing Lab. 4 project in industry
  • We might not develop a final .dxe executable
  • We might get each task to run by its self
  • Then add each task as a thread inside a
    multi-threaded operating system.
  • The processor (using core timer interrupts) would
    automatically switch between tasks as each data
    became available
  • Easier to integrate new Lab. with the previous
    labs
  • Straight forward to do with Analog Devices VDK
    Visual DSP Kernel, uCLinux, uC-OS etc etc

5
Initialization Thread
6
Main Thread example
While task pends (wait till ready), it
automatically gets switched out of the processor
Each Lab. 4 task has its own threadfunction
which replaces the sleep
7
VDK History shows tasks switched out when they
have to wait
Concept of task priority
8
Would VDK make 415 easier
  • NO, using VDK would make 415 harder as you have
    another interface to learn
  • How do you debug a function (LED display) when
    the function works with one thread and not with
    another?
  • Answer with great difficulty
  • But 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).

9
Would threads make industry easier?
  • PROBABLY NOT, using threads the first time makes
    the project harder, you have another interface to
    learn
  • However 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
  • However, many developers dont 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.
  • Also, using threads only changes about 20 of the
    code you have to develop. Basically all you have
    is better while loops and easier semaphores
    andmessaging

10
System Services
  • Much 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

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

13
Would system services help in Lab. 4?
  • System services provide you all the functions
    that you developed in Labs. 1, 2 and 3 for GPIO
    etc
  • If 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.
  • Analog Devices has just recently updated their
    services software, so using services has
    potential

14
Proposed Lab. 4 Demo-based
  • Demonstrate in class using services to do Labs. 1
    and 2
  • 50 -- 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
  • 30 -- Demonstrate Lab. 4 Temperature and Light
    sensor using You will need to add a modified
    CalculateTemperature( ) from Lab. 3 and the PF9
    service
  • 20 -- Add a SPI SERVICE to transfer the
    commands from the Blackfin to the LCD

15
All true, the third timeyou try using
it However, thats what you do inan industrial
environment
16
VDK
All the non-hardwarestuff from Lab. 1, 2 and3
stays the same
All the hardwarestuff from Lab. 1, 2 and3
better?
17
(No Transcript)
18
Powerful once we know how to use it
19
Lots of new syntax to learn
20
Something related to Lab. 2
21
Some of these functions are recognizable
22
(No Transcript)
23
Interrupt handler hidden
24
But there is much to learn
25
Service for fast memory transfer
26
(No Transcript)
27
Sounds like Lab. 2
28
(No Transcript)
29
Many functions recognizable
30
(No Transcript)
31
Perhaps try for Lab. 4
Write a Comment
User Comments (0)
About PowerShow.com