DSPRelated.com
Forums

SRIO & interrupt

Started by gaut...@gmail.com August 2, 2010
Hi all,

I am a student and a beginner in DSP programming. This is my first post there.
I am working on the DSK 6455 board in loop back mode (without mezzanine) using CCS 3.2 version.

I am trying to generate an interrupt at the end of an SRIO transfer.
I read a lot of topics in different forum about SRIO and I also read a lot of data sheets (TMS320C6455, SRIO User's guide, Chip Support Library).
Even all of this, I am a little lost. I think I should use doorbell but I didn't really understand how it works.

For the moment SRIO transfer is working, and I am trying to generate an interrupt with this kind of code, at the end of the TI srio_write function:
***************************************************
volatile Uint32 *RIO_DOORBELL0_ICSR;

...

RIO_DOORBELL0_ICSR = (Uint32 *)0x02D00200;
*RIO_DOORBELL0_ICSR = 0x1;
**************************************************
I am not sure if it is the best way to generate an interrupt, and in fact, I don't know if it is really working...

I also saw in one topic that maybe I should use "vector.asm" file to be able to call the interrupt service routine for the selected interrupt line.
In fact my final objective will be to use this interrupt to "chain" SRIO transfers and send a lot of data (beyond the 4kB SRIO payload), and measure the transfer rate.

Can you try to help me?
All help is welcome ;-)

Thanks a lot.
Goutchye.

PS: I am not an English people so I am sorry if my language is not excellent. I do my best!

_____________________________________
This is what I did on the receiving part

Uint32 *db1_ICCR = (Uint32 *)0x02D00218;
....
*db1_ICCR = (Uint32)0x0000FFFF;
resp_db.index = 0;
resp_db.data = 0;
do
{
CSL_srioGetHwStatus (hSrio, CSL_SRIO_QUERY_DOORBELL_INTR_STAT,
&resp_db);
} while(resp_db.data == 0x00);
....

When a doorbell is received, the program jumps out of the while loop and you
can do what you need.

Hope this Is helpful for your case.

Renaissance
On Mon, Aug 2, 2010 at 1:45 AM, wrote:

> Hi all,
>
> I am a student and a beginner in DSP programming. This is my first post
> there.
> I am working on the DSK 6455 board in loop back mode (without mezzanine)
> using CCS 3.2 version.
>
> I am trying to generate an interrupt at the end of an SRIO transfer.
> I read a lot of topics in different forum about SRIO and I also read a lot
> of data sheets (TMS320C6455, SRIO User's guide, Chip Support Library).
> Even all of this, I am a little lost. I think I should use doorbell but I
> didn't really understand how it works.
>
> For the moment SRIO transfer is working, and I am trying to generate an
> interrupt with this kind of code, at the end of the TI srio_write function:
> ***************************************************
> volatile Uint32 *RIO_DOORBELL0_ICSR;
>
> ...
>
> RIO_DOORBELL0_ICSR = (Uint32 *)0x02D00200;
> *RIO_DOORBELL0_ICSR = 0x1;
> **************************************************
> I am not sure if it is the best way to generate an interrupt, and in fact,
> I don't know if it is really working...
>
> I also saw in one topic that maybe I should use "vector.asm" file to be
> able to call the interrupt service routine for the selected interrupt line.
> In fact my final objective will be to use this interrupt to "chain" SRIO
> transfers and send a lot of data (beyond the 4kB SRIO payload), and measure
> the transfer rate.
>
> Can you try to help me?
> All help is welcome ;-)
>
> Thanks a lot.
> Goutchye.
>
> PS: I am not an English people so I am sorry if my language is not
> excellent. I do my best!
Hi Renaissance,

it helps me a little but could you show me what you did in your master part?
I would like to see how you generate your doorbell packet.

Thanks a lot!

Best regards,
Goutchye.

_____________________________________
Hope this is helpful.

This is my doorbell function on master side.

in the main function I did the following

...
LSU_Num = 0;
//Reserved Doorbell Reg # rsv Doorbell bit
//9 2 1 4
//srio_doorbell(0x23);//Doorbell Reg #1 Doorbell bit 0011
srio_doorbell(0x23,LSU_Num);
...
void srio_doorbell (unsigned short dbell_num, int reg_no)
{

Uint16 dbellmsg;
Uint32 i;
dbellsend(dbell_num, reg_no);

if(check_status(reg_no)){
return; //kenken
}
}

void dbellsend( unsigned short dbellmsg, int reg_no)
{
srioRegs->LSU[reg_no].LSU_REG0 = CSL_FMK( SRIO_LSU_REG0_ADDRESS_MSB,0 );
srioRegs->LSU[reg_no].LSU_REG1 = CSL_FMK(
SRIO_LSU_REG1_ADDRESS_LSB_CONFIG_OFFSET, 0 );
srioRegs->LSU[reg_no].LSU_REG2 = CSL_FMK( SRIO_LSU_REG2_DSP_ADDRESS, 0 );
srioRegs->LSU[reg_no].LSU_REG3 = CSL_FMK( SRIO_LSU_REG3_BYTE_COUNT, 0 );

srioRegs->LSU[reg_no].LSU_REG4 = CSL_FMK( SRIO_LSU_REG4_OUTPORTID, port
)|
CSL_FMK( SRIO_LSU_REG4_PRIORITY,0 )|
CSL_FMK( SRIO_LSU_REG4_XAMBS,0 )|
CSL_FMK( SRIO_LSU_REG4_ID_SIZE,1 )|
CSL_FMK( SRIO_LSU_REG4_DESTID,DstID )|
CSL_FMK( SRIO_LSU_REG4_INTERRUPT_REQ,0 ); // no intrrupt

srioRegs->LSU[reg_no].LSU_REG5 = CSL_FMK( SRIO_LSU_REG5_DRBLL_INFO,
dbellmsg )|
CSL_FMK( SRIO_LSU_REG5_HOP_COUNT,0x00 )|
CSL_FMK( SRIO_LSU_REG5_PACKET_TYPE,REQ_DOORBELL );
}