<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>hello!</DIV>
<DIV>the field of [31:0] in the register MIO_TWS_SW_TWSI is data field, in the following function the&nbsp;low-8-bit of the 16-bit&nbsp;address is&nbsp;loaded in the MIO_TWS_SW_TWSI[7:0].&nbsp;WHY?&nbsp;</DIV>
<DIV>int octeon_twsi_set_addr8(uint8_t dev_addr, uint16_t addr)<BR>{</DIV>
<DIV>&nbsp;&nbsp;&nbsp; /* 16 bit internal address ONLY */<BR>&nbsp;&nbsp;&nbsp; uint64_t val;<BR>&nbsp;&nbsp;&nbsp; octeon_write64(CVMX_MIO_TWS_SW_TWSI,0x8000000000000000ull | ( 0x0ull &lt;&lt; 57) | (((uint64_t)dev_addr) &lt;&lt; 40) | (addr &amp; 0xff)); // tell twsii to do the read<BR>&nbsp;&nbsp;&nbsp; while (octeon_read64(CVMX_MIO_TWS_SW_TWSI)&amp;0x8000000000000000ull);<BR>&nbsp;&nbsp;&nbsp; val = octeon_read64(CVMX_MIO_TWS_SW_TWSI);<BR>&nbsp;&nbsp;&nbsp; if (!(val &amp; 0x0100000000000000ull)) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return(0);<BR>}</DIV>
<DIV>&nbsp;</DIV><br><!-- footer --><br> 
<hr>
<font style="font-size:12px;line-height:15px;">尽享江北城市荣光,开启滨江世界岸区,</font><a style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" href="http://popme.163.com/link/003982_0526_7909.html">东海岸赠空间近50%</a>