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: 
Observer torinford
Observer
9,941 Views
Registered: ‎06-23-2008

EMACLite Dying?

We've got an EDK (9.2i) project based on the BSB for the Spartan 3AN Starter Kit.  We're currently using the EMACLite with interrupts and for the OS we're using the xilkernel.  I've noticed that if I start my device to run a test and then leave for the night, when I come in the next morning the EMACLite has died.  The way I can tell is by having a crossover cable from the RJ45 on the S3AN-SK connected to a NIC in my PC.  Using Windows, I can tell the NIC driver to display an icon in the corner to show when it is and isn't connected.  When I arrive in the morning, the NIC is no longer connected.  Looking at the system event viewer in the Windows, it looks like the NIC was disconnected after almost 14 hours.  I know the problem isn't with the NIC on the PC as I've tried several NICs and have also left the NICs connected to switches and not had a problem.  Has anyone else noticed a problem with the EMACLite dying after x amount of time?

 

Torin

0 Kudos
10 Replies
Xilinx Employee
Xilinx Employee
9,934 Views
Registered: ‎08-13-2007

Re: EMACLite Dying?

Torin,

 

I would first suggest you check the license status of the 10/100 EMAC Lite in the IP Catalog.

Designs built with a "hardware evaluation" license will quit working after a period of time.

 

Note that if you change the license status (e.g. eval -> full) you need to regenerate the design on a machine with an appropriate license.

 

Note that you can now generate the licenses for these particular cores at no additional charge:

http://www.xilinx.com/products/ipcenter/OPB_10_100_Lite.htm

http://www.xilinx.com/products/ipcenter/xps_ethernetlite.htm

 

There could be something else at play (e.g. memory leak), but I would start with the license.

 

 

bt

 

0 Kudos
Observer torinford
Observer
9,928 Views
Registered: ‎06-23-2008

Re: EMACLite Dying?

The licensing was my first thought as well.  But the only time frame information I can find is that it will expire on a specific date, not after some amount of time.

 

Torin

0 Kudos
Xilinx Employee
Xilinx Employee
9,923 Views
Registered: ‎08-13-2007

Re: EMACLite Dying?

Torin,

 

If the license used to be build the core was "hardware evaluation" - it will quit working after a period of time. Specifically, the core will quit working and the FPGA will need to be reconfigured. This allows people to test the design in their system prior to purchasing the core and make sure it worksfor your situation. But obviously there needs to be some incentive to actually purchase the core. ;)

 

http://www.xilinx.com/ipcenter/ipevaluation/

http://www.xilinx.com/support/answers/21259.htm (LogiCORE Tri-Mode Ethernet MAC Core - The core times out with the hardware evaluation license before the advertised 6-8 hours) - I know this is for a different core, but I had it handy. Same situation.

 

The 10/100 Lite cores are a little different because they were originally cores that required a purchase, but we made later them available for "free" later. You just have to request the license.

http://forums.xilinx.com/xlnx/board/message?board.id=EDK&message.id=1385

 

Note that XPS should warn you when you have evaluation cores in your design. But it may not have been clear what that meant.

 

bt

 

 

 

 

0 Kudos
Observer torinford
Observer
9,918 Views
Registered: ‎06-23-2008

Re: EMACLite Dying?

If this is the case, then Xilinx really should change the "License Properties" dialog to list this kind of information.  When I click on

 

Hardware -> Check and View Core Licenses...

 

I see the one in question - xps_ethernetlite, 1.00.a

 

I can then click it and get a dialog specific to this core and it's licensing.   Unfortunately, the only semi-useful information listed is the Expiration date.  There's a button labeled "Product Webpage".  If I click it, then it brings me to:

 

http://xgoogle.xilinx.com/search?output=xml_no_dtd&ie=UTF-8&oe=UTF-8&client=iplocator&proxystylesheet=iplocator&site=IPLocator&filter=0&_ResultsView=Standard&num=25&q=xps%20ethernetlite&as_q=&getfields=*&newSearch=http://www.xilinx.com/products/ipcenter/advancedsearch.htm&formAction=http://www.xilinx.com/cgi-bin/search/iplocator.pl&IPCategory=&IPSubcategory=&sGlobalNavPick=PRODUCTS&sSecondaryNavPick=Intellectual%20Property&requiredfields=ProductType.-Region&partialfields=(ProductType:Core)&searchbox=

 

on which I have to click the following link:

 

http://www.xilinx.com/products/ipcenter/xps_ethernetlite.htm

 

On this page there is a section that says:

 

License:

SignOnce

 

There's also a link to the documentation.  No where in the documentation (a PDF file) does it state that the core will stop working after x amount of hours if not licensed.  For someone that didn't create the project (thus not seeing any dialogs when adding the cores) this can be very misleading (leading you to believe it is fully functional until the Expiration Date listed).   We're going to request 1 license now to see if that fixes our issue.

 

Thanks,

 

Torin

0 Kudos
Xilinx Employee
Xilinx Employee
9,916 Views
Registered: ‎08-13-2007

Re: EMACLite Dying?

You should see something like the following when you click on the xps_ethernetlite core...

 

[ok. I don't see any easy way to paste the image unless its sourced off of the web.]

My 'license status" text says [in the gray area of the dialog box]

"License for component <xps_ethernetlite_V1> found, but the generated design will cease to function in the programmed device after operating for some period of time. This allows you to evaluate the component in hardware. You are encouraged to license this component"

 

 

 

If you have any suggestions on how this can be handled better, please feel to open a hotline case and ask for a Change Request. I'm sure the EDK team would be willing to consider suggestions.

 

bt

Message Edited by timpe on 09-03-2008 11:57 AM
0 Kudos
Highlighted
Visitor the_nauman
Visitor
8,851 Views
Registered: ‎03-24-2009

Re: EMACLite Dying?

Is there any body who has written a driver of emacLite for uip/tcpip core . if yes than please help me out.

 

thanks

0 Kudos
Observer torinford
Observer
8,843 Views
Registered: ‎06-23-2008

Re: EMACLite Dying?

Xilinx's emaclite driver for standalone and xilkernel and the LwIP library should work just fine for you. Are you having specific issues?

Torin
0 Kudos
Visitor the_nauman
Visitor
8,824 Views
Registered: ‎03-24-2009

Re: EMACLite Dying?

i am using following tcp ip stack.

 

http://www.sics.se/~adam/uip/index.php/Main_Page

 

i have been successful in getting ping from a Microblaze design. but EmacLite doesnt forward the application data packets. I am unable to understand the issue. If u can guide me

 

 

0 Kudos
Visitor the_nauman
Visitor
8,820 Views
Registered: ‎03-24-2009

Re: EMACLite Dying?

Hi timpe,

 

I have seen your replies regarding emac and emaclite cores of xillinx. they are very encouraging and positive.

 

I am working on Xilinx EmacLite free in EDK 10.1. I have tried my level best to integrate it with uip/TCP/IP core,

http://www.sics.se/~adam/uip/index.php/Main_Page

i am using the tcp/ip stack in above link. I have been successful to get Ping responce from a Microblaze design, but it does not forward the application packets.I can give you details of problem if you wish to help me.

 

regards

0 Kudos
Visitor the_nauman
Visitor
2,679 Views
Registered: ‎03-24-2009

Re: EMACLite Dying?

the UIP/TCP-IP  stack has following main function which needs EMACLite Driver. If any body can get me the proper frunctionality.

the working driver in xapp807 is also given in next post.

 

=================================================================================================

 

int main(void)
{
    Xuint16 x, first_array, second_array;

    int I=0;
    int J=0;

    unsigned char *Buffer[UIP_BUFSIZE+2];

    first_array = UIP_LLH_LEN + 40;
    second_array = uip_len - UIP_LLH_LEN-40;


    u32 Register1,Register2,Register3,Register4,Register5;
    int Status;
    XEmacLite *EmacLiteInstancePtr = &EmacLiteInstance;
    u32 TxLength;
    RecvFrameLength = 0;
    XEmacLite_Config *ConfigPtr;

//    unsigned char *Frame = uip_buf;
//    unsigned char *Frame_app = uip_appdata;
    /*
     * Initialize the EmacLite device.
     */
    ConfigPtr = XEmacLite_LookupConfig(EMAC_DEVICE_ID);
    if (ConfigPtr == NULL) {
        return XST_FAILURE;
    }
    Status = XEmacLite_CfgInitialize(EmacLiteInstancePtr,
                    ConfigPtr,
                    ConfigPtr->BaseAddress);
    if (Status != XST_SUCCESS) {
        return XST_FAILURE;
    }



    /*
     * Set the MAC address.
     */
    XEmacLite_SetMacAddress(EmacLiteInstancePtr, LocalAddress);
    print("-- Set Mac Address --\r\n");

    /*
     * Empty any existing receive frames.
     */
    XEmacLite_FlushReceive(EmacLiteInstancePtr);
    print("-- Flush Receive Buffer--\r\n");

    /*
     * Check if there is a TX buffer available, if there isn't it is an
     * error.
     */
    if (XEmacLite_TxBufferAvailable(EmacLiteInstancePtr) != TRUE) {
        return XST_FAILURE;
    }

   
   
//    unsigned char *Frame;
//    Frame = uip_buf;
   

  u8_t i,j, arptimer;
//  LCD_Init();
//  LCD_Write("   Welcome to   ", "    XAPP807     ");

  /* Initialize the device driver. */
 // tapdev_init();

  /* Initialize the uIP TCP/IP stack. */
  uip_init();
 // print("--  uip_init() --\r\n");

  /* Initialize the HTTP server. */
  httpd_init();
  //print("-- httpd_init --\r\n");

  arptimer = 0;
 
 
while(1)
 {
     /* Let the tapdev network device driver read an entire IP packet
    into the uip_buf. If it must wait for more than 0.5 seconds, it
    will return with the return value 0. If so, we know that it is
      time to call upon the uip_periodic(). Otherwise, the tapdev has
      received an IP packet that is to be processed by uIP. */
          uip_len = XEmacLite_Recv(EmacLiteInstancePtr, (u8 *)uip_buf);
  //  uip_len = XEmacLite_RecvFrame(0x81000000, uip_buf);
    if(uip_len == 0)
             {
          for(i = 0; i < UIP_CONNS; i++)
                        {
                            uip_periodic(i);
    /*  If the above function invocation resulted in data that
should be sent out on the network, the global variable
uip_len is set to a value > 0. */
                         if(uip_len > 0)
                              {
                                         uip_arp_out();
                                 //    tapdev_send();
                                 SendFrame(EmacLiteInstancePtr);
                              }
                        }

                    #if UIP_UDP
                        for(j = 0; j < UIP_UDP_CONNS; j++)
                        {
                            uip_udp_periodic(i);
/* If the above function invocation resulted in data that
should be sent out on the network, the global variable
uip_len is set to a value > 0. */
                            if(uip_len > 0)
                                {
                                  uip_arp_out();
                                //tapdev_send();
                                  SendFrame(EmacLiteInstancePtr);
                                }
                        }
                    #endif /* UIP_UDP */
                       
                    /* Call the ARP timer function every 10 seconds. */
                    if(++arptimer == 20)
                        {   
                            uip_arp_timer();
                            arptimer = 0;
                    }
     
     }
            else
                    {
                        if(BUF->type == htons(UIP_ETHTYPE_IP))
                            {
                                uip_arp_ipin();
                                uip_input();
/* If the above function invocation resulted in data that
should be sent out on the network, the global variable
uip_len is set to a value > 0. */
                                if(uip_len > 0)
                                    {
                                      uip_arp_out();
                                    //tapdev_send();
                                        SendFrame(EmacLiteInstancePtr);
                                    }   
                            }
                            else if(BUF->type == htons(UIP_ETHTYPE_ARP))
                                {
                                    uip_arp_arpin();
/* If the above function invocation resulted in data that
should be sent out on the network, the global variable
uip_len is set to a value > 0. */   
                                        if(uip_len > 0)
                                            {   
                                             //tapdev_send();
                                             //SendFrame(EmacLiteInstancePtr);
                                            }
                                }
                    }
   
  }
  return 0;
}

static int SendFrame(XEmacLite *InstancePtr)

{
    unsigned char *Buffer[UIP_BUFSIZE+2];
unsigned char *Frame = uip_buf;
unsigned char *Frame_app = uip_appdata;

Xuint16 x, first_array, second_array;

int I=0;
int J=0;

first_array = UIP_LLH_LEN + 40;
second_array = uip_len - UIP_LLH_LEN-40;




//    memcpy(&Buffer[0],Frame,first_array);
//
//    second_array = uip_len - UIP_LLH_LEN-40;
//
//    memcpy(&Buffer[55],uip_appdata,second_array);

//        for (I=0; I < first_array; I++)
//
//            {
//                *Buffer[I] =uip_buf[I];
//            }
//
//        for (J=0; J < 1448; J++)
//
//            {
//                *Buffer[54 + J] = uip_appdata[J];
//            }

 if(uip_len > first_array)
    {
            //XEmacLite_Send(InstancePtr, Frame, first_array);
            //XEmacLite_SendFrame(0x81000000, (u8 *)uip_buf, first_array);
            //XEmacLite_SendFrame(0x81000000,(u8 *)Buffer, second_array+first_array);
            //XEmacLite_Send(InstancePtr, (u8 *)uip_appdata, second_array);
            //XEmacLite_SendFrame(0x81000000,(u8 *)Buffer, second_array);


            
     }
  else
        {
            //XEmacLite_SendFrame(0x81000000, (u8 *)uip_buf, uip_len);
        //XEmacLite_Send(InstancePtr, Frame, uip_len);
        }
return 0;

}

 ================================================================================================

 

 

void tapdev_send()
{
  u16_t x, first_array, second_array;
  lock_tx_fifo();
  stw(FIFOPORT, ((Xuint32) (uip_buf[0])));
  // changed to below to adapt to where data is pointed in this software.
  first_array = UIP_LLH_LEN + 40;
  second_array = uip_len - UIP_LLH_LEN-40;
  if(uip_len > first_array)
    {
         for(x = 0; x < first_array; ++x)
        {
         stw(FIFOPORT, ((Xuint32) (uip_buf[x])));
        }
         for(x=0; x < second_array; ++x)
        {
         stw(FIFOPORT, ((Xuint32) (uip_appdata[x])));
        }
    }
    else
    {
    for(x = 0; x < uip_len; ++x)
        {
            stw(FIFOPORT, ((Xuint32) (uip_buf[x]) ));
        }
    }
  stw(FIFOPORT, 0x00000100);
  stw(FIFOPORT, 0x00000100);
  unlock_tx_fifo();
}



int tapdev_read(){
  Xuint32 input;
  u16_t x, time_out=0;
  do
    {
    if(time_out>65530)
        {
            return 0;
        }
             x=0;
             time_out++;
    do
        {
            input      = lwz(FIFOPORT);
            uip_buf[x] = (u8_t)(input & RX_DATA_FILTER);
      if (!(input & RX_EMPTY_FILTER))
      {
        x++;
      }
    }
    while (((input & RX_VALID_FILTER) || (input & RX_EMPTY_FILTER && x!=0)) && (!(input & RX_FULL_FILTER)));
    if ((input & RX_FULL_FILTER))
        {
            reset_rx_fifo();
        }
  } while ((input & RX_FULL_FILTER) || (x==0));
  return (x-1);
 }

====================================================================================================

 

I have to get the functionality of this XAPP807 code from the Emaclite driver.

 

Tempe can you kindly guide me ?

0 Kudos