C-to-Hardware Mapping Reference
Because the array subscript operation and the member operation for
structures and unions can be expressed in terms of an address
computation and a pointer dereference, this section is fundamental to
understanding how arrays, structures, and unions translate to hardware
as well.
Creation of Avalon-MM master ports
In general, the C2H Compiler creates a master port on the accelerator for
every instance of the indirection operator. The following are exceptions to
this rule:
The C2H Compiler identifies certain opportunities for optimization.
In some cases it can collapse multiple master ports to a single master
port without affecting performance, which reduces resource
utilization.
If the C2H Compiler determines that two pointers are exactly
equivalent, it consolidates them to a single master port.
There are considerations for multidimensional arrays. Refer to
section “Array Subscript Operator” on page 3–26 .
Consolidation of Equivalent Pointers
The C2H Compiler consolidates pointer dereferences when it determines
that the address expressions are always equal and the referenced data
cannot change between dereferences. In this case, the pointer
dereferences share an Avalon-MM master port.
Example 3–9 shows two dereferences that are identical. The
C2H Compiler consolidates them into a single master port.
Example 3–9. Equivalent Pointers
void equivalent_pointers(char *packed_data)
{
char ms_nibble = *packed_data >> 4;
char ls_nibble = *packed_data & 0x0f;
...
}
Altera Corporation
November 2009
9.1
3–17
Nios II C2H Compiler User Guide
相关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
IR11682STRPBF IC MOSFET DRIVER DUAL 200V 8SOIC
IR1168SPBF IC MOSFET DRIVER DUAL 200V 8SOIC
IR1176STR IC DRIVER RECT SYNC 5V 4A 20SSOP
相关代理商/技术参数
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
IPTG06A18-11SZCSR 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06ASE18-11SZ 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06E18-11SZC 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector