14.08.2013 Views

snap ethernet-based i/o units protocols and programming guide

snap ethernet-based i/o units protocols and programming guide

snap ethernet-based i/o units protocols and programming guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Bytes 0–3<br />

Bytes 4–7<br />

Bytes 8–11<br />

Bytes 12–15 0–3<br />

Bytes 4–7<br />

Bytes 8–11<br />

Bytes 12–15<br />

Bytes 16–19<br />

Last four bytes<br />

CHAPTER 4: USING THE IEEE 1394-BASED PROTOCOL<br />

Parameter Full Name Description<br />

quadlet_data Quadlet data Data being delivered to the target node. If it is not<br />

an even four bytes of data, pad with zeros at the<br />

end, not the beginning.<br />

data_block Data parameter Data being transferred to the target device.<br />

Packet Structure<br />

The following pages show the structure for read <strong>and</strong> write request <strong>and</strong> response packets. The<br />

SNAP Ethernet-<strong>based</strong> brain does not use the parameters destination_ID, rt, or pri (or reserved<br />

areas). These areas must be zero filled. They are shown shaded. The source_ID parameter<br />

(described in the previous table) is optional. If you do not use it, fill it with zeros.<br />

IEEE 1394 packets have boundaries at four bytes (a quadlet). When you send a Write Quadlet or<br />

Read Quadlet Request, if the data you enter in the quadlet_data parameter is not in even<br />

multiples of four bytes, fill the remaining spaces with zeros to complete the quadlet. Zero fill at<br />

the end, not the beginning, of the data.<br />

You do not need to zero fill data fields in Write Block or Read Block Requests.<br />

Write Quadlet Request<br />

Tcode = 0<br />

destination_ID tl rt tcode pri<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />

source_ID destination_offset<br />

Write Block Request<br />

Tcode = 1<br />

destination_offset<br />

quadlet_data<br />

destination_ID tl rt tcode pri<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0<br />

source_ID destination_offset<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />

destination_offset<br />

data_length extended_tcode<br />

94 SNAP Ethernet-Based I/O Units Protocols <strong>and</strong> Programming Guide<br />

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!