Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

About srio ackid in C6678 using Keystone_srio program

$
0
0

Hi, BrandyJ:

I am  working on C6678 SRIO, using an example program Keystone_srio from the forum. I have successfully linked 2 dsp via srio, but I got stuck while trying to apply the program to connect a C6678 to a V6 fpga. The program got stuck in the function Keystone_SRIO_match_ACK_ID , I qoute:

void Keystone_SRIO_match_ACK_ID(Uint32 uiLocalPort,
Uint32 uiDestID, Uint32 uiRemotePort)
{
Uint32 uiMaintenanceValue, uiResult;
Uint32 uiLocal_In_ACK_ID, uiRemote_In_ACK_ID, uiRemote_out_ACK_ID;

//send a "restart-from-error" commond, request the ACK_ID of the other side
srioRegs->RIO_SP[uiLocalPort].RIO_SP_LM_REQ=4;

//wait for link response
while(0==(srioRegs->RIO_SP[uiLocalPort].RIO_SP_LM_RESP>>
CSL_SRIO_RIO_SP_LM_RESP_RESP_VALID_SHIFT))
asm(" nop 5");

uiRemote_In_ACK_ID= (srioRegs->RIO_SP[uiLocalPort].RIO_SP_LM_RESP&
CSL_SRIO_RIO_SP_LM_RESP_ACK_ID_STAT_MASK)>>
CSL_SRIO_RIO_SP_LM_RESP_ACK_ID_STAT_SHIFT;

//Set the local OUTBOUND_ACKID to be same as the responsed ACKID 
srioRegs->RIO_SP[uiLocalPort].RIO_SP_ACKID_STAT= uiRemote_In_ACK_ID;
if(uiRemote_In_ACK_ID)
printf("match_ACK_ID SP_ACKID_STAT=0x%x\n",srioRegs->RIO_SP[uiLocalPort].RIO_SP_ACKID_STAT); //for dubug

do

//set the remote OUTBOUND_ACKID to be same as local INBOUND_ACKID
uiLocal_In_ACK_ID= (srioRegs->RIO_SP[uiLocalPort].RIO_SP_ACKID_STAT&
CSL_SRIO_RIO_SP_ACKID_STAT_INB_ACKID_MASK)>>
CSL_SRIO_RIO_SP_ACKID_STAT_INB_ACKID_SHIFT;

uiMaintenanceValue= ((uiRemote_In_ACK_ID+1)<<
CSL_SRIO_RIO_SP_ACKID_STAT_INB_ACKID_SHIFT)|uiLocal_In_ACK_ID;

//set the remote ACK_ID through maintenance packet
uiResult= Keystone_SRIO_Maintenance(uiLocalPort, uiLocalPort, uiDestID,
0x148+(0x20*uiRemotePort), GLOBAL_ADDR(&uiMaintenanceValue), 
SRIO_PKT_TYPE_MTN_WRITE);

if(uiResult) //fail
continue; 

//readback the remote ID
uiResult= Keystone_SRIO_Maintenance(uiLocalPort, uiLocalPort, 
uiDestID, 0x148+(0x20*uiRemotePort), GLOBAL_ADDR(&uiMaintenanceValue), 
SRIO_PKT_TYPE_MTN_READ);
uiRemote_out_ACK_ID= uiMaintenanceValue&
CSL_SRIO_RIO_SP_ACKID_STAT_OUTB_ACKID_MASK;
}while(uiResult|(uiLocal_In_ACK_ID+1 != uiRemote_out_ACK_ID));
}

It seemed that the ackid on the fpga side couldn't be set like this. I am quite confuse with how the local inbound, outbound and outstanding ack id should be set according to the RIO_SP[uiLocalPort].RIO_SP_LM_RESP, and how should the remote inbound id be set? Is the remote inbound = remote inbound +1?(it seems so according to the functoin)

And if I am gonna set the AckID on the Fpga side, how shall I change the program?

Thanks!

David Yang


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>