参数资料
型号: IPT-C2H-NIOS
厂商: Altera
文件页数: 122/138页
文件大小: 0K
描述: C2H COMPILER FOR NIOS II
标准包装: 1
系列: Nios®II
类型: Nios II
功能: C 到硬件编译器
许可证: 初始许可证
Interrupt Pragma
Interrupt
Pragma
To use a hardware accelerator in interrupt mode, add the following line
to your function source code:
#pragma altera_accelerate
enable_interrupt_for_function <function name>
At the next software compilation, the C2H Compiler creates a new header
file containing all the macros needed to use the accelerator and service the
interrupts it generates.
This pragma causes the function (which is assumed to be a top-level
accelerated function, not an accelerated subfunction) to be an interrupt-
mode accelerator. Specifically, the following things change:
The accelerator's control slave has an IRQ signal, which is asserted
every time the function has completed execution.
The polling loop in the generated driver file is removed. When the
function is called, the CPU immediately returns after launching the
accelerator.
A header file is generated, providing macros and definitions
required for you to write an ISR. The macros are summarized in
Table 6–1 .
Table 6–1. C2H Accelerator Interrupt Macros
Purpose
Return value
Interrupt clear
Check status
Macro Name
ACCELERATOR _ <Project Name> _ <Function Name> _ GET_RETURN_VALUE()
ACCELERATOR _ <Project Name> _ <Function Name> _ CLEAR_IRQ()
ACCELERATOR _ <Project Name> _ <Function Name> _ BUSY()
An example of this header file is shown in Example 6–4 for an
accelerated function called coprocess() in a Nios II IDE project
called my_project . The file is generated in <Project Path>/
<Configuration> , where <Project Path> is the software project
directory, and <Configuration> is the project configuration name
(Release or Debug). The file name is ACCELERATOR_ <Project
Name>_<Function Name> _IRQ.h , where <Project Name> is the name
of the project (usually the same as <Project Path>) , and <Function
Name> is the name of the function you are accelerating.
6–4
Nios II C2H Compiler User Guide
9.1
Altera Corporation
November 2009
相关PDF资料
PDF描述
IPTR-DSPBUILDER DSP BUILDER SOFTWARE
IR11662SPBF IC CNTROL SMART RECTIFIER 8-SOIC
IR1166STRPBF IC MOSFET DRIVER N-CH 200V 8SOIC
IR11672ASPBF IC MOSFET DRIVER 200V 8-SOIC
IR1167ASTRPBF IC SMART SECONDARY DRIVER 8-SOIC
相关代理商/技术参数
参数描述
IPT-DSPBUILDER 功能描述:开发软件 DSP Builder MATLAB SIMULINK RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
IPTE-75GF-1000-70D 制造商: 功能描述: 制造商:undefined 功能描述:
IPTG06A18-11SZC 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector with Backshell to Accommodate
IPTG06A18-11SZCPH16 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06A18-11SZCPHM18 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector