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

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
Scheduling
Example 3–28. Pointer Declarations with _ _ restrict__
int * _ _ restrict_ _ my_restricted_pointer_to_integer;
const int * _ _ restrict_ _ my_restricted_pointer_to_constant_integer;
int * const _ _ restrict_ _ my_constant_restricted_pointer_to_integer;
Example 3–29. Using _ _ restrict_ _
void foo(int * _ _ restrict_ _ ptr_a,
{
}
3–34
Nios II C2H Compiler User Guide
int a, b;
a
*ptr_a = a + 7;
b
*ptr_b = b + 8;
int * _ _ restrict_ _ ptr_b)
= *ptr_a;
= *ptr_b;
compile-time due to the possibility of aliasing. This dependency causes
the read operation from ptr_b to be scheduled at State 2, rather than at
State 0.
_ _
If you know that a pointer never overlaps with another, you can inform
the compiler by declaring the pointer to be a restricted pointer. The
restrict type qualifier is introduced in the ISO C 99 specification. The
compiler ignores any or all aliasing implications of a pointer qualified by
_ _ restrict_ _. The C99 specification states that if a pointer “p” is
declared with restrict, and another pointer “q” accesses any location also
accessed by “p,” the behavior is undefined. In other words, a restricted
pointer promises to never alias another pointer.
Example 3–28
_ _ restrict_ _ type qualifier.
1
Figure 3–15
the _ _ restrict_ _ type qualifier to inform the C2H Compiler that
ptr_a and ptr_b do not alias:
restrict
The qualifier comes after the *; __restrict__ qualifies the
pointer type, not the type that the pointer points to.
_ _
shows the dependency graph for
Pointer Type Qualifier to Break Dependencies
demonstrates several pointers declared using the
9.1
Example
Altera Corporation
3–29, which uses
November 2009

Related parts for IPTR-C2H-NIOS