Download UG638 - Xilinx

Transcript
SharedMemoryProxy
be read / written and the start address. A reference to the SharedMemoryProxy is also
passed to the servicer function, along with the void pointer used in the constructor.
Parameters:
name The name by which the shared memory is published to the operating system,
and with which other threads can discover the created memory.
nwords number of words that the memory will store
word_size number of bits per word
rs The callback function that will service memory requests
rs_arg A void* argument that will be passed along the the requestServicer callback
~SharedMemoryProxy ()
Releases the instance's handle to the shared OS resource (through which service requests
are made). This is a reference counted resource; it may continue to persist after the
SharedMemoryProxy that established it is destroyed. This means that when the
SharedMemoryProxy destructor is called any remaining clients of the memory will run
into trouble -- in particular any read / write calls that they make will go un-serviced (and
either hang or timeout).
Member Functions
virtual bool couldBlockOnReadOrWrite () const [inline, virtual]
Returns:
True if a call to read() or write() could either block (if the timeout_sec parameter to the
read/write call is set to NEVER), or timeout. A SharedMemory object that did not
create the memory could be referencing a memory that was created, on the other side,
as either as LockableSharedMemory or a SharedMemoryProxy. In either of these cases,
it is possible for read/write calls to block. In the case of a SharedMemory object
interfacing to a LockableSharedMemory, read and write operations force implicit
acquireLock and releaseLock semantics.
Re-implemented from SharedMemory.
void service ()
Will check to see if a client has made a service request, and if it has, the requestServicer
callback (established by the SharedMemoryProxy constructor) will be called.
const Sysgen::StdLogicVectorVector & viewAsStdLogicVectorVector () const
[virtual]
Returns:
A const StdLogicVectorVector reference whose internal data store is mapped onto the
physical shared memory. This method should only be used in high-performance
applications. It allows fast, but unchecked and therefore dangerous, access.
Sysgen::StdLogicVectorVector & viewAsStdLogicVectorVector () [virtual]
Returns:
System Generator for DSP Reference Guide
UG638 (v11.4) December 2, 2009
www.xilinx.com
509