C-to-Hardware Mapping Reference
There are two types of exceptions to this rule:
Assignments that require zero logic elements in hardware
Assignments that use multiple registers to pipeline complex
arithmetic operations
The following sections discuss these exceptions.
Unregistered Operations and Assignments
Certain logical and bit-wise operations involving constants are trivial and
require no logic. In hardware, they are performed simply by
manipulating wires. Table 3–2 lists the applicable operators and
conditions. If an assignment consists solely of such operations, then its
result is not registered.
Table 3–2. Operators That Can Result in Unregistered Assignments
Operator
>>
<<
&
|
^
~
)
Description
Right bit-wise shift
Left bit-wise shift
bit-wise AND
bit-wise inclusive OR
bit-wise exclusive OR
bit-wise inversion
Type cast
Required Condition
Right-hand side is constant
Right-hand side is constant
Either operand is constant
Either operand is constant
Either operand is constant
Right-hand side is unregistered
Right-hand side is unregistered
The following assignment is an example of a zero logic-element
operation.
int masked_data = data_in & 0x000fffff;
The C2H Compiler generates no register for the variable masked_data,
because its value is represented simply by concatenating 12 bits of zeroes
with the lower 20 bits of data_in .
Additional examples of unregistered assignments:
shift_by_constant
or_with_constant
= data_in << 3;
= data_in | 0xf0f0f0f0;
invert_shift_and_consts = (~data_in & 0xff) << 8;
Altera Corporation
November 2009
9.1
3–3
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