UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
1,418 Views
Registered: ‎03-29-2017

Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

Hi,

 

I am using KINTEX custom Board [(xc7k325tffg900-2)]  for Hardware Implementation.

 

My workflow processes involve,

1. Created HLS IP for Error correction Code

2. Integrated HLS IP with microblaze and aurora and generated Bitstream

3. Export Hardware and Launch XSDK.

IN xsdk, Code execution stops in While loop without any error message or warning message.

 

I am stuck in this work for many days. Please anyone help me and guide me. I am attaching my design.

 

XSDK Source Code

 

{

...

.....

 int i, m;

 u32 result[102];
 u32 values[204];

 XAurora_decoder LDPC;
 XAurora_decoder  *LDPCPTR=&LDPC;
 XAurora_decoder_Initialize(LDPCPTR,XPAR_AURORA_DECODER_0_DEVICE_ID);
 XAurora_decoder_EnableAutoRestart(LDPCPTR);
 XAurora_decoder_Start(LDPCPTR);
 printf("\r\n Codeword received: \r\n");

 printf("\r\n Error Codeword: \r\n");
 XAurora_decoder_Write_x_Words(LDPCPTR, 0, values, 204);
 while (!XAurora_decoder_IsDone(LDPCPTR));  // CODE STOPS HERE Without displaying any values in CONSOLE
 for(i=0;i<204;i++)
        {
         xil_printf("%d", values[i]);
        }

 printf("\r\n DECODED Codeword: \r\n");
while (!XAurora_decoder_IsDone(LDPCPTR)); // CODE STOPS HERE Without displaying any values in CONSOLE
XAurora_decoder_Read_dout_Words(LDPCPTR, 0, result, 102);
  .....

...

}

 

Dec_Aur.PNG
XSDk.PNG
0 Kudos
6 Replies
Moderator
Moderator
1,407 Views
Registered: ‎11-09-2015

Re: Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

Hi @thaus_015,

 

Is is stuck in the while loop or does it exits the while loop? Did you consider that XAurora_decoder_IsDone(LDPCPTR) could be at 1 directly (when entering the while loop)?

Did you try to debug step by step?

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Explorer
Explorer
1,402 Views
Registered: ‎03-29-2017

Re: Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

Hi,

 

 

Sorry , Update : I am trying microblaze and aurora with custom board :xc7k160tffg677-2.

 

Yes,  i have tried step by step. But it is stucking in while loop.

The same design, i have tried with only microblaze with Kintex custom board (xc7k325tffg900-2) .Its working fine. I am attaching my design

 

I am pasting FULL SOURCE CODE

 

/************************** Function Prototypes ******************************/


int XLlFiforx(XLlFifo *InstancePtr, u16 DeviceId);
int RxReceive(XLlFifo *InstancePtr, u32 *DestinationAddr, int end);
int decoder(u32 *codeword);

/************************** Variable Definitions *****************************/

XLlFifo FifoInstance;

u32 DestinationBuffer[204];

int main()
{
    
    int Status;
    xil_printf("Entering RX loop\r\n");
    
    {
    Status = XLlFiforx(&FifoInstance, FIFO_DEV_ID);
    if (Status != XST_SUCCESS)
        {
        xil_printf("Axi Streaming FIFO Test Failed\n\r");
        return XST_FAILURE;
        }

    xil_printf("Successfully ran Axi Streaming FIFO \n\r");
    }
    return XST_SUCCESS;

}

int XLlFiforx(XLlFifo *InstancePtr, u16 DeviceId)
{
    XLlFifo_Config *Config;
    int Status,m;
    Status = XST_SUCCESS;

    Config = XLlFfio_LookupConfig(DeviceId);
    if (!Config)
    {
        xil_printf("No config found for %d\r\n", DeviceId);
        return XST_FAILURE;
    }

    Status = XLlFifo_CfgInitialize(InstancePtr, Config, Config->BaseAddress);
    if (Status != XST_SUCCESS)
        {

        xil_printf("Initialization failed\n\r");
        return Status;
        }

    Status = RxReceive(InstancePtr,DestinationBuffer,204)

    decoder(DestinationBuffer);

    if (Status != XST_SUCCESS)
                {
        xil_printf("Receiving data failed");
        return XST_FAILURE;
                }

    return Status;
}

int decoder(u32 *codeword)
{

 int i, m;
 u32 result[102];

 XAurora_decoder LDPC;
 XAurora_decoder  *LDPCPTR=&LDPC;
 XAurora_decoder_Initialize(LDPCPTR,XPAR_AURORA_DECODER_0_DEVICE_ID);
 XAurora_decoder_EnableAutoRestart(LDPCPTR);
 XAurora_decoder_Start(LDPCPTR);
 printf("\r\n Error Codeword: \r\n");

 XAurora_decoder_Write_x_Words(LDPCPTR, 0, codeword, 204);
 while (!XAurora_decoder_IsDone(LDPCPTR));
 for(i=0;i<204;i++)
       {
         xil_printf("%d", DestinationBuffer[i]);
       }
 printf("\r\n DECODED Codeword: \r\n");
 while (!XAurora_decoder_IsDone(LDPCPTR));
 XAurora_decoder_Read_dout_Words(LDPCPTR, 0, result, 102);
    for(m=0;m<102;m++)
     {
     xil_printf("%d", result[m]);
     }

    
}

int RxReceive (XLlFifo *InstancePtr, u32* DestinationAddr,int end)
{

    int i;
    //int Status;
    u32 RxWord;
    static u32 ReceiveLength=0;

    xil_printf(" Receiving data ....\n\r");
    /* Read Receive Length */
    while(1)
    {
    ReceiveLength = (XLlFifo_iRxGetLen(InstancePtr))/WORD_SIZE;
    xil_printf("ReceiveLength: %d",ReceiveLength);

         if (ReceiveLength > 0)
         {
            for ( i=0; i < end; i++)
            {
              RxWord = 0;
              RxWord = XLlFifo_RxGetWord(InstancePtr);
             *(DestinationAddr+i) = RxWord;
             xil_printf("data : %d\r\n",*(DestinationAddr+i));
            }

    break;
        }
    }
    return XST_SUCCESS;
}

 

Its just printing "Error Codeword" afterthat It is stuck in the while loop and nothing else printed.

 

LDPC_decoder.PNG
0 Kudos
Moderator
Moderator
1,393 Views
Registered: ‎11-09-2015

Re: Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

Hi @thaus_015,

 

Could you give more information about where it is stuck?

 

I guess in the function: XAurora_decoder_Read_dout_Words(LDPCPTR, 0, result, 102);?

 

Did you correctly updated the hdf in SDK file when you changed the target board?

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Explorer
Explorer
1,385 Views
Registered: ‎03-29-2017

Re: Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

 

In function int decoder(u32 *codeword)

 

I am stuck in first While function itself :XAurora_decoder_Write_x_Words(LDPCPTR, 0, DestinationBuffer, 204);

 

1. Suppose if i comment that [//while loop] means, Its going to next While loop : XAurora_decoder_Read_dout_Words(LDPCPTR, 0, result, 102);

 

2. Suppose if i comment Both while loop functions

    a. XAurora_decoder_Write_x_Words(LDPCPTR, 0, DestinationBuffer, 204);

    b. XAurora_decoder_Read_dout_Words(LDPCPTR, 0, result, 102);

 

Its printing all final values as  ZERO`s.

 

Did you correctly updated the hdf in SDK file when you changed the target board? Yes, I have correctly updated

0 Kudos
Moderator
Moderator
1,380 Views
Registered: ‎11-09-2015

Re: Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

Hi @thaus_015,

 

Could you debug more in the XAurora_decoder_Write_x_Words?

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Explorer
Explorer
1,373 Views
Registered: ‎03-29-2017

Re: Need Help:While loop stops without any error message or warning message in Xilinx SDK on KINTEX

I have checked the Function :XAurora_decoder_Write_x_Word, added   xil_printf statements, its printing

 

u32 XAurora_decoder_Write_x_Words(XAurora_decoder *InstancePtr, int offset, int *data, int length) {
    Xil_AssertNonvoid(InstancePtr != NULL);
    Xil_AssertNonvoid(InstancePtr -> IsReady == XIL_COMPONENT_IS_READY);

    int i;

    if ((offset + length)*4 > (XAURORA_DECODER_A_ADDR_X_HIGH - XAURORA_DECODER_A_ADDR_X_BASE + 1))
        return 0;
    xil_printf("Writing Words into Decoder");
    for (i = 0; i < length; i++) {
        *(int *)(InstancePtr->A_BaseAddress + XAURORA_DECODER_A_ADDR_X_BASE + (offset + i)*4) = *(data + i);
    }
    xil_printf("EXIT");
    return length;
}

 

Its working : In console I have got result like that: Error Codeword:
Writing Words into DecoderEXIT

 

//

XAurora_decoder_Write_x_Words(LDPCPTR, 0, values, 204);  Its working 
 while (!XAurora_decoder_IsDone(LDPCPTR)); Its stucking into WHILE LOOP
 for(i=0;i<204;i++)
        {
         xil_printf("%d", values[i]);       //NOTHING PRINTING
        }

 printf("\r\n DECODED Codeword: \r\n");
while (!XAurora_decoder_IsDone(LDPCPTR));
XAurora_decoder_Read_dout_Words(LDPCPTR, 0, result, 102); //

0 Kudos