This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSB12LV32-EP: Determining When Complete Message Is Available in GRF

Part Number: TSB12LV32-EP

We are using the TSB12LV32-EP for 1394 communication. Our bus uses the ATF and GRF with asynchronous stream messages (ie, messages with isochronous headers, sent/received in the asynchronous period). We are not using RXGRFPKT (GRF packet received) interrupts.

I am trying to determine how to know when a full message is available in the GRF. If I read the FIFO Status register and GRFEMPTY indicates that the GRF is not empty, and CD indicates that the next quadlet is a packet token, then can I read the packet token and assume that the number of quadlets indicated by the packet token are already in the GRF, available to be read? For example, if I read a packet token that indicates QUADLET_COUNT is 50, then can I assume that the 50 data quadlets are in the GRF already?

Or is it possible that the packet token is in the GRF, but the data quadlets are not yet there? If so, how do I know when the data quadlets are available? Note that is seems GRFUSED may not indicate exactly how many quadlets are available, due to the possibility of some quadlets being in the the GRF read buffer and therefore not being reflected in GRFUSED. For example, in the above scenario, once the whole packet is available, it seems that GRFUSED might only indicate 46 or 45, since 4 or 5 quadlets may be in the read buffer. So I don't see an easy way of knowing when the 50 quadlets are available, unless, as I pondered above, they are already available to be read once I read the packet token.

Thanks

Joel

  • Joel

    Yes. The receiver places a status quadlet in the GRF after the last quadlet of the packet is confirmed into the GRF. The status quadlet contains the error code for the packet. The errCode would need to be read to determine if the received packet was Complete (no errors) or had a DataErr or CRCErr. In any case the numofQuadlets field indicates the Total number of quadlets in the current packet (payload and header quadlets only).

    Thanks

    David

  • Great. Thanks.

    It's a little counter-intuitive, since the packet status is the first word in the FIFO. It seems conceivable that the packet status could be placed into the FIFO, which would increase the FIFO usage by 1 and indicate the FIFO is no longer empty, but the actual data words wouldn't be in the FIFO yet (I assume this takes some time). I guess under the hood the device must write the entire message contents to the FIFO before indicating that the FIFO is no longer empty and setting the corresponding interrupt flag.

    Joel