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

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 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 IPT-C2H-NIOS