KeyStone Training Multicore Applications Literature Number: SPRPXXX

Slides:



Advertisements
Similar presentations
KeyStone Connectivity and Priorities
Advertisements

KeyStone C66x CorePac Overview
KeyStone Training More About Cache. XMC – External Memory Controller The XMC is responsible for the following: 1.Address extension/translation 2.Memory.
Yaron Doweck Yael Einziger Supervisor: Mike Sumszyk Spring 2011 Semester Project.
Extended Memory Controller and the MPAX registers And Cache
C66x CorePac: Achieving High Performance. Agenda 1.CorePac Architecture 2.Single Instruction Multiple Data (SIMD) 3.Memory Access 4.Pipeline Concept.
KeyStone Training Multicore Navigator Overview. Overview Agenda What is Navigator? – Definition – Architecture – Queue Manager Sub-System (QMSS) – Packet.
Keystone PCIe Usage Eric Ding.
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
EET 450 Chapter 2 – How hardware and Software Work Together.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Processes and Resources
KeyStone IPC Inter-Processor Communications
ARM-DSP Communication Architecture
Keystone PCIe Usage Eric Ding.
Multicore Software Development Kit (MCSDK) Training Introduction to the MCSDK.
Multicore Navigator: Queue Manager Subsystem (QMSS)
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
Multicore Software Development Kit (MCSDK) Training Introduction to the MCSDK.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
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.
KeyStone Training Network Coprocessor (NETCP) Overview.
CORTEX-M0 Structure Discussion 2 – Core Peripherals
Extended Memory Controller and the MPAX registers
KeyStone Training Serial RapidIO (SRIO) Subsystem.
KeyStone MPM Basics KeyStone Training Multicore Applications Literature Number: SPRPxxx 1.
Typical Microcontroller Purposes
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
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.
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.
C66x KeyStone Training HyperLink
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 II Interrupts. Agenda Motivation for this presentation The interrupt Scheme – SPI 0 example Configure interrupt - Hyperlink example.
KeyStone Training Multicore Navigator: Packet DMA (PKTDMA)
Challenges in KeyStone Workshop Getting Ready for Hawking, Moonshot and Edison.
Keystone Family PCIE Eric Ding. TI Information – Selective Disclosure Agenda PCIE Overview Address Translation Configuration PCIE boot demo.
KeyStone SoC Training SRIO Demo: Board-to-Board Multicore Application Team.
6-1 Infineon 167 Interrupts The C167CS provides 56 separate interrupt sources that may be assigned to 16 priority levels. The C167CS uses a vectored interrupt.
EDMA3, QDMA and IDMA for the Keystone Platform
Msi interrupt reception as EP. Msi debug Based on sprugs6a.pdf, Keystone architecture Perpheral Component Interconnect Express (PCIe) wrote 8 into MSI_IRQ.
Using Multicore Navigator CIV Application Team January 2012.
NS Training Hardware Traffic Flow Note: Traffic direction in the 1284 is classified as either forward or reverse. The forward direction is.
How to write a MSGQ Transport (MQT) Overview Nov 29, 2005 Todd Mullanix.
Network Coprocessor (NETCP) Overview
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
DSP C5000 Chapter 10 Understanding and Programming the Host Port Interface (EHPI) Copyright © 2003 Texas Instruments. All rights reserved.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
NET+OS 6.1 Training. GPIO APIs NET+OS 6.1 Signal Multiplexing System tradeoffs affecting pin count at design-time. –NS9750 unit cost reduced by conserving.
SMP Basics KeyStone Training Multicore Applications Literature Number: SPRPxxx 1.
KeyStone SoC Training SRIO Demo: Board-to-Board Multicore Application Team.
CSL DAT Adapter CSL 2.x DAT Reference Implementation on EDMA3 hardware using EDMA3 Low level driver.
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.
Process concept.
Code review: GPIO, timer, and ISR
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: Internal fault (e.g.. divide by.
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
8259 Chip The Intel 8259 is a family of Programmable Interrupt Controllers (PIC) designed and developed for use with the Intel 8085 and Intel 8086 microprocessors.
8259 PROGRAMMABLE INTERRUPT CONTROLLER
전자의료시스템 및 실습 System Configuration/Interrupt
8259 Programmable Interrupt Controller
Lecture Topics: 11/1 General Operating System Concepts Processes
8259 PROGRAMMABLE INTERRUPT CONTROLLER
Programmable Interrupt Controller (PIC)
KeyStone Training Multicore Applications Literature Number: SPRPXXX
Presentation transcript:

KeyStone Training Multicore Applications Literature Number: SPRPXXX KeyStone Interrupts KeyStone Training Multicore Applications Literature Number: SPRPXXX

Agenda Interrupt Scheme Example 1: SPI Transmit Interrupt Example 2: HyperLink Interrupt ARM Interrupt Scheme

Interrupt Scheme KeyStone Interrupts

Link Events to ISR (Interrupt Service Routine)

Link Events to ISR (Interrupt Service Routine)

Link Events to ISR (Interrupt Service Routine) To connect an event to ISR: Connect primary event to one of the 124 maskable interrupt lines Connect interrupt line to ISR CSL or BIOS API are used to connect events to interrupt lines and interrupt lines to ISR (Interrupt Service Routine).

Configuring an Hwi (Hardware Interrupt) Using BIOS Statically via GUI Example: Event 94 to the CPU HWI5 Use Hwi module (Available Products), insert new Hwi (Outline View) NOTE: BIOS objects can be created via the GUI, script code, or C code (dynamic). By the way, Event 94 is not connected to anything. It is reserved.

Configuring an Hwi Using BIOS Statically via GUI

Configuring an Hwi with BIOS Using Run-Time Functions The include file Hwi.h in the release MCSDK_3_0_4_18\bios_6_37_00_20\packages\ti\sysbios\family\c64p\Hwi.h Has the definition of the Hwi class Where do you find the Event Id #?

C66x CorePac Input Events (CorePac Events Only) From the System Event Mapping table in the C66x DSP CorePac User Guide: 128 CorePac events 22 assigned events NOTE: 4 used for event combining 7 reserved events 99 available events; The available events are connected to the device (mostly via CIC). Total of 124 “unique” Corepac input events -

C66x CorePac Events (CIC Output) for KeyStone II Devices

Configure HWI Using CSL CSL interrupt files are in the release: MCSDK_3_0_4_18\pdk_keystone2_3_00_04_18\packages\ti\csl\src\intc Include files: csl_intc.h csl_intcAux.h Source files in src/intc directory CSL_intcPlugEventHandler() CSL_intcInit() CSL_intcGlobalNmiEnable CSL_intcGlobalEnable() CSL_intcHwControl() CSL_intcOpen And many more NOTE: In addition to the mapping, the interrupt must be enabled: Global Enable activates the global interrupt register. Then enable specific interrupt can be activated. This presentation will not get into details of enabling the interrupts.

KeyStone II Interrupt Topology CIC0 CIC1 CIC2 Events C66x CorePac0 C66x CorePac1 C66x CorePac2 C66x CorePac3 C66x CorePac4 C66x CorePac5 C66x CorePac6 C66x CorePac7 HyperLink EDMA CC0 EDMA CC1 EDMA CC2 EDMA CC3 EDMA CC4 ARM A15 CorePac Peripherals All events from all IP come to the interrupt controllers. Some are connected directly to C66x or other masters (EDMA, ARM, Hyperlink) Some are mapped by the interrupt controllers

C66x CorePac Secondary Events

CIC to C66x CorePac Connections Event Number: CorePac Input Event Event Name: CIC Output Line

Connecting System Events Mapping (Connecting) System Events (Input to CIC) to Channels (Output of CIC)

KeyStone II CIC Input System Events

CIC Mapping API Read the following Wiki: http://processors.wiki.ti.com/index.php/Configuring_Interrupts_on_Keystone_Devices CSL APIs: For KeyStone II (MCSDK 3.x), there are two include files: csl_cpIntc.h csl_cpIntCAux.h SysBios APIs: MCSDK_Y_XX\bios_6_BB_AA_ZZ\packages\ti\sysbios\family\c66\tci66xx cpInitc.h cpInitc.c

Example 1: SPI Transmit Interrupt KeyStone Interrupts

Example 1: Connect SPIXEVT to CorePac ISR 66AK2H12 has multiple instances of SPI; We will look at SPI 0. SPIXEVT is NOT a primary event so it should be mapped via CIC. The next slide shows the system events that are associated with SPIXEVT.

KeyStone II CIC Input Events

Connect SPIXEVT to CorePac ISR SPI_0_XEVT is input event number 56 to CIC. What channel should be used? Table 5-22 shows the C66x CorePac Input Events. There are multiple CIC output events that are connected to C66x CorePac. Some of these events are broadcast events (e.g, connected to all 4 CorePacs that CIC supports) Some are individual CorePac events.

Connect SPIXEVT to CorePac ISR Eight events (56 to 63) coming out of the interrupt controller are broadcast events. They are connected to CIC output channels 0 to 7 respectively. This example uses C66x input event 63, which is connected to CIC_OUT7.

Connect SPIXEVT to CorePac ISR They are other events from the interrupt controller that could be considered (either broadcast or single core) The ARM GIC has 480 input events and 12 of them are connected to SPI.

Connect SPI 0 Transmit Event to CorePac 3 ISR

CSL Map System Event (CIC Input) to Output csl_cpIntCAux.h shows the APIs that connect system events to channels (e.g., the output of the CIC). Connecting channel events to interrupt queues is done using CSL or SYSBIOS, as described previously. Error = CSL_CPINTC_mapSystemToChannel(hnd, 56,7) ;//CSL Error = CpIntc_mapSysIntToHostInt(0, UInt 56, 7); // BIOS

Example 2: HyperLink Interrupt KeyStone Interrupts

Example 2: HyperLink Interrupt MCSDK includes examples of interrupts originating from peripherals: MCSDK_3_01_12\pdk_keystone2_3_00_01_12\packages\ti\drv Consider an example using HyperLink, where an interrupt is sent from Hyperlink 0 to a C66x Corepac.

Hyperlink Interrupt 0 Table 5-24 of 66AK2H12- CIC0 Input Events Event number 111 (ox6F) is HyperLink 0 interrupt. Next, this interrupt is connected to a CorePac …

Hyperlink Interrupt 0 to CIC Input static int hyplnkExampleInitChipIntc (void) { CSL_CPINTC_Handle hnd; // I some functions hidden here (enable/disable interrupts, etc.) CSL_CPINTC_mapSystemIntrToChannel (hnd, CSL_CIC0_HYPERLINK_0_INT, hyplnk_EXAMPLE_INTC_OUTPUT); return 0; } CSL_CIC0_HYPERLINK_0_INT = 111 What about hyplnk_EXAMPLE_INTC_OUTPUT?

Hyperlink Interrupt 0: CIC Output to CorePac Use CorePac input event 45 It could be any one of other CIC_OUT lines (look at the complete table for even more)

Hyperlink Interrupt 0: CIC Output to CorePac Event 45 on C66x CorePac N is connected to CIC output 64 + 10 x N: Core 0 event 45 is connected to CIC output event 64 Core 1 event 45 is connected to CIC output event 74 Core 2 event 45 is connected to CIC output event 84 Core 3 event 45 is connected to CIC output event 94 The code from the previous slide will map CIC 0 input event 111 to output event 64 (or 74, 84, … depending on which core is used).

ARM Interrupt Scheme KeyStone Interrupts

ARM A15 Interrupt Scheme

System Event Mapping to GIC

Following GPIO 0 From Table 5-23 of 66AK2H12: ARM CorePac Interrupts

From the File gpio-keystone.c /git/linux-keystone/drivers/gpio static int keystone_gpio_irq_map(struct irq_domain *h, unsigned int virq, irq_hw_number_t hw) { struct gpio_bank *bank = h->host_data; irq_set_chip_data(virq, bank); irq_set_chip_and_handler(virq, &keystone_gpio_irqchip, handle_simple_irq); set_irq_flags(virq, IRQF_VALID | IRQF_PROBE); irq_set_irq_type(virq, IRQ_TYPE_NONE); return 0; }

From the File gpio-keystone.c /git/linux-keystone/drivers/gpio static void gpio_irq_enable(struct irq_data *d) { struct gpio_bank *bank = irq_data_get_irq_chip_data(d); u32 mask, status = irqd_get_trigger_type(d); struct gpio_regs *regs = bank->regs; int gpio; gpio = d->hwirq - bank->base; mask = 1 << gpio; if (status & IRQ_TYPE_EDGE_FALLING) __raw_writel(mask, bank->reg_base + regs->set_fal_trig); if (status & IRQ_TYPE_EDGE_RISING) __raw_writel(mask, bank->reg_base + regs->set_rise_trig); }

For More Information C66x DSP CorePac User Guide http://www.ti.com/lit/SPRUGW0C KeyStone Architecture Chip Interrupt Controller (CIC) User Guide http://www.ti.com/lit/SPRUGW4A For questions regarding topics covered in this training, visit the support forums at the TI E2E Community website.