IPT-C2H-NIOS Altera, IPT-C2H-NIOS Datasheet - Page 59

no-image

IPT-C2H-NIOS

Manufacturer Part Number
IPT-C2H-NIOS
Description
C2H COMPILER FOR NIOS II
Manufacturer
Altera
Series
Nios®IIr
Type
Nios IIr
Datasheet

Specifications of IPT-C2H-NIOS

Function
C to Hardware Compiler
License
Initial License
Software Application
IP CORE, NIOS Processor And Functions
Core Architecture
FPGA
Core Sub-architecture
Cyclone
Rohs Compliant
NA
Lead Free Status / RoHS Status
Not applicable / Not applicable
Example 3–12. Nonequivalent Pointers Due to Potential Aliasing
void nonequivalent_pointers(char *packed_data,
{
}
Altera Corporation
November 2009
int i = 0;
while (i < len)
{
}
char ms_nibble = *(packed_data + i) >> 4;
char ls_nibble;
*some_other_pointer = i;
ls_nibble = *(packed_data + i) & 0x0f;
...
Example 3–12
Example 3–12
some_other_pointer between the reads from address
(packed_data + i).
In this code, the C2H Compiler cannot determine if
some_other_pointer and packed_data overlap addresses (known
as aliasing), which would affect the result of the second evaluation of
*(packed_data + i). Therefore, the C2H Compiler creates a separate
master port for each dereference, creating a total of three master ports. For
details on how to inform the C2H Compiler that two pointers do not alias,
see section
Volatile Type Qualifier
The C2H Compiler does not consolidate or optimize pointers for
dereferenced types that use the volatile type qualifier. The volatile
type qualifier forces the variable to be evaluated strictly according to the
rules of the language. volatile is normally used to access non-memory
peripherals, such as timers and communication devices.
1
The volatile type qualifier overrides the __restrict__
pointer qualifier. For further information, see
on page
int *some_other_pointer,
int len)
“Pointer Aliasing” on page
is similar to
demonstrates another case of non equivalent pointers.
3–32.
9.1
Example
3–10, but a value is written to address
3–32.
C-to-Hardware Mapping Reference
Nios II C2H Compiler User Guide
“Pointer Aliasing”
3–19

Related parts for IPT-C2H-NIOS