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

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 7–2. Recursive Implementation of Factorial Function
int factorial(int x)
{
}
Altera Corporation
November 2009
if (x>1) return factorial(x-1) * x;
else return x;
Function Prototypes (Section 6.9.1, Paragraph 14)
A function prototype cannot be encapsulated within a function.
For example, the following code is not supported:
The C2H Compiler supports separate declarations of functions, as
follows:
Recursive Function Calls (Section 6.5.2.2, Paragraph 11)
Recursive function calls are not supported.
Example 7–2
factorial function.
You can replace recursive functions with equivalent code that
implements the function without using recursion.
equivalent implementation of the factorial function without using
recursion.
void doDMA(int a)
{
}
void analyze(int i);
void doDMA(int a)
{
}
void analyze(int i);
...
...
shows an unsupported recursive implementation of the
9.1
ANSI C Compliance and Restrictions
Nios II C2H Compiler User Guide
Example 7–3
shows an
7–7

Related parts for IPTR-C2H-NIOS