Re: Estimating bus load
Brought to you by:
aeb,
bencollins
From: Damien D. <d.d...@te...> - 2003-12-22 16:48:15
|
Hi Kristian, On Mon, 2003-12-22 at 16:57, Kristian H=F8gsberg wrote: > >>You could just read out the contents of the BANDWIDTH_AVAILABLE=20 > >>register. It is offset 0xfffff0000220 at the IRM node. The contents= of=20 > >>this register gives the amount of remaining bandwidth on the bus,=20 > >>measured in bandwith units. A bandwidth unit is the time it takes to= =20 > >>send a quadlet at S1600 - for example, sending 11 quadlets at S400=20 > >>requires 11 * 4 bandwidth units. Of course, this only works if the=20 > >>applications that initiate isochronous streams allocate bandwidth as=20 > >>required. > >=20 > > Interesting way to do it, but the IRM keeps its 0x1333 (4915) value a= t > > all times...? >=20 > The BANDWIDTH_AVAILABLE register isn't updated automatically; it is a > requirement that applications allocate necessary bandwidth prior to > initiating isochronous traffic. This is done by performing a > compare-swap lock transaction against the IRM: 1) read out the contents > of the BANDWIDTH_AVAILABLE register, 2) compute new value for the > register by subtracting desired amount of bandwidth, 3) send > compare-swap lock transaction to IRM to update value, 4) verify that th= e > transcation succeeded and that the returned old value equals the value > originally read from the IRM. If all this succeeds, you have set aside > the required bandwith and can start streaming (provided you have > allocated an isochronous channel). When you have finished streaming yo= u > deallocate the bandwith in the same way. >=20 > When all streaming applications obey this protocol, the > BANDWIDTH_AVAILABLE will reflect the remaining bandwidth on the bus at > any time. OK, well that's something we'll have to add to libdc1394... > The only things that matter for calculating the bus load is the maximum > possible isochronous packet size and the transmission speed. I'm not > familiar with Format_7, but if the packet payload is 3440 bytes then th= e > packet size is 430 quadlets + 3 quadlets (isochronous header + 2 CRC32s= ) > =3D 433 quadlets. At S400, that amounts to 4 * 433 =3D 1732 bandwidth u= nits, > which you must allocate from the IRM using the mechanism described abov= e. <newbie> 1) I guess the size is 860+3, not 430+3 (3440/4=3D860). Right? ;-) 2) Is it true that if I start an isochronous transmission the device must send a packet at every 125us cycle? Or it just _might_ send a packet so I have to book the whole bandwidth anyway? </newbie> Damien --=20 _ Damien Douxchamps (=B0- PhD Student / Research Assistant //\ Image Processing Group, Telecom Laboratory, UCL, Belgium V_/_ http://www.tele.ucl.ac.be/MEMBERS/Douxchamps_Damien_e.html |