Hi Troy,

Per the OpenCPI_Generic_Authoring_Model.pdf document, arraylength specifies an array, which is of fixed size. SequenceLength specifies a variable length sequence, which has a bounded size.

In general, when a sequence is part of a message, the message data must contain an "element count" as an aligned 32 bit value, before the elements of the sequence (consistent with CDR marshalling in CORBA and DDS etc.).

But there is an important, simplifying special case: when the whole message/operation is a single sequence argument, this element count is implied by the byte length of the overall message (unless the sequence elements themselves are variable length). Thus typical simple variable length messages of fixed size types are described as a sequence, but only contain the data elements of the sequence, and do not contain an element count. This keeps common and simple cases simple.

The byte length of the overall message is specified in the external port API and the RCC/OCL worker's port interface.

For HDL worker ports using the WSI/stream profile, it is conveyed by the OCP burst length (number of "words") times the data path width (in bytes), with the last word in the burst subject to byte-enables.

If any of this isn't clear, please say so, since we will be updating the doc shortly!

Jim











On 3/7/12 4:44 PM, Ziersch, Troy (Contractor) wrote:

*UNCLASSIFIED*

Hi,
In test_protocol.xml given below is the ArrayLength of Samples an absolute size or a maximum size? I'd like to have a protocol where the amount of samples is variable up to a given maximum.
Thanks,
Troy
<Protocol>
<Operation Name="Samples">
<Argument Name="data" Type="Short" ArrayLength="4k"/>
</Operation>
<Operation Name="Sync"/>
<Operation Name="Time">
<Argument Name="time" Type="ULongLong"/>
</Operation>
</Protocol>

*IMPORTANT*: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email.



_______________________________________________
opencpi_dev mailing list
[email protected]
http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org

_______________________________________________
opencpi_dev mailing list
[email protected]
http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org

Reply via email to