Circular Buffers D 1 D.1 INTRODUCTION D.2 DECLARING CIRCULAR BUFFERS D.3 ACCESSING CIRCULAR BUFFERS
|
|
- Charles Hodges
- 5 years ago
- Views:
Transcription
1 Circular Buffers D D.1 INTRODUCTION A circular buffer is an array whose pointer wraps around to the first member of the array when the pointer is incremented past the last member. The file macros.h contains macros for using circular buffers in C. Refer to the ADSP-2106x SHARC User s Manual or ADSP User s Manual for a description of circular buffers. Also refer to Chapters 3 and 4 of this manual for descriptions of the C runtime environment and interface to assembly language. D.2 DECLARING CIRCULAR BUFFERS These macros are used to declare the circular buffer pointer and initialize registers: CIRCULAR_BUFFER(type,dag-number,) BASE(name) LENGTH(name) The pointer to the circular buffer,, must be global and also the CIRCULAR_BUFFER macro must be used in every C module that is used in the application. D.3 ACCESSING CIRCULAR BUFFERS These macros are used to access the circular buffer: CIRC_READ(, step, variable, memory) CIRC_WRITE(, step, variable, memory) CIRC_MODIFY (, step) D 1
2 D Circular Buffers D.4 CIRCULAR_BUFFER This macro creates three variables which are associated with three ADSP-21xxx registers. CIRCULAR_BUFFER(type,dag-number,) type dag-number The type (e.g. float or int ) of the array to be used as a circular buffer. The number of the data address generator register (DAG) to be used. For example, if DAG1 is used, the registers i1, b1, and l1 will be used. Available DAGs are: 0,1,2,3, and 5. The pointer to the array/circular buffer. For example: CIRCULAR_BUFFER(int,1,echo); results in: register int * echo asm( i1 ); register int _length_echo asm( l1 ); register int _base_echo asm( b1 ); D.5 BASE BASE initializes the B register to the first location of the circular buffer. Before using the BASE and LENGTH macros, an array should be declared. This array will be used as a circular buffer. For example, float circbuf[16]; BASE()=array_name; array_name The pointer to the array/circular buffer that was used in the CIRCULAR_BUFFER macro. The name of the array which will be used as a circular buffer. D 2
3 Circular Buffers D D.6 LENGTH Length initializes the L register to the size of the circular buffer. Before using the BASE and LENGTH macros, an array should be declared. This array will be used as a circular buffer. For example, float circbuf[16]; LENGTH()=length; length The pointer to the array/circular buffer that was used in the CIRCULAR_BUFFER macro. The size of the array to be used as a circular buffer. D.7 CIRC_READ Read the array/circular buffer location which is pointed to by and place the value in variable. Increment by step. CIRC_READ(, step, variable, memory ) step variable memory The pointer to the array/circular buffer. The step by which to postmodify the pointer. The variable in which the value read from the array/ circular buffer is stored. Data Memory (dm) D.8 CIRC_WRITE Write to the array/circular buffer location which is pointed to by from the value in variable. Increment by step. CIRC_WRITE(, step, variable, memory ) step variable memory The pointer to the array/circular buffer. The step to increment the pointer after the write. The variable holding the value to be written to the array/ circular buffer. Data Memory (dm) D 3
4 D Circular Buffers D.9 CIRC_MODIFY Modify the pointer to the array/circular buffer by step. Do not read or write from the array. CIRC_MODIFY(, step) The pointer to the array/circular buffer. step The step by which to modify the pointer. D.10 DEBUGGING CIRCULAR BUFFERS Since register variables are disabled by the -g switch, circular buffer assembly code will be much different than without the -g switch. Circular buffer operations when compiling with -g will be slower than without -g. D.11 CIRCULAR BUFFER EXAMPLE The following example demonstrates the use of circular buffers: /************************************************************************/ /* CIRCBUF.C */ /************************************************************************/ /* This is an echo program written entirely in C to be used */ /* with the ADSP EZ-LAB board. */ /* */ /* The echo program takes the talkthru program and adds a */ /* circular buffering scheme. The circular buffer is defined */ /* by the functions CIRCULAR_BUFFER, BASE, and LENGTH. The */ /* echo is performed by adding the current input to the oldest */ /* input. The amount of delay in the echo can be modified by */ /* changing the value of BUFF_LENGTH. */ /************************************************************************/ #include <21020.h> /* For the idle() command */ #include <signal.h> /* For the interrupt command */ #include <macros.h> /* For the CIRCULAR_BUFFER and segment functions */ #define BUFF_LENGTH 4000 CIRCULAR_BUFFER(float,1,echo); /* Define echo as 21k DAG1 reg i1 */ /* a DM pointer to a circular buffer */ D 4
5 Circular Buffers D volatile int in_port segment(hip_reg0); /* hip_reg0 and hip_reg2 are */ volatile int out_port segment(hip_reg2);/* used in architecture file */ void process_input(int); void main(void) { /* make this a variable length array. If emulator is stopped at main */ /* and _BUFF_LENGTH in dm window is modified, the delay of the echo */ /* is modified. Do not make BUFF_LENGTH greater than stack size! */ float data_buff[buff_length]; interrupt(sig_irq3, process_input); BASE(echo) = data_buff; /* Loads b1 and i1 with buff start adr */ LENGTH(echo) = BUFF_LENGTH; /* Loads L1 with the length of buffer */ /* As the array is filled, the nth location contains the newest value, */ /* while the nth+1 location contains the oldest value. */ while (1) { /* The echo sends the sum of the most */ float oldest,newest; /* recent value and the oldest value */ idle(); /* echo is pointing to the nth location after the interrupt routine. */ /* place the new value in variable newest. After the access, update */ /* the pointer by one to point at location n+1. */ CIRC_READ(echo,1,newest,dm); /* Now echo is pointing to n+1. Read the location and place value in */ /* variable oldest. Do not update the pointer, since it is now */ /* pointing to the new location for the interrupt handler */ CIRC_READ(echo,0,oldest,dm); } } /* add the oldest and most recent and send out on port */ out_port=oldest+newest; void process_input(int int_number) { /* The newest input value is written over the oldest value in the nth */ /* location and the pointer is not updated. */ /* A cast to float is necessary before writing in_port to *echo. */ CIRC_WRITE(echo, 0, (float)in_port, dm); } Listing D.1 Circular Buffer Example D 5
6 D Circular Buffers D 6
Getting Started with DSPs
CHAPTER 29 Getting Started with DSPs Once you decide that a Digital Signal Processor is right for your application, you need a way to get started. Many manufacturers will sell you a low cost evaluation
More informationThe SHARC in the C. Mike Smith
M. Smith -- The SHARC in the C Page 1 of 9 The SHARC in the C Mike Smith Department of Electrical and Computer Engineering, University of Calgary, Alberta, Canada T2N 1N4 Contact Person: M. Smith Phone:
More informationFEATURE ARTICLE. Michael Smith
In a recent project, Mike set out to develop DSP algorithms suitable for producing an improved sound stage for headphones. Using the Analog Devices 21061 SHARC, he modified the phase and amplitude of the
More informationDSP Platforms Lab (AD-SHARC) Session 05
University of Miami - Frost School of Music DSP Platforms Lab (AD-SHARC) Session 05 Description This session will be dedicated to give an introduction to the hardware architecture and assembly programming
More informationG21K C Compiler 2.1 INTRODUCTION 2.2 INVOKING G21K
G21K C Compiler 2 2.1 INTRODUCTION G21K is Analog Devices port of GCC, the Free Software Foundation s C compiler, for the ADSP-21000 family of digital signal processors. Separate versions of the compiler
More informationEngineer To Engineer Note
Engineer To Engineer Note EE-134 Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com, WEB: www.analog.com/dsp Copyright 2001, Analog Devices, Inc. All rights
More informationVisualDSP ADSP and ADSP EZ-Boards Release Notes Revision 1.0 March 25, 2010
VisualDSP++ 5.0 ADSP-21479 and ADSP-21489 EZ-Boards Release Notes Revision 1.0 March 25, 2010 Table of Contents ADSP-21479 and ADSP-21489 EZ-Boards... A-2 Installation... A-2 Identifying Your VisualDSP++
More informationWorking with the Compute Block
Tackled today Working with the Compute Block M. R. Smith, ECE University of Calgary Canada Problems with using I-ALU as an integer processor TigerSHARC processor architecture What features are available
More informationME 4447/ME Microprocessor Control of Manufacturing Systems/ Introduction to Mechatronics. Instructor: Professor Charles Ume
ME 4447/ME 6405 Microprocessor Control of Manufacturing Systems/ Introduction to Mechatronics Instructor: Professor Charles Ume Lecture on Codewarrior Integrated Development Environment Contents Overview
More informationC Programming Language. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff
C Programming Language 1 C C is better to use than assembly for embedded systems programming. You can program at a higher level of logic than in assembly, so programs are shorter and easier to understand.
More informationINDEX. Figure I-0. Listing I-0. Table I-0. Symbols.DIRECTIVE (see Assembler directives)? preprocessor operator 3-34
I INDEX Figure I-0. Listing I-0. Table I-0. Symbols.DIRECTIVE (see Assembler directives)? preprocessor operator 3-34 Numerics Assembler command-line switch -21 2-21 A Address alignment 2-39 Address of
More informationComputer Systems Lecture 9
Computer Systems Lecture 9 CPU Registers in x86 CPU status flags EFLAG: The Flag register holds the CPU status flags The status flags are separate bits in EFLAG where information on important conditions
More informationEE475 Lab #3 Fall Memory Placement and Interrupts
EE475 Lab #3 Fall 2005 Memory Placement and Interrupts In this lab you will investigate the way in which the CodeWarrior compiler and linker interact to place your compiled code and data in the memory
More informationLaboratory Exercise 7
Laboratory Exercise 7 Using Interrupts with C code The purpose of this exercise is to investigate the use of interrupts for the Nios II processor, using C code. To do this exercise you need to have a good
More informationAN HONORS UNIVERSITY IN MARYLAND UMBC. AvrX. Yousef Ebrahimi Professor Ryan Robucci
AvrX https://github.com/kororos/avrx Yousef Ebrahimi Professor Ryan Robucci Introduction AvrX is a Real Time Multitasking Kernel written for the Atmel AVR series of micro controllers. The Kernel is written
More informationPart 1: Introduction to the C Language
Part 1: Introduction to the C Language 1 Dennis Ritchie originally developed C at Bell Labs to write the UNIX operating system, 1974. C was designed to provide low level access to the hardware, which an
More informationCMPE-013/L. Introduction to C Programming
CMPE-013/L Introduction to C Programming Bryant Wenborg Mairs Spring 2014 What we will cover in 13/L Embedded C on a microcontroller Specific issues with microcontrollers Peripheral usage Reading documentation
More informationName :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70
Name :. Roll No. :..... Invigilator s Signature :.. 2011 INTRODUCTION TO PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give
More informationLecture #17 Concurrency Embedded System Engineering Philip Koopman Monday, 21-March-2016 Example application Remote Keyless Entry
Lecture #17 Concurrency 18-348 Embedded System Engineering Philip Koopman Monday, 21-March-2016 Electrical& Computer ENGINEERING Copyright 2006-2016, Philip Koopman, All Rights Reserved Example application
More informationLecture #17 Concurrency Embedded System Engineering Philip Koopman Monday, 21-March-2016
Lecture #17 Concurrency 18-348 Embedded System Engineering Philip Koopman Monday, 21-March-2016 Electrical& Computer ENGINEERING Copyright 2006-2016, Philip Koopman, All Rights Reserved Example application
More informationContext Switching & Task Scheduling
ECE3411 Fall 2015 Lab 6b. Context Switching & Task Scheduling Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut Email: {vandijk, syed.haider}@engr.uconn.edu
More informationTo add XGATE support to projects using Processor Expert for HCS12X
Perform the following steps To add XGATE support to projects using Processor Expert for HCS12X 1. Click on Files. Right click on Libraries, then click on Add Files. From this directory select ansi_xgi.lib
More informationEngineer-to-Engineer Note
Engineer-to-Engineer Note a EE-219 Technical notes on using Analog Devices DSPs, processors and development tools Contact our technical support at dsp.support@analog.com and at dsptools.support@analog.com
More information,1752'8&7,21. Figure 1-0. Table 1-0. Listing 1-0.
,1752'8&7,21 Figure 1-0. Table 1-0. Listing 1-0. The ADSP-21065L SHARC is a high-performance, 32-bit digital signal processor for communications, digital audio, and industrial instrumentation applications.
More informationTigerSHARC processor and evaluation board
Concepts tackled TigerSHARC processor and evaluation board Different capabilities Different functionality Differences between processor and evaluation board Functionality present on TigerSHARC evaluation
More informationProject #1 Exceptions and Simple System Calls
Project #1 Exceptions and Simple System Calls Introduction to Operating Systems Assigned: January 21, 2004 CSE421 Due: February 17, 2004 11:59:59 PM The first project is designed to further your understanding
More informationARM PROGRAMMING. When use assembly
ARM PROGRAMMING Bùi Quốc Bảo When use assembly Functions that cannot be implemented in C, such as special register accesses and exclusive accesses Timing-critical routines Tight memory requirements, causing
More informationInterrupts & Interrupt Service Routines (ISRs)
ECE3411 Fall 2015 Lecture 2c. Interrupts & Interrupt Service Routines (ISRs) Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut Email: vandijk,
More informationEngineer To Engineer Note
Engineer To Engineer Note EE-151 Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com, WEB: www.analog.com/dsp Copyright 2002, Analog Devices, Inc. All rights
More informationChapter 10. Programming in C
Chapter 10 Programming in C Lesson 05 Functions in C C program Consists of three parts preprocessor directives macros main function functions 3 Function Each has a name (for identity ID) May have the arguments
More informationFaculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology
Faculty of Electrical Engineering, Mathematics, and Computer Science Delft University of Technology exam Embedded Software TI2726-B January 28, 2019 13.30-15.00 This exam (6 pages) consists of 60 True/False
More informationC Programming Review CSC 4320/6320
C Programming Review CSC 4320/6320 Overview Introduction C program Structure Keywords & C Types Input & Output Arrays Functions Pointers Structures LinkedList Dynamic Memory Allocation Macro Compile &
More informationmultiple variables having the same value multiple variables having the same identifier multiple uses of the same variable
PART III : Language processing, interpretation, translation, the concept of binding, variables, name and scope, Type, l-value, r-value, reference and unnamed variables, routines, generic routines, aliasing
More informationThis section discusses resources available from Analog Devices to help you develop applications using ADSP Family digital signal processors.
Introduction This applications handbook is intended to help you get a quick start in developing DSP applications with ADSP-2000 Family digital signal processors. This chapter includes a summary of available
More informationMPLAB C1X Quick Reference Card
MPLAB C1X Quick Reference Card 34 MPLAB C17 Quick Reference MPLAB C17 Command Switches Command Description /?, /h Display help screen /D[=] Define a macro /FO= Set object file name /FE=
More informationGabriel Hugh Elkaim Spring CMPE 013/L: C Programming. CMPE 013/L: C Programming
1 2 3 CMPE 013/L and Strings Gabriel Hugh Elkaim Spring 2013 4 Definition are variables that can store many items of the same type. The individual items known as elements, are stored sequentially and are
More informationCS241 Computer Organization Spring Data Alignment
CS241 Computer Organization Spring 2015 Data Alignment 3-26 2015 Outline! Data Alignment! C: pointers to functions! Memory Layout Read: CS:APP2 Chapter 3, sections 3.8-3.9 Quiz next Thursday, April 2nd
More informationAuto-Pipe Software Block Interface v2. Interface. Contents. Auto-Pipe Types. From Auto-Pipe Wiki
Auto-Pipe Software Block Interface v2 From Auto-Pipe Wiki Contents 1 Interface 1.1 Auto-Pipe Types 1.2 AutoPipe Functions 1.3 Block Structure 1.4 Block Functions 2 Signaling 2.1 Stop Signal (type 0) 2.2
More informationTable of Figures Figure 1. High resolution PWM based DAC...2 Figure 2. Connecting the high resolution buck converter...8
HR_PWM_DAC_DRV Texas Instruments C2000 DSP System Applications Group Table of contents 1 Overview...2 2 Module Properties...2 3 Module Input and Output Definitions...3 3.1 Module inputs...3 3.2 Module
More information2 ABOUT VISUALDSP++ In This Chapter. Figure 2-0. Table 2-0. Listing 2-0.
2 ABOUT VISUALDSP++ Figure 2-0. Table 2-0. Listing 2-0. In This Chapter This chapter contains the following topics: What Is VisualDSP++? on page 2-2 VisualDSP++ Features on page 2-2 Program Development
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationQUIZ How do we implement run-time constants and. compile-time constants inside classes?
QUIZ How do we implement run-time constants and compile-time constants inside classes? Compile-time constants in classes The static keyword inside a class means there s only one instance, regardless of
More informationJump Tables A jump table is essentially a list of places in the code to jump to. This can be thought of in C as an array of function pointers. In Asse
: Some very useful data structures commonly used in embedded systems programming (Jump tables, Circular buffers, Linked lists, Stacks and queues, Memory pools) Spring 2016 : Some very useful data structures
More informationGLOSSARY. VisualDSP++ Kernel (VDK) User s Guide B-1
B GLOSSARY Application Programming Interface (API) A library of C/C++ functions and assembly macros that define VDK services. These services are essential for kernel-based application programs. The services
More informationCprE 288 Introduction to Embedded Systems Exam 1 Review. 1
CprE 288 Introduction to Embedded Systems Exam 1 Review http://class.ece.iastate.edu/cpre288 1 Overview of Today s Lecture Announcements Exam 1 Review http://class.ece.iastate.edu/cpre288 2 Announcements
More informationSection 2 Introduction to VisualDSP++
Section 2 Introduction to VisualDSP++ 2-1 a VisualDSP++ 4.0 VisualDSP++ is an integrated development environment that enables efficient management of projects. Key Features Include: Editing Building Compiler,
More informationC Refresher, Advance C, Coding Standard, Misra C Compliance & Real-time Programming
C Refresher, Advance C, Coding Standard, Misra C Compliance & Real-time Programming Course Overview This course transforms an IT-Professional or a Student into an expert C Programming Person with concepts
More information4 DATA ADDRESS GENERATORS
4 DATA ADDRESS GENERATORS Figure 4-0. Table 4-0. Listing 4-0. Overview The DSP s Data Address Generators (DAGs) generate addresses for data moves to and from Data Memory (DM) and Program Memory (PM). By
More informationCh. 3: The C in C++ - Continued -
Ch. 3: The C in C++ - Continued - QUIZ What are the 3 ways a reference can be passed to a C++ function? QUIZ True or false: References behave like constant pointers with automatic dereferencing. QUIZ What
More informationC++ for System Developers with Design Pattern
C++ for System Developers with Design Pattern Introduction: This course introduces the C++ language for use on real time and embedded applications. The first part of the course focuses on the language
More information3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0.
3 TUTORIAL Figure 1-0. Table 1-0. Listing 1-0. In This Chapter This chapter contains the following topics: Overview on page 3-2 Exercise One: Building and Running a C Program on page 3-4 Exercise Two:
More informationCS 4201 Compilers 2014/2015 Handout: Lab 1
CS 4201 Compilers 2014/2015 Handout: Lab 1 Lab Content: - What is compiler? - What is compilation? - Features of compiler - Compiler structure - Phases of compiler - Programs related to compilers - Some
More informationLecture test next week
Lecture test next week Write a short program in Assembler doing. You will be given the print outs of all the assembler programs from the manual You can bring any notes you want Today: Announcements General
More informationOutline: System Development and Programming with the ADSP-TS101 (TigerSHARC)
Course Name: Course Number: Course Description: Goals/Objectives: Pre-requisites: Target Audience: Target Duration: System Development and Programming with the ADSP-TS101 (TigerSHARC) This is a practical
More informationECS 142 Project: Code generation hints
ECS 142 Project: Code generation hints Winter 2011 1 Overview This document provides hints for the code generation phase of the project. I have written this in a rather informal way. However, you should
More informationProgramming Model 12.1 OVERVIEW 12 1
Programming Model 12 12.1 OVERVIEW From a programming standpoint, the ADSP-21xx processors consist of three computational units, two data address generators, and a program sequencer, plus on-chip peripherals
More informationEngineer To Engineer Note
Engineer To Engineer Note EE-2 Using ADSP-218x I/O Space Last modified 11/08/96 Introduction Digital Signal Processors (DSPs) are often chosen by designers performing arithmetic operations on binary data.
More informationEngineering Design Lab exercise 2 Nios II Processor Software Development
Engineering Design Lab exercise 2 Nios II Processor Software Development Note: To do this lab exercise you need the textbook and it s CD. Part 1 Designing systems with embedded processors requires both
More informationHomework #3 CS2255 Fall 2012
Homework #3 CS2255 Fall 2012 MULTIPLE CHOICE 1. The, also known as the address operator, returns the memory address of a variable. a. asterisk ( * ) b. ampersand ( & ) c. percent sign (%) d. exclamation
More informationC Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:
C Programming Code: MBD101 Duration: 10 Hours Prerequisites: You are a computer science Professional/ graduate student You can execute Linux/UNIX commands You know how to use a text-editing tool You should
More informationBringing Organization to our Code (the shared-data problem)
Bringing Organization to our Code (the shared-data problem) Reference: An Embedded Software Primer By David E Simon (two copies in lab for checkout) Figure 44 Classic Shared-Data Problem Static int itemperatures[2];
More informationTechnical Questions. Q 1) What are the key features in C programming language?
Technical Questions Q 1) What are the key features in C programming language? Portability Platform independent language. Modularity Possibility to break down large programs into small modules. Flexibility
More informationtype arrayname [ size type arrayname [ size ] = { item ,, item size size
CMPE-3/L and Strings Gabriel Hugh Elkaim Winter 24 Definition are variables that can store many items of the same type. The individual items known as elements, are stored sequentially and are uniquely
More informationLecture 2: C Programming Basic
ECE342 Introduction to Embedded Systems Lecture 2: C Programming Basic Ying Tang Electrical and Computer Engineering Rowan University 1 Facts about C C was developed in 1972 in order to write the UNIX
More informationSMS045 - DSP Systems in Practice. Lab 2 - ADSP-2181 EZ-KIT Lite and VisualDSP++ Due date: Tuesday Nov 18, 2003
SMS045 - DSP Systems in Practice Lab 2 - ADSP-2181 EZ-KIT Lite and VisualDSP++ Due date: Tuesday Nov 18, 2003 Lab Purpose This lab will introduce the ADSP-2181 EZ-KIT Lite development board for the Analog
More informationIntroduction ADSP-2100 FAMILY OF PROCESSORS
Introduction 1 1.1 OVERVIEW This book presents a compilation of routines for a variety of common digital signal processing applications based on the ADSP-2100 DSP microprocessor family. These routines
More informationC Programming Language
C Programming Language Advantages over assembly language for microcontrollers: More portable Math functions Readability Maintainability Editing C End-of-line ignored Use line breaks/tabs/indent for readability
More informationUsing HAL Device Drivers with the Altera Monitor Program. 1 Introduction. For Quartus II 13.1
Using HAL Device Drivers with the Altera Monitor Program For Quartus II 13.1 1 Introduction This tutorial shows how to develop C programs that use device driver functions for the I/O devices in a Nios
More informationesi-risc Development Suite Getting Started Guide
1 Contents 1 Contents 2 2 Overview 3 3 Starting the Integrated Development Environment 4 4 Hello World Tutorial 5 5 Next Steps 8 6 Support 10 Version 2.5 2 of 10 2011 EnSilica Ltd, All Rights Reserved
More informationCOMP 7860 Embedded Real- Time Systems: Threads
COMP 7860 Embedded Real- Time Systems: Threads Jacky Baltes Autonomous Agents Lab University of Manitoba Winnipeg, Canada R3T 2N2 Email: jacky@cs.umanitoba.ca WWW: http://www.cs.umanitoba.ca/~jacky http://aalab.cs.umanitoba.ca
More informationME 4447/6405 Introduction to Mechatronics Instructor: Professor Charles Ume
ME 4447/6405 Introduction to Mechatronics Instructor: Professor Charles Ume Lecture on Codewarrior Integrated Development Environment Contents Overview of C Compliers for HCS12 CodeWarrior Pointers Interrupts
More informationLectures 5-6: Introduction to C
Lectures 5-6: Introduction to C Motivation: C is both a high and a low-level language Very useful for systems programming Faster than Java This intro assumes knowledge of Java Focus is on differences Most
More informationWriting an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and
Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and #include The Use of printf() and scanf() The Use of printf()
More informationFigure 4.4: code example. 4.3: The shared data problem. Figure 4.4: analysis. Fig 4.4: observations. Figure 4.5: Does this fix problem?
4.3: The shared data problem Inconsistency in data used by a task and updated by an ISR; arises because ISR runs at just the wrong time. Data is often shared because it is undesirable to have ISRs do all
More information),17(558379(&725 $''5(66(6
),17(558379(&725 $''5(66(6 Figure F-0. Table F-0. Listing F-0. Table F-1 lists all processor interrupts according to their bit position in the IRPTL and IMASK registers. Four memory locations separate
More information,$5$SSOLFDWLRQ1RWH$95 (IILFLHQWSURJUDPPLQJRI$WPHO V $95 PLFURFRQWUROOHUV
,$5$SSOLFDWLRQ1RWH$95 (IILFLHQWSURJUDPPLQJRI$WPHO V $95 PLFURFRQWUROOHUV 6XPPDU\ This application note provides some useful hints on how to program the Atmel AVR microcontrollers using the IAR Compiler.
More informationAMCAT Automata Coding Sample Questions And Answers
1) Find the syntax error in the below code without modifying the logic. #include int main() float x = 1.1; switch (x) case 1: printf( Choice is 1 ); default: printf( Invalid choice ); return
More informationAdministrivia. ECE/CS 5780/6780: Embedded System Design. FIFO with Infinite Memory. Introduction to FIFOs
Administrivia ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 9: FIFOs CodeWarrior IDE compiler optimization configuration. No labs are scheduled next week. Please contact your TA if you
More informationProgramming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan
Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah Lecturer Department of Computer Science & IT University of Balochistan 1 Outline p Introduction p Program development p C language and beginning with
More informationADSP-2100A DSP microprocessor with off-chip Harvard architecture. ADSP-2101 DSP microcomputer with on-chip program and data memory
Introduction. OVERVIEW This book is the second volume of digital signal processing applications based on the ADSP-00 DSP microprocessor family. It contains a compilation of routines for a variety of common
More informationEW The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually.
EW 25462 The Source Browser might fail to start data collection properly in large projects until the Source Browser window is opened manually. EW 25460 Some objects of a struct/union type defined with
More informationSimple Experiments Involving External Control of Algorithm Parameters for an EET Undergraduate DSP Course
Simple Experiments Involving External Control of Algorithm Parameters for an EET Undergraduate DSP Course Anthony J A Oxtoby, Gerard N Foster Purdue University, West Lafayette/Kokomo Session 2649 Abstract
More informationSoumava Ghosh The University of Texas at Austin
Soumava Ghosh The University of Texas at Austin Agenda Overview of programs that perform I/O Linking, loading and the x86 model Modifying programs to perform I/O on the x86 model Interpreting and loading
More informationCS 3803 Lab 6 Interrupts Assigned 2/25/10 Point Value: 30
CS 3803 Lab 6 Interrupts Assigned 2/25/10 Point Value: 30 Purpose Interrupts are crucial to an operating system. They are used to get status and data from the timer, keyboard, and disk drives to mention
More informationReal Time Embedded Systems. Lecture 10 January 31, 2012 Interrupts
Interrupts Real Time Embedded Systems www.atomicrhubarb.com/embedded Lecture 10 January 31, 2012 Interrupts Section Topic Where in the books Catsoulis chapter 1 (pg 10-12) Simon chapter4 Zilog UM197 (ZNEO
More informationTechnical Note (8 & 16-bits) TN 234
Porting Applications from Cosmic to CodeWarrior Introduction This application node describes how to port HC08 and HC12 applications written for Cosmic compiler to CodeWarrior. Strict ANSI-C/C++ code can
More informationHOW TO DIVIDE BOOT AND FLASH AREAS
HOW TO DIVIDE BOOT AND FLASH AREAS CC-RL C COMPILER FOR RL78 FAMILY Oct 10, 2016 Rev. 2.00 Software Product Marketing Department, Software Business Division Renesas System Design Co., Ltd. R20UT3475EJ0200
More informationWhy Pointers. Pointers. Pointer Declaration. Two Pointer Operators. What Are Pointers? Memory address POINTERVariable Contents ...
Why Pointers Pointers They provide the means by which functions can modify arguments in the calling function. They support dynamic memory allocation. They provide support for dynamic data structures, such
More informationSummer 2003 Lecture 14 07/02/03
Summer 2003 Lecture 14 07/02/03 LAB 6 Lab 6 involves interfacing to the IBM PC parallel port Use the material on wwwbeyondlogicorg for reference This lab requires the use of a Digilab board Everyone should
More informationLectures 5-6: Introduction to C
Lectures 5-6: Introduction to C Motivation: C is both a high and a low-level language Very useful for systems programming Faster than Java This intro assumes knowledge of Java Focus is on differences Most
More informationFunctions. Lab 4. Introduction: A function : is a collection of statements that are grouped together to perform an operation.
Lab 4 Functions Introduction: A function : is a collection of statements that are grouped together to perform an operation. The following is its format: type name ( parameter1, parameter2,...) { statements
More informationIntroduction to Mechatronics
ME 6405 Introduction to Mechatronics Fall 2004 Instructor: Professor Charles Ume Lecture on Introl C compiler Contents Overview of C compliers for HC11 Overview of Introl CODE Introl CODE Project Project
More informationEL6483: Brief Overview of C Programming Language
EL6483: Brief Overview of C Programming Language EL6483 Spring 2016 EL6483 EL6483: Brief Overview of C Programming Language Spring 2016 1 / 30 Preprocessor macros, Syntax for comments Macro definitions
More informationWhy VC++ instead of Dev C++?
Why VC++ instead of Dev C++? I love UNIX! I am proficient in UNIX! I like public domain open source software. I love GPL. I was more confident in GCC than in Microsoft C. But! The software business has
More informationFixed-Point Math and Other Optimizations
Fixed-Point Math and Other Optimizations Embedded Systems 8-1 Fixed Point Math Why and How Floating point is too slow and integers truncate the data Floating point subroutines: slower than native, overhead
More informationAbout this Module. Users Will See an Example Demonstrating Zero Effort Optimization by Using Built-In Optimizer and Cache.
About this Module This Module Describes the Basic Software Build Process of VisualDSP++, Specific Blackfin Programming Gotchas, and Basic Code Optimization Strategies. Users Will See an Example Demonstrating
More informationNIOS Interrupts. Interrupts
Interrupts 2 Options for dealing with interrupts Internal Interrupt Controller IIC External Interrupt Controller - EIC The IIC has two versions Legacy API Enhanced API 2 tj On an interrupt or exception
More informationRun-Time Data Structures
Run-Time Data Structures Static Structures For static structures, a fixed address is used throughout execution. This is the oldest and simplest memory organization. In current compilers, it is used for:
More informationG GLOSSARY. Terms. Figure G-0. Table G-0. Listing G-0.
G GLOSSARY Figure G-0. Table G-0. Listing G-0. Terms Autobuffering Unit (ABU). (See I/O processor and DMA) Arithmetic Logic Unit (ALU). This part of a processing element performs arithmetic and logic operations
More informationLecture 3. Variables. Variables
Lecture 3 Variables Variables Data processed by programs are input from keyboard by user, are read from the storage medium or are obtained by evaluating expressions. For this purpose it is necessary to
More information