Resources
Table 4–2. Function Build Configurations
Configuration
Use hardware
accelerator in place
of software
implementation.
Flush data cache
before each call
Use hardware
accelerator in place
of software
Meaning
Use this configuration if you are not certain whether cache coherency is an issue in your
system.
In this configuration, every time the software calls the accelerated function, the wrapper
function flushes the entire Nios II data cache, to prevent cache coherency issues. The
C2H Compiler inserts flush code into the wrapper function so no source code modification
is necessary. Since flushing the cache is a fixed overhead, if you have strict processing
time requirements you need to study the system architecture and determine if this
operation is necessary.
This configuration uses the hardware accelerator without flushing the data cache before
each invocation. Use this configuration with algorithms that do not require Nios II data
cache flushing.
implementation
Do not use this configuration if you have not studied your algorithm to determine if it could
have cache coherency problems. The accelerated function might create cache coherency
problems in certain corner cases. To prevent cache coherency problems, use one or more
of the following techniques in your code:
Allocate all shared data in uncached Nios II memory space. Refer to “ Bit-31 Cache
Bypass” in the Cache and Tightly-Coupled Memory chapter of the Nios II Software
Developer's Handbook . (1)
Flush all shared data before calling the accelerated function.
Place all shared data in a tightly coupled memory.
Manage cache coherency in a multiprocessor system by establishing a cache
coherency protocol between the processor controlling the accelerated function and all
other processors.
Use cache bypass macros to access all shared data.
Do not share memory between the hardware accelerator and the Nios II processor
Refer to the Cache and Tightly-Coupled Memory chapter of the Nios II Software
Developer's Handbook to learn more about cache coherency.
Use software
implementation
Much like the project wide configuration, this causes the C2H Compiler to link the
software implementation of the accelerated function. Unlike the project wide
configuration, this only affects a single accelerated function and not the entire software
project. You can use this configuration to prototype changes to your algorithm without
having to regenerate or recompile the hardware. This project configuration does not
remove the existing accelerator from the system.
Note to Table 4–2 :
(1)
Use caution passing uncached pointers to a C2H accelerator. There are two unusual situations that require special
consideration: (a) If the accelerator performs direct arithmetic or comparisons on the address value of a pointer, it
must account for the possibility that bit 31 is set. (b) If the accelerated function masters a component whose true
address is >= 0x80000000 , and uses the same Avalon-MM master port to connect to the memory that it shares
with the Nios II processor, uncached pointers to the shared memory might result in spurious Avalon-MM transfers
to addresses >= 0x80000000 .
4–4
Nios II C2H Compiler User Guide
9.1
Altera Corporation
November 2009
相关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
IR11682STRPBF IC MOSFET DRIVER DUAL 200V 8SOIC
IR1168SPBF IC MOSFET DRIVER DUAL 200V 8SOIC
IR1176STR IC DRIVER RECT SYNC 5V 4A 20SSOP
相关代理商/技术参数
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
IPTG06A18-11SZCSR 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06ASE18-11SZ 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector
IPTG06E18-11SZC 制造商:GLENAIR 制造商全称:Glenair, Inc. 功能描述:Straight Plug Connector