参数资料
型号: IPT-C2H-NIOS
厂商: Altera
文件页数: 53/138页
文件大小: 0K
描述: C2H COMPILER FOR NIOS II
标准包装: 1
系列: Nios®II
类型: Nios II
功能: C 到硬件编译器
许可证: 初始许可证
C-to-Hardware Mapping Reference
The Nios II C2H Compiler does not perform any type of inline
substitution. It ignores the inline function specifier. You can achieve the
effect of an inline function through the use of preprocessing macros. If
you wish to call a function for which accelerated hardware is replicated
for each call, then you must define a macro containing the logic for this
function. Before parsing the accelerated code, the C2H Compiler calls the
GNU GCC preprocessor, which evaluates the macro and replaces each
macro call with your macro definition.
Macros and Preprocessing Directives
Any preprocessing directives in your code are processed before
translation to hardware. In order to ensure identical interpretation
between software and hardware, the C2H Compiler operates on the
output of the nios2-elf-gcc preprocessor.
Variable
Declarations
This section describes how the C2H Compiler translates variable
declarations and other C elements that define data storage.
Local vs. Non-Local Variables
The C2H Compiler treats variables differently, depending on the scope of
the variable. In general, local variables translate to memory elements
inside the accelerator hardware; non-local variables translate to Avalon-
MM master ports capable of accessing memory outside of the accelerator.
For the purposes of this document, any variable declared within the scope
of an accelerated function is considered to be local. Example 3–4
illustrates locality of variables to a function mac() . In this example, only
int my_global is not local, and all other variables are local.
Example 3–4. Local vs. Non-Local Variables
int my_global; // my_global is not local to mac().
int mac(int *src, int *dst, int len)
// src, dst, and len are local to mac().
{
int res = 0; // res is local to mac().
while (len--)
{
int product = (*src++) * (*dst++); // product is local to mac().
res += product;
}
return res;
}
Altera Corporation
November 2009
9.1
3–13
Nios II C2H Compiler User Guide
相关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