Multicore Navigator: Queue Manager Subsystem (QMSS)

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

The Linux Kernel: Memory Management
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Computer Organization and Architecture
Allocating Memory.
KeyStone Training Multicore Navigator Overview. Overview Agenda What is Navigator? – Definition – Architecture – Queue Manager Sub-System (QMSS) – Packet.
1 CSIT431 Introduction to Operating Systems Welcome to CSIT431 Introduction to Operating Systems In this course we learn about the design and structure.
Chapter 7 Interupts DMA Channels Context Switching.
Memory Management Chapter 5.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
Chapter 11 Interrupt Interface of the 8088 and 8086 Microcomputer
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Using Multicore Navigator Multicore Applications.
FreeRTOS.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Using Multicore Navigator
KeyStone Resource Manager June What is resource manager? LLD for global Resource management – static assignment of the device resources to DSP cores.
Introduction to Embedded Systems
KeyStone Multicore Navigator
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
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.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
2: Computer-System Structures
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
C66x KeyStone Training HyperLink. Agenda 1.HyperLink Overview 2.Address Translation 3.Configuration 4.Example and Demo.
QMSS: Components Overview Major HW components of the QMSS: Queue Manager Two PDSPs (Packed Data Structure Processors): – Descriptor Accumulation / Queue.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
KeyStone Training Multicore Navigator: Packet DMA (PKTDMA)
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
Intro  Scratchpad rings and queues.  First – In – Firs – Out (FIFO) data structure.  Rings are fixed-sized, circular FIFO.  Queues not fixed-size.
KeyStone SoC Training SRIO Demo: Board-to-Board Multicore Application Team.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
Using Multicore Navigator CIV Application Team January 2012.
Network Coprocessor (NETCP) Overview
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Queue Manager and Scheduler on Intel IXP John DeHart Amy Freestone Fred Kuhns Sailesh Kumar.
DMA Driver APIs DMA State Diagram Loading Driver and Opening Channel DMA Channel Attributes Loading Data to a Channel Unloading Data from a Channel.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
KeyStone SoC Training SRIO Demo: Board-to-Board Multicore Application Team.
Transmitter Interrupts Review of Receiver Interrupts How to Handle Transmitter Interrupts? Critical Regions Text: Tanenbaum
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
Chapter 2: Computer-System Structures
Chapter 2 Memory and process management
Computer Architecture
EE 445S Real-Time Digital Signal Processing Lab Spring 2017
AT91 Memory Interface This training module describes the External Bus Interface (EBI), which generatesthe signals that control the access to the external.
Module 2: Computer-System Structures
Processor Fundamentals
Main Memory Background Swapping Contiguous Allocation Paging
EE 445S Real-Time Digital Signal Processing Lab Fall 2013
11.1 Interrupt Mechanism, Type, and Priority
Transmitter Interrupts
Module 2: Computer-System Structures
VIRTIO 1.1 FOR HARDWARE Rev2.0
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Chapter 11 Processor Structure and function
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Presentation transcript:

Multicore Navigator: Queue Manager Subsystem (QMSS)

Agenda How Does the Queue Manager Work? Memory Regions Link RAMs Address/Index Conversion Queue Pend Signals Accumulators How to Program the QMSS Modules Registers Low Level Driver

How Does the Queue Manager Work? Memory Regions Link RAMs Address/Index Conversion Queue Pend Signals Accumulators How to Program the QMSS Modules Registers Low Level Driver

Memory Region Sizing All Navigator descriptor memory regions are divided into equal sized descriptors. For example: Memory regions are always aligned to 16-byte boundaries and descriptors are always multiples of 16 bytes.

Memory Region Indexing Each memory region is given a unique range of indexes for its descriptors.

Memory Region Maps to Link RAM Each descriptor index maps to the corresponding entry in the Link RAM (each Link RAM also has index range).

Queuing Example 1 The Queue Manager maintains a head pointer for each queue, which are initialized to be empty. We actually do not push indexes; We push descriptor addresses. The QM converts addresses to indexes.

Queuing Example 2 In this example, a descriptor is pushed into a queue that is not empty. Descriptors may be pushed to the head or tail, but are always popped from the head.

Address to Index Conversion When a descriptor is pushed onto a queue, the Queue Manager converts the address to an index: index = (address – region_base) / descriptor_size + region_first_index; The descriptor is added to the queue by threading the indexed entry of the Link RAM into the queue’s linked list. When a queue is popped, the Queue Manager converts the index back into an address: address = (index – region_first_index) * descriptor_size + region_base; The Link RAM is then rethreaded to remove this index.

Linking RAM Contents So what is in a Linking RAM entry? A link to the next index in the queue. A hint field (used by the Tx DMA) -- The hint is taken from the four LSBs of the push value; It is a coded descriptor size used by the Tx DMA for prefetching the descriptor control header. The packet size -- This is what was written to Que N Register C just prior to the push – it is not a calculated packet size (in fact, the queue manager never touches descriptor memory!). The internal Link RAM is 16K 40-bit words. An external Link RAM requires one 64-bit word per descriptor.

Queue Manager Control of Tx DMA One-to-one mapping of queue number to Tx channel for each Tx DMA in the system: This queue drives a qpend signal to a specific Tx channel. The Tx channel is triggered by the first push to the queue. e.g.: Queue 672 maps to SRIO channel 0, 673 to channel 1...

Descriptor Accumulators Firmware designed to keep DSPs from polling. Run in background, interrupts DSP with a list of descriptor addresses popped by the firmware. Host software must recycle these descriptors. High Priority Accumulator: 32 channels, one queue per channel All channels continuously scanned, 0 to 31 Average latency per scanning loop, ~7us Each channel/event maps to one core Programmable list size and options Low Priority Accumulator: 16 channels, up to 32 queues per channel One channel scanned each pass through High Priority Each channel/event maps to all cores

QMSS Interrupt Generation Two sources of QMSS interrupts: QMSS’ INTD (Hi Priority / Lo Priority Accumulator interrupts) Queues with dedicated CP-IntC queue pend signals

How to Program the QMSS Modules How Does the Queue Manager Work? Memory Regions Link RAMs Address/Index Conversion Queue Pend Signals Accumulators How to Program the QMSS Modules Registers Low Level Driver

Step 1: Memory Region Setup The most important part of Navigator initialization. The configuration of other components depends on this. It is critical to understand the memory movement requirements of the application! 20 memory regions – descriptor/payload storage. Descriptor size is multiple of 16 bytes, min 32. Descriptor count is a power of 2, minimum 25. Descriptors must be placed at programmed intervals. Each descriptor has a unique index within the region and within the Linking RAM.

Memory Region Registers Three registers must be programmed for each memory region configuration: Memory Region R Base Address: Must be a global address Must be aligned to a 16-byte address boundary Memory Region R Start Index: Indicates the index of the first descriptor in this region. Memory Region R Descriptor Setup: Programs the size and count of descriptors.

Memory Region Use: Tips & Pitfalls Issue: Resolution of descriptor count becomes lower as count increases (since it is a power of two). (e.g. 2048, 4096 are available, but not 3000) Resolution: Allocate memory for what is needed. Caution! Never place one memory region within the programmed address range of another memory region! Link RAM corruption will result! Issue: Monolithic descriptor size is fixed. Resolution: Use adjacent descriptors to create a larger descriptor if needed. (this is a software control issue) Caution! Do not push the adjacent addresses! Data corruption will result! Rx DMA does not check size!

Step 2: Linking RAM Setup The Linking Ram is configured in one or two pieces, though it is used (by QM) as a single unit. Requires one n-bit word per descriptor index, where n = 40 bits for the internal linking RAM Benefit: speed (much faster than any other memory) 64 bits for an external linking RAM Benefit: size (up to 512K entries) Any global address can be used for the second Linking RAM.

Linking RAM Registers One or two registers must be programmed for each Linking RAM used: Linking RAM Region N Base Address: Must be a global address To use the QMSS internal link RAM memory, Region 0 Base Address must be set to the internal address, which currently is 0x00080000. Linking RAM Region 0 Size: Indicates the number of descriptor indexes in the first link RAM. If this register is set to 999, then Region 0 indexes will be 0 to 999; Region 1 indexes will start at 1000. Set to 0x3FFF to use the entire internal Linking RAM This register is not needed for the second linking RAM.

Step 3: Push and Pop For the QM, the only thing remaining is to push and pop descriptors (the remaining initialization tasks are to populate free descriptor queues and program PKTDMAs). Queue N Register D: Writing to these registers pushes a descriptor into a queue Reading these registers pops a descriptor from a queue Note: While a descriptor is linked in a queue it should be considered “owned” by hardware and not modified. When software pops it (or is given the address by the accumulator), it “owns” the descriptor, and may modify the contents until it is pushed once again into a queue.

QMSS Low Level Driver (LLD) Provides an abstraction of register-level details. Provides two usage modes: User manages/selects resources to be used Generally faster LLD manages/selects resources Generally easier Allocates a minimal amount of memory for bookkeeping purposes. Built as two drivers: QMSS LLD is a standalone driver for QM and Accumulators. CPPI LLD is a driver for PKTDMA that requires the QMSS LLD. The following slides do not present the full API.

QMSS LLD Initialization The following are one-time initialization routines to configure the LLD globally: Qmss_init(parms, queue_mapping); Configures Link RAM, # descriptors, queue mapping May be called on one or all cores Qmss_exit(); Deinitializes the QMSS LLD

QMSS Configuration More QMSS configuration: Qmss_start( ); Called once on every core to initialize config parms on those cores. Must be called immediately following Qmss_init() Qmss_insertMemoryRegion(mem_parms); Configures a single memory region. Should be called with protection so that no other tasks or cores could simultaneously create an overlapping region.

QMSS LLD Queue Usage To allocate and release queues: queue_handle = Qmss_queueOpen(type, que, *flag); Once “open”, the DSP may push and pop to the queue. type refers to an enum (tx queue, general purpose, etc.). que refers to the requested queue number. flag is returned true if the queue is already allocated. Qmss_queueClose(queue_handle); Releases the handle preventing further use of the queue

Queue Push and Pop Queue management APIs: Qmss_queuePushDesc(queue_handle, desc_ptr); Pushes a descriptor address to the handle’s queue. Other APIs are available for pushing sideband info as well. desc_ptr = Qmss_queuePop(queue_handle); Pops a descriptor address from the handle’s queue. count = Qmss_getQueueEntryCount(queue_handle); Returns the number of descriptors in the queue.

QMSS Accumulator The following functions are available to program, enable, and disable an accumulator: Qmss_programAccumulator(type, *program); Programs/enables one accumulator channel (high or low) Setup of the ISR is done outside the LLD using INTC Qmss_disableAccumulator(type, channel); Disables one accumulator channel (high or low)

For More Information For more information, refer to the to Multicore Navigator User Guide http://www.ti.com/lit/SPRUGR9 For questions regarding topics covered in this training, visit the support forums at the TI E2E Community website.