参数资料
型号: IPT-C2H-NIOS
厂商: Altera
文件页数: 21/138页
文件大小: 0K
描述: C2H COMPILER FOR NIOS II
标准包装: 1
系列: Nios®II
类型: Nios II
功能: C 到硬件编译器
许可证: 初始许可证
Introduction to the C2H Compiler
If the code contains C syntax not supported by the C2H Compiler, it
cannot be accelerated. Examples are floating point operations and
recursive functions. Refer to Chapter 7, ANSI C Compliance and
Restrictions .
Code that calls system and runtime library functions is a poor
candidate for acceleration. For example, there is little point in
accelerating printf() or malloc() . The underlying code contains
a complex set of sequential operations and does not contain
performance-critical loops.
Code that makes extensive use of global or external variables is a
poor candidate for acceleration. Each time the C2H accelerator uses
a global or external variable, it must access the Nios II processor ’s
data memory, which is likely to cause a bottleneck.
There are exceptions to these guidelines. For example:
Experienced C coders often "unroll" iterative algorithms,
representing them as a sequential set of operations to work better
with an optimizing C compiler. If you can refactor the code and "roll
up" the loop, you might be able to create an efficient hardware
accelerator.
A critical inner loop might have a complex set of sequential
operations which, if accelerated in hardware, consumes a lot of logic
resources. This presents a trade-off: If the processor spends an
unacceptable amount of time in this loop, it might be worth the
hardware cost to accelerate the whole loop.
Some runtime library functions are iterative in nature. Examples
include common data movement functions and buffer set functions,
such as memcpy() or memset() . If your code calls one of these
functions, you might consider writing a simple, custom
implementation of the function, which you can then accelerate.
If your code uses global or external variables, it might be easy for you
to refactor it to be suitable for acceleration. Refactor your code to
copy the global or external variables to local storage, perform the
calculation with the local variables, and then copy results back to
global or external storage. The C2H Compiler implements local
variables as fast, pipelined registers inside of the accelerator.
Understanding Code to Find Opportunities for Acceleration
The best way to obtain optimal results with the C2H Compiler is to
understand your code, and know where the critical loops are. If you
wrote the program from scratch, you probably understand where the
critical sections of code are. If you are starting with an existing code base
that you want to accelerate, the C2H Compiler can benefit you to the
Altera Corporation
November 2009
9.1
1–15
Nios II C2H Compiler User Guide
相关PDF资料
PDF描述
IPTR-DSPBUILDER DSP BUILDER SOFTWARE
IR11662SPBF IC CNTROL SMART RECTIFIER 8-SOIC
IR1166STRPBF IC MOSFET DRIVER N-CH 200V 8SOIC
IR11672ASPBF IC MOSFET DRIVER 200V 8-SOIC
IR1167ASTRPBF IC SMART SECONDARY DRIVER 8-SOIC
相关代理商/技术参数
参数描述
IPT-DSPBUILDER 功能描述:开发软件 DSP Builder MATLAB SIMULINK RoHS:否 制造商:Atollic Inc. 产品:Compilers/Debuggers 用于:ARM7, ARM9, Cortex-A, Cortex-M, Cortex-R Processors
IPTE-75GF-1000-70D 制造商: 功能描述: 制造商:undefined 功能描述:
IPTG06A18-11SZC 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector with Backshell to Accommodate
IPTG06A18-11SZCPH16 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06A18-11SZCPHM18 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector