Resource sharing, Resource sharing –51 – Altera Nios II C2H Compiler User Manual

Page 91

Advertising
background image

Altera Corporation

9.1

3–51

November 2009

Nios II C2H Compiler User Guide

C-to-Hardware Mapping Reference

Resource
Sharing

The C2H Compiler is capable of sharing resources which consume
significant amounts of logic. A resource only becomes shared if it is
under-utilized. In other words, the C2H Compiler only shares a resource
if the performance of accelerator is not affected.

Table 3–6

lists all of the

resources that can be shared automatically by the C2H Compiler.

Table 3–6. Sharable Resource

Dereference or

Operator

Description

Required Conditions

*var
var[]

Memory Access

- Multiple dereferences to access data from the same Avalon-MM
memory port
- Multiple dereferences occurring within the same level in the
algorithm (function or loop)
- Loop CPLI must not increase

*

Multiply

- Promoted data width (32 or 64 bit) must be the same for all
multiplications. The promoted data width is shown in the C2H report.
- Multiplications occurring within the same level in the algorithm
(function or loop)
- Both operands must be either signed or unsigned.
- Loop CPLI must not increase

/

Divide

- Promoted data width (32 or 64 bit) must be the same for all divisions.
The promoted data width is shown in the C2H report.
- Divisions occurring within the same level in the algorithm (function
or loop)
- Both operands must be either signed or unsigned.
- Loop CPLI must not increase

%

Modulo

- Promoted data width (32 or 64 bit) must be the same for all modulo
operations. The promoted data width is shown in the C2H report.
- Modulo operations occurring within the same level in the algorithm
(function or loop)
- Both operands must be either signed or unsigned.
- Loop CPLI must not increase

<<

Left Shift

- Promoted data width (32 or 64 bit) must be the same for all left shift
operations. The promoted data width is shown in the C2H report.
- Left shift operations occurring within the same level in the algorithm
(function or loop)
- Both operands must be either signed or unsigned.
- Loop CPLI must not increase

>>

Right Shift

- Promoted data width (32 or 64 bit) must be the same for all right shift
operations. The promoted data width is shown in the C2H report.
- Right shift operations occurring within the same level in the
algorithm (function or loop)
- Both operands must be either signed or unsigned.
- Loop CPLI must not increase

Advertising