Avnet Electronics Marketing - Community Forum
    |   
 
Home Design Services My Account About Avnet
Reply
Visitor
Juergen
Posts: 8
Registered: ‎10-21-2010
0

Porting PLB-based IVK Design to ISE 13.3

Hi Mario

 

I tried to port a PLB-based IVK design (a slight modification of Camera Frame Buffer demo) from ISE 13.1 to 13.3. I could generate the bitstream in XPS 13.3 and the SW in SDK 13.3. However, on the IVK target the SW hangs in routine fmc_iic_xps_IicRead at line

} while (StatusReg != (XIIC_SR_RX_FIFO_EMPTY_MASK ....

 

So it looks as there is something wrong with the IIC access to the FMC module. 

 

Can you give me a hint on what the problem could be? Is it related to the newer versions of EDK IP blocks available in 13.3?

 

Regards,

Juergen

Avnet Employee
AlbertaBeef
Posts: 318
Registered: ‎04-16-2009
0

Re: Porting PLB-based IVK Design to ISE 13.3

Juergen,

 

This could be related to driver updates.

 

In order to test this, comment out the "FMC Validation" code, but keep the call to fmc_ipmi_enable( ) ...

 

#if 0

   // FMC Module Validation

   if ( fmc_ipmi_detect( &fmc_ipmi_iic, "FMC-IMAGEOV", FMC_ID_SLOT1 ) )

   {

      fmc_ipmi_enable( &fmc_ipmi_iic, FMC_ID_SLOT1 );

   }

   else

   {

      fmc_ipmi_disable( &fmc_ipmi_iic, FMC_ID_SLOT1 );

      exit(0);

   }

#else

   // Skip FMC Module Validation

   xil_printf("Skipping FMC Module Validation ...\r\n" );

   fmc_ipmi_enable( &fmc_ipmi_iic, FMC_ID_SLOT1 );

#endif

 

 

Let me know if your design works with this modification.

 

Regards,

 

Mario.

Visitor
Juergen
Posts: 8
Registered: ‎10-21-2010
0

Re: Porting PLB-based IVK Design to ISE 13.3

Mario,

 

Yes, it works!

 

I saw that there was a driver update for the xps_iic module between 13.1 and 13.3. I think it must be related to this, since xps_iic is the only module involved that had an update.

 

Although I dont understand exactly why fpGpoRead still works with 13.3 and fpIicRead doesn't, I appreaciate your fast support very much.

 

Thanks a lot,

 

Juergen

Avnet Employee
AlbertaBeef
Posts: 318
Registered: ‎04-16-2009
0

Re: Porting PLB-based IVK Design to ISE 13.3

Juergen,

 

Would you be willing to share your 13.4 project for the benefit of the community ?

 

I will not be updating the PLB-based designs.

Instead, I will be moving to AXI-based designs.

 

Regards,

 

Mario.

Visitor
Juergen
Posts: 8
Registered: ‎10-21-2010
0

Re: Porting PLB-based IVK Design to ISE 13.3

Sure, I will be happy to share.

 

The design is part of a real-time video processing lab I am currently preparing here at Lucerne university. I could even share the lab material, once it is in a reasonable state.

 

What files of the XPS / SDK projects do you think are useful? And where can I post it? Here?

 

Juergen

Avnet Employee
AlbertaBeef
Posts: 318
Registered: ‎04-16-2009
0

Re: Porting PLB-based IVK Design to ISE 13.3

Juergen,

 

Please post on the forum.

You can use the "Attachments" option in the "Post Message" form to include a zip file.

 

Regards,

 

Mario.

Visitor
Juergen
Posts: 8
Registered: ‎10-21-2010

Re: Porting PLB-based IVK Design to ISE 13.3

Hi Mario

 

I attach an example IVK design for EDK 13.3. The design is based on the Camera_Frame_Buffer_Demo with an additional 2D-FIR block.

 

The zip contains the XPS and SDK projects. I removed the IVK_Repository for size reasons. This directory must be added at the top-level in order for XPS and SDK projects to compile.

 

Regards,

Juergen

Avnet Employee
AlbertaBeef
Posts: 318
Registered: ‎04-16-2009
0

Re: Porting PLB-based IVK Design to ISE 13.3

Juergen,

 

I found the issue with the fmc_iic_xps_IicRead routine.

I updated the code based on a more recent version of the xiic_low_level_dynamic_eeprom_example.c example from Xilinx.

 

In summary, the issue was caused by the fifth parameter to the XIic_DynSend( ) function call.

By changing this parameter from XIIC_REPEATED_START to XIIC_STOP, the issue was resolved.

 

   int fmc_iic_xps_IicRead(fmc_iic_t *pIIC, Xuint8 ChipAddress, Xuint8 RegAddress,

                                            Xuint8 *pBuffer, Xuint8 ByteCount)

   {

      Xuint8 ReceivedByteCount = 0;

      Xuint8 SentByteCount = 0;

      Xuint8 StatusReg;

      XStatus TestStatus=XST_FAILURE;

      int cnt = 0;

      fmc_iic_xps_t *pContext = (fmc_iic_xps_t *)(pIIC->pContext);

 

      // Position the Read pointer to specific location.

      do

      {

         StatusReg = XIic_ReadReg(pContext->CoreAddress, XIIC_SR_REG_OFFSET);

         if(!(StatusReg & XIIC_SR_BUS_BUSY_MASK))

         {

            SentByteCount = XIic_DynSend(pContext->CoreAddress, ChipAddress, (Xuint8 *)&RegAddress, 1,

                                         XIIC_STOP);

         }

         cnt++;

      } while(SentByteCount != 1 && (cnt < 100));

 

      // Error writing chip address so return SentByteCount

      if (SentByteCount < 1) { return SentByteCount; }

 

      // Receive the data.

      ReceivedByteCount = XIic_DynRecv(pContext->CoreAddress, ChipAddress, pBuffer, ByteCount);

 

      // Return the number of bytes received.

      return ReceivedByteCount;

   }

 

The new fmc_iic_sw_2_02_a driver can be found in the 14.1 version of the camera design in the following forum post:

   http://community.em.avnet.com/t5/Spartan-6-Industrial-Video-Kit/Need-IVK-13-4-EDK-Demo/td-p/4959 

 

Regards,

 

Mario.