EE 345S Real-Time Digital Signal Processing Lab Fall 2008 Lab #3 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6713 DSP.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

I/O Organization popo.
Chapter 5 Enhanced Direct Memory Access (EDMA). Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004 Chapter 5, Slide 2 Learning Objectives.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Computer System Overview
Instructor: Dr Aleksandar Milenkovic Lecture Notes
CS-334: Computer Architecture
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Interrupts (contd..) Multiple I/O devices may be connected to the processor and the memory via a bus. Some or all of these devices may be capable of generating.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
6-1 I/O Methods I/O – Transfer of data between memory of the system and the I/O device Most devices operate asynchronously from the CPU Most methods involve.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
1 Computer System Overview OS-1 Course AA
1 CSIT431 Introduction to Operating Systems Welcome to CSIT431 Introduction to Operating Systems In this course we learn about the design and structure.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Input / Output CS 537 – Introduction to Operating Systems.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
EE 445S Real-Time Digital Signal Processing Lab Fall 2013 Lab #2 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6748 DSP.
EDMA3 Keystone SoC Devices
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
EE 445S Real-Time Digital Signal Processing Lab Fall 2011 Lab #2 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6713 DSP.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Direct Memory Access Module MTT M DIRECT MEMORY ACCESS MODULE (DMA)
1 DSP handling of Video sources and Etherenet data flow Supervisor: Moni Orbach Students: Reuven Yogev Raviv Zehurai Technion – Israel Institute of Technology.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Module Introduction Purpose  This training module provides an overview of the peripherals.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
EDMA3, QDMA and IDMA for the Keystone Platform
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Lecture 1: Review of Computer Organization
IT3002 Computer Architecture
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
EE 345S Real-Time Digital Signal Processing Lab Fall 2007 Lab #2 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6713 DSP.
1 load [2], [9] Transfer contents of memory location 9 to memory location 2. Illegal instruction.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
MPC8360 Micro Controllers Lab 7 - DMA Fall , 2010.
Interrupts In 8085 and 8086.
Programmable Interval Timer
EE 445S Real-Time Digital Signal Processing Lab Spring 2017
Interfacing Memory Interfacing.
Subject Name: Digital Signal Processing Algorithms & Architecture
The TMS320C6x Family of DSPs
Computer System Overview
8237 DMA CONTROLLER.
EE 445S Real-Time Digital Signal Processing Lab Fall 2013
Chapter 5 Enhanced Direct Memory Access (EDMA)
CPE 323 Introduction to Embedded Computer Systems: DMA Controller
Channel Sorting with the EDMA
8237 DMA CONTROLLER.
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
EE 345S Real-Time Digital Signal Processing Lab Fall 2007
Presentation transcript:

EE 345S Real-Time Digital Signal Processing Lab Fall 2008 Lab #3 Generating a Sine Wave Using the Hardware & Software Tools for the TI TMS320C6713 DSP (Continued) Wael Barakat

2 Outline Outputting Using Direct Memory Access (DMA) Sine Wave Generation Using Difference Equation

3 DMA In polling and interrupts methods, usage of sin(.) function repeatedly consumes CPU cycles, which is computationally inefficient. Solution: Use EDMA capabilities of the C6713 to read samples from a pre-computed table and load them into a McBSP DXR for transmission to a codec.

4 EDMA Idea is that, with EDMA, CPU can initiate data transfer and do other operations while transfer is in progress. More efficient than using regular I/O which keeps CPU occupied during entire transfer. EDMA controller:  Handles all data transfers between L2 cache and peripherals.  Can move data to and from any addressable memory spaces (internal memory, external memory and peripherals) independently of CPU operations.

5 EDMA Features Has 16 channels that can be assigned priorities. Data transfers can be initiated by CPU or events. Transfers can be 8-bit bytes, 16-bit half-words, or 32-bit words. Can transfer 2-dimensional data blocks. When an event occurs its transfer parameters are read from the Parameters RAM (PaRAM) and then sent to the address generation hardware.

6 EDMA Features After an element transfer, addresses at source/destination can stay the same, get incremented or decremented. After a programmed transfer, EDMA can continue transfers by linking to another transfer programmed in the PaRAM for same channel, or chaining to a transfer for another channel Can generate transfer completion interrupts to the CPU along with a transfer complete code, for it to take desired action based on that code. EDMA has a Quick DMA mode (QDMA) for quick, one- time transfers.

7 DMA Each of the 16 channels has a default event (on peripheral devices) associated with it which triggers the data transfer. User can change mapping by modifying EDMA Event Select registers ESEL0, ESEL1 and ESEL3.

8 DMA Event Processing Registers:  Event Register (ER): when event n occurs, bit n of ER is set.  Event Enable Register (EER): setting bit n of EER enables processing of that event.  Event Clear Register (ECR): setting a bit in ECR clears corresponding bit in ER, used by CPU to clear event flags.  Event Set Register (ESR): setting a bit in ESR sets corresponding bit in ER, used by CPU to submit event requests and for debugging.

9 DMA Parameter RAM (PaRAM):  Transfer parameter table for EDMA channels is stored in PaRAM.  It is a 2KB block of RAM located within EDMA.  Table consists of 24 bytes that contain all information about a transfer.

10 DMA The OPT field:  Sets the priority,  Sets the element size: 8, 16, or 32 bits,  Defines sources as 1- or 2-dimensional,  Enables/disables transfer complete interrupt,  Defines transfer complete code,  Sets source/destination address update modes.

11 DMA A 1-D block transfer consists of FRMCNT+1 frames. Each frame consists of ELECNT elements. Type 1 Transfer, if FS=0 in OPT field (sync event occurs, for example transition of McBSP XRDY flag from FALSE to TRUE for example)  A frame element is transferred from source to destination.  S/D Addresses are updated in parameter set after transfer.  ELECNT decremented by 1.

12 DMA When ELECNT reaches 1, i.e. final element in frame,  Element is transferred,  ELECNT is reloaded with value in ELERLD.  FRMCNT is decremented by 1. EDMA continues to transfer data at sync events until no more frames are available. Type 2 Transfer, if FS=1 in OPT field, each sync event causes all elements of a frame to be transferred as rapidly as possible.

13 DMA Linking EDMA Transfers:  When LINK bit of OPT is 0, EDMA stops after a transfer is complete.  If LINK=1 and transfer is completed, Transfer parameters are reloaded with parameter set pointed to by 16-bit address located in LINK field. EDMA continues with transfer of new set.

14 DMA EDMA Interrupts to CPU  If Transfer Complete Interrupt (TCINT) bit is set to 1 in OPT field for a channel and event mapped to that channel occurs, EDMA will set a bit in Channel Interrupt Pending Register (CIPR).  Then, if bit corresponding to channel in Channel Interrupt Enable Register (CIER) is set, EDMA generates EDMA_INT interrupt to CPU.  If EDMA_INT is enabled in IER, program execution will jump to ISR.

15 Sine Wave Generation Difference Equation:  Input x[n] is an impulse.  Output y[n] are cosine/sine values.  IC’s are all zero.  Computation: 2 multiplications and 3 or 2 additions  Memory Usage: 2 coefficients, 2 previous values of y[n] and 1 previous value of x[n]  Drawback is the build-up of error due to feedback sin(  0 n).u[n] ↔ y[n] = 2.cos(  0 ).y[n-1] - y[n-2] - sin(  0 ).x[n-1]