1 - Threads, Systems and Services

1 - Threads, Systems and Services

Multi-threaded projects Services and Drivers Alternate ways of doing Labs 1, 2, 3 and 4. ENCM415 Ideal final project Plans for a complete Lab. 4

02/06/20

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 2 / 28 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 02/06/20 3 / 28 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 02/06/20 4 / 28 Initialization Thread

02/06/20 Main Thread example While task pends (wait till ready), it automatically gets switched out of the processor 02/06/20

Each Lab. 4 task has its own thread function which replaces the sleep 6 / 45 VDK History shows tasks switched out when they have to wait 02/06/20 Concept of task priority

7 / 45 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). 02/06/20 8 / 28

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 02/06/20 9 / 28

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 02/06/20 10 / 28 02/06/20 11 / 28

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? 02/06/20 12 / 28 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 02/06/20

13 / 28 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 02/06/20 14 / 28

All true, the third time you try using it However, thats what you do in an industrial environment 02/06/20 15 / 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?

02/06/20 16 / 28 02/06/20 17 / 28 Powerful once we know how to use it 02/06/20

18 / 28 Lots of new syntax to learn 02/06/20 19 / 28 Something related to Lab. 2

02/06/20 20 / 28 Some of these functions are recognizable 02/06/20 21 / 28

02/06/20 22 / 28 Interrupt handler hidden 02/06/20 23 / 28

But there is much to learn 02/06/20 24 / 28 Service for fast memory transfer 02/06/20

25 / 28 02/06/20 26 / 28 Sounds like Lab. 2 02/06/20

27 / 28 02/06/20 28 / 28 Many functions recognizable 02/06/20

29 / 28 02/06/20 30 / 28 Perhaps try for Lab. 4 02/06/20

31 / 28

Recently Viewed Presentations

  • Bastrop Complex 2011 VETERINARY EMERGENCY TEAM (V.E.T.) HISTORY

    Bastrop Complex 2011 VETERINARY EMERGENCY TEAM (V.E.T.) HISTORY

    4. Once treated and recovered from sedation or anesthesia, Animal Control would transport the injured animals to the Austin Humane Society and the uninjured to the Bastrop Animal Shelter. Once at the Austin Humane Society, they took pictures of every...
  • Ancient Rome & The Origin of Christianity

    Ancient Rome & The Origin of Christianity

    Peak of Rome's power 27 B.C. to 180 A.D. Period known as the PaxRomana or "Roman Peace" Population of 60-80 million with 1 million in the city of Rome. Rome held together through efficient means of government started by Augustus...
  • Bcherausstellung und Plakateausstellung Expoziie de cri i expoziie

    Bcherausstellung und Plakateausstellung Expoziie de cri i expoziie

    Bücherausstellung und Plakateausstellung Expoziţie de cărţi şi expoziţie de placate „Mit dem Rucksack bei der Deutscholympiade" „Cu rucsacul de cărţi la olimpiada de germană"
  • Data Management: Does changing

    Data Management: Does changing

    Ex-ante vs. Ex-post Liquidity. In the model, households use liquid securities to insure against liquidity events but they are aware ex-ante that shadow money ceases to be liquid in a crash:. L(t) = m(t) +s(t) [1-dJ(t)] Pre-crisis, however, shadow banking...
  • Sample Slides - Woodland Park Zoo

    Sample Slides - Woodland Park Zoo

    Arthropod diversity is a function of: Small size = infinitely more niches available. Advantages of exoskeleton - prevents water loss, provides protection, allows for muscle attachment, and forms legs and wings for locomotion
  • Chapter 7: Cell Structure and Function

    Chapter 7: Cell Structure and Function

    Create a chart that matches the part of a factory to an organelle (this is an analogy!) Use the handout BEFORE you draw on your poster. Labeled and colored cell drawing from handout. Flowchart (question 9) See Figure 7.11 on...
  • Unit D - Living Systems Chapter 1 The biosphere of Life

    Unit D - Living Systems Chapter 1 The biosphere of Life

    Unit D - Living Systems Chapter 1 The biosphere of Life Section 1.4 Conducting a field study Summary of Terms Field Study Purpose of a Field Study Purpose: to examine abiotic and biotic factors to collect qualitative and quantitative data...
  • Social Studies Connecting Themes - thomas.k12.ga.us

    Social Studies Connecting Themes - thomas.k12.ga.us

    Social Studies Connecting Themes Enduring Understandings Conflict and Change When conflict arises between or within societies, change is the result Distribution of Power Distribution of power in government is a product of existing documents and laws combined with a contemporary...