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

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
One-to-One C-to-Hardware Mapping
Example 3–2. If-else Logic
3–6
Nios II C2H Compiler User Guide
if (foo > bar)
else
foo += bar;
foo *= bar;
The fundamental iteration statement for the C2H Compiler is the do loop,
which evaluates its condition at the end of each iteration. See section
“Loop Pipelining” on page 3–42
machines and scheduling.
Selection Statements
A selection statement (if-else, case, switch, and ?:) translates to a
multiplexer in hardware. The structure of the hardware depends on the
type of statement, as described in the following sections.
if Statement
An if-else statement translates to three elements in hardware:
The results of each element are registered, and the registered signals feed
a multiplexer.
If the if statement has both a then and an else block, the operations for
both blocks execute in parallel. When all operations have completed, the
multiplexer selects which value propagates to subsequent statements,
based on the value of the control expression.
Figure 3–4
Logic to perform all operations in the then block
Logic to perform all operations in the else block
Selection logic that determines which result to use
shows the circuit that results from the code in
9.1
for information about loop state
Altera Corporation
Example
November 2009
3–2.

Related parts for IPT-C2H-NIOS