<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=ridTitle>Clear Day</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE>BODY {
        MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 10px; COLOR: #0033cc; FONT-FAMILY: Arial, Helvetica
}
</STYLE>

<META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
<BODY id=ridBody background=cid:685495500@26102004-1d1c>
<DIV><SPAN class=685495500-26102004>Hi,</SPAN></DIV>
<DIV><SPAN class=685495500-26102004></SPAN>&nbsp;</DIV>
<DIV><SPAN class=685495500-26102004>I am very sorry to disturb you.<BR><FONT 
face=Arial color=#0033cc>I have a problem.</FONT><BR><FONT face=Arial 
color=#0033cc></FONT><BR><FONT face=Arial color=#0033cc>We use the powerPC chip, 
though it is not your IBM chip.</FONT><BR><FONT face=Arial color=#0033cc>It is 
Motorola MPC8260.</FONT><BR><FONT face=Arial color=#0033cc>We have the HPI to 
the local bus of the MPC8260.</FONT><BR><FONT face=Arial 
color=#0033cc></FONT><BR><FONT face=Arial color=#0033cc>Firstly we will write 
data to the HPI,</FONT><BR><FONT face=Arial color=#0033cc>then read data from 
the HPI to the SDRAM(this SDRAM is connected with 60x-BUS).</FONT><BR><FONT 
face=Arial color=#0033cc>The last we will read the data from the SDRAM to 
compare the data which is write to HPI.</FONT><BR><FONT face=Arial 
color=#0033cc></FONT><BR><FONT face=Arial color=#0033cc>But we find it is 
different, there is a hop.</FONT><BR><FONT face=Arial color=#0033cc>After we 
read out the data from SDRAM, we find there is a change.</FONT><BR><FONT 
face=Arial color=#0033cc>e.g. the data which is write to the HPI is ordered by 
1,2,3,</FONT><FONT face=Arial color=#ff0000>4,5,6</FONT><FONT face=Arial 
color=#0033cc>,7,8. </FONT><BR><FONT face=Arial color=#0033cc>but the data which 
is read out from HPI and store to SDRAM is 1,2,3,</FONT><FONT face=Arial 
color=#ff0000>4,6</FONT><FONT face=Arial color=#0033cc>,7,8,..</FONT><BR><FONT 
face=Arial color=#0033cc></FONT><BR><FONT face=Arial color=#0033cc>Then I modify 
the source codes as the follows:</FONT><BR><FONT face=Arial color=#0033cc>void 
hpi_ul_memcpy_dsp2h(void *dest,U32 src_dsp_memory_addr, U32 
count)</FONT><BR><FONT face=Arial color=#0033cc>{</FONT><BR><FONT face=Arial 
color=#0033cc>..............</FONT><BR><FONT face=Arial color=#0033cc>for(i = 0; 
i &lt; len ; i+=4)<BR>0x9ee940 +0x074: li r0, 0x0 (0)<BR>0x9ee944 +0x078: stw 
r0, 0x18(r31)<BR>0x9ee948 +0x07c: lwz r0, 0x18(r31)<BR>0x9ee94c +0x080: lwz r9, 
0x1c(r31)<BR>0x9ee950 +0x084: cmpl crf1, 0, r0, r9<BR>0x9ee954 +0x088: bc 0xc, 
0x4, hpi_ul_memcpy_dsp2h + 0x90<BR>0x9ee958 +0x08c: b hpi_ul_memcpy_dsp2h + 
0xcc<BR>{<BR>#if 0 /* the old source codes*/<BR>*p_cur = 
READ_UL_HPI_REG(UL_HPIDA_ADDR);<BR>p_cur++;<BR>#else /* the new source 
codes*/<BR>tmpReadRst = READ_UL_HPI_REG(UL_HPIDA_ADDR);<BR>0x9ee95c +0x090: lis 
r9, 0x5200 (20992)<BR>0x9ee960 +0x094: ori r9, r9, 0x8<BR>0x9ee964 +0x098: lwz 
r0, 0x0(r9)<BR>0x9ee968 +0x09c: stw r0, 0x24(r31)<BR>*p_cur = 
tmpReadRst;<BR>0x9ee96c +0x0a0: lwz r9, 0x14(r31)<BR>0x9ee970 +0x0a4: lwz r0, 
0x24(r31)<BR>0x9ee974 +0x0a8: stw r0, 0x0(r9)<BR>p_cur++;<BR>0x9ee978 +0x0ac: 
lwz r9, 0x14(r31)<BR>0x9ee97c +0x0b0: addi r0, r9, 0x4 (4)<BR>0x9ee980 +0x0b4: 
or r9, r0, r0<BR>0x9ee984 +0x0b8: stw r9, 
0x14(r31)<BR>#endif<BR>}</FONT><BR><FONT face=Arial 
color=#0033cc>..........</FONT><BR><FONT face=Arial 
color=#0033cc>}</FONT><BR><FONT face=Arial color=#0033cc>We find the problem is 
disappeared.</FONT><BR><FONT face=Arial color=#0033cc></FONT><BR><FONT 
face=Arial color=#0033cc>But I donot know the reason.</FONT><BR><FONT face=Arial 
color=#0033cc>I only know something, like the data which is loaded by loading 
instruction to register, </FONT><BR><FONT face=Arial color=#0033cc>is valid only 
when the instruction is excuted after 2-clock-cycle</FONT><BR><FONT face=Arial 
color=#0033cc></FONT><BR><FONT face=Arial color=#0033cc>Do you tell me the 
reason??</FONT><BR><FONT face=Arial color=#0033cc></FONT><BR><FONT face=Arial 
color=#0033cc>Wait for your reply.</FONT> </SPAN></DIV>
<P>Best Regards,<BR>Soar Wu<BR><BR>Node B, 3G Department<BR>UTStarcom (China) 
Inc.<BR>Tel:(86-0755)26952899-4610<BR><A 
href="mailto:Email:soar.wu@utstar.com">Email:soar.wu@utstar.com</A></P>
<P>&nbsp;</P></BODY></HTML>