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

no-image

IPTR-C2H-NIOS

Manufacturer Part Number
IPTR-C2H-NIOS
Description
IP CORE Renewal Of IPT-C2H-NIOS
Manufacturer
Altera
Datasheet

Specifications of IPTR-C2H-NIOS

Software Application
IP CORE, NIOS Processor And Functions
Core Architecture
Nios II
Features
ANSI C Compliance, Straightforward C-to-Hardware Mapping, Reporting Of Generated Results
Core Sub-architecture
Cyclone
Rohs Compliant
NA
Lead Free Status / RoHS Status
na
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 IPTR-C2H-NIOS