On 3/8/12 5:02 PM, Ziersch, Troy (Contractor) wrote:
UNCLASSIFIED
Hi Jim,
I assume from your description that there will also be the following
methods which are not yet documented in the ACI doc.
OA::Worker::beforeQuery
OA::Worker::afterConfig
These are already in OcpiContainerApi.h, (afterConfigure), but are not
documented.
Thus the SW needs to do the following to atomically read my HDL params
OA::Worker::beforeQuery
OA::Property::set{Type}Value
OA::Property::set{Type}Value
OA::Property::set{Type}Value
Which is what I was expecting before I found the ReadSync and WriteSync
attributes and no beforeQuery and afterConfig worker methods.
Your example isn't quite right. You should use beforeQuery before
"get", not "set".
A few other comments: these control operations are only necessary when
you are getting dynamic values that need to be accessed atomically.
This is actually pretty rare, but needed sometimes.
And it is a burden on the worker to perform (and store) the "snapshot".
When compiled optimized, note that these "get" member functions actually
get optimized into a very small number of inlined instructions which
load the virtual address of the registers from the stack and perform a
single "load" instruction to retrieve the values (assuming that the
worker does not provide a particular error response).
Also, the OpenCPI HDL control plane (the mechanism/IP that converts PCI
accesses into worker configuration property reads and writes) takes care
to time out access to worker properties so that if the worker is
stuck/wedged/broken, an error is set, but the PCI access still succeeds.
We do not have a documented API to test for such errors, but we use this
feature sometimes during debugging.
Also, we are working on a project that includes implementing all the
control plane via ethernet as an alternative to PCIe.
Jim
_______________________________________________
opencpi_dev mailing list
[email protected]
http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org