• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » C6000 Multicore DSP » Keystone Multicore Forum (C66, 66A, AM5) » PA_SimpleExample (c6670) questions,
Share
C6000 Multicore DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Training Available
TI provides self-paced online training that introduces the primary components of the KeyStone II family of SoC devices.

  • KeyStone II SoC Overview >
  • KeyStone II Software Overview >
  • KeyStone II ARM Cortex-A15 Corepac Overview >
  • More Information >
  • Check out
    Multicore Mix blog
    • $core_v2_blog.Current.Name

      A look back: Two years of Multicore Mix

      Posted 9 hours ago
      by Lauren Reed1
      A big thank you to everyone who participated in our contest last...
    • $core_v2_blog.Current.Name

      It’s our second anniversary, but you get the present!

      Posted 7 days ago
      by Lindsey Bare
      It’s hard to believe it’s already been two years...
    • $core_v2_blog.Current.Name

      Limited time offer: Save $100 on Keystone-based EVM!

      Posted 20 days ago
      by tscheck
      Have you been thinking about ordering a TI Keystone-based EVM...

    PA_SimpleExample (c6670) questions,

    PA_SimpleExample (c6670) questions,

    This question is answered
    RCReddy
    Posted by RCReddy
    on Aug 01 2012 12:37 PM
    Genius3245 points

    Hi All,

             PC based udp packet generator   <====Ethernet connection====> [c6670 EVM running PA_SimpleExample project].

    I have a PC based udp packet generator which is generating UDP packets [the packet contents is/are SAME as provided in the PA_SimpleExample project]. Here are the steps i am following 

    1.I have done few modifications for the Project to delay a bit more [kind of a large delay wait state] just before findPacket().

    2. I commented the function sendPacket().

    3. Following are my settings 

    Int cpswLpbkMode = CPSW_LOOPBACK_NONE; //CPSW_LOOPBACK_PA;
    Int cpswSimTest = 0;

    4. My aim/objective is to generate a single UDP packet [which is same in contents as the packet in the PA_Simpleexample project] and to make the EVM running the project receive the packet.

    5. i made the switch 2 of SW9 to be off [this if i understand makes static IP Configuration] to make it accept a STATIC IP address. Is this correct ?.

    6. My laptop/PC is on static IP Configuration [Note this IP is local to IP configured on the evm board through Pa_addIp() ].

    Finally, what i see is there is no packet being received on the evm board. As far as i have seen all my steps are complete/fullest, please let me know if i am missing anything.

    c6670 EVM board is connected to pc/laptop through Ethernet straight cable.

    software configuration: - 

    ccsv5 : - .69

    mcsdk : - .21

    Thanks

    RC Reddy

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Eric Ruei
      Posted by Eric Ruei
      on Aug 01 2012 13:04 PM
      Intellectual1940 points

      Hi, RC:

      Let's discuss what you want to do at first. I believe that you want to modify the PA_SimpleExample project to recerive some packets generated and sent by PC, right?
      - Have you configured PASS to receive such packet?
      - Have you configured the CPSW ALE table to receive such packet?
      - Can you show me the packet taht you intend to send and receive?
      - You can dump the CPSW statistics at address 0x2090b00 and 0x2090c00.

      Best regards,

      Eric

       

       


       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 01 2012 13:13 PM
      Genius3245 points

      Hi Eric,

                   Many a Thanks for quick reply. Yes, my aim is to receive the udp packets generated by the pc.

      1. PASS configuration yes though setupPa().

      2. CPSW ALE Table. here my understanding is nill, i assume Init_Cpsw() will do the stuff.

      3. 

      10 11 12 13 14 15 00 0e a6 66 57 04 08 00 45 00
      00 6c 00 00 00 00 05 11 a5 97 9e da 6d 0a 01 02
      03 04 12 34 00 00 00 58 e1 98 32 33 34 35 36 37
      38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47
      48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57
      58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67
      68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77
      78 79 7a 7b 7c 7d 7e 7f 80 81

      4. I will get you the dump in immediate next post [little time from now].

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Eric Ruei
      Posted by Eric Ruei
      on Aug 01 2012 13:21 PM
      Intellectual1940 points

      Hi, Reddy:

      I am not sure which version of PDK that you are using. We do not program ALE table unless cpswSimTest is set at tle latest version of PDK.
      Besides, please provide dump before and after you send packets from PC. I will recommend you to confim that you are able to receive packet from EVM at first. Then you can write a PC program to swap the MAC address of the received packet and send it back to EVM.

      Best regards,

      Eric

       

       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 01 2012 13:33 PM
      Genius3245 points

      Hi Eric,

               PDK version : -  pdk_C6670_1_0_0_21

               NDK version : - ndk_2_21_00_32

               CCSV5 : - .69 [Version: 5.2.0.00069]

               MCSDK : - .21 [mcsdk_2_00_09_21]

      I will be sending the dump now itself [few mintues from now].

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 01 2012 14:01 PM
      Genius3245 points

      Hi Eric,

                   I see the values from 0x2090b00 to 0x2090c00 [in memory brower] being zeros. I see the wireshark capture shows the packets being sent out [i mean atleast they are leaving the ethernet port of laptop/pc].

      1. In the example project, the destination ip is being set to 1.2.3.4 and i am setting my laptop ip to 1.2.3.3 [255.255.255.0]. let me know if i am incorrect here ?

      2. I am running this example on core0 [c6670] only.

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 01 2012 14:14 PM
      Genius3245 points

      Hi Eric,

                  the other observation is,

      even in the normal mode [i mean in the example, with purely no changes], i see ZERO values in taht range of address 0x2090b00 to 0x2090c00 .

      1. i am looking at the values after putting breakpoint at 

        System_printf ("Test Completed successfully\n");

      let me know, there is any other appropriate places for the breakpoint.

      Thanks

      RC Reddy


      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Eric Ruei
      Posted by Eric Ruei
      on Aug 01 2012 14:29 PM
      Intellectual1940 points

      Hi, Reddy:

      The simpleExample use internal PASS loopback by deafult. In other words, it does not send the packet out. You should run the same test by using emacExample.

      Best regards,

      Eric

       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 01 2012 14:36 PM
      Genius3245 points

      Hi Eric,

                 Please confirm the following in simple words

      1. The PA_simpleExample CANT do any ethernet packet communication with external world [laptop/pc].

      2. "In other words, it does not send the packet out" ==> W.R.T to what you told, probably i am not clear in explaining myself. I WANT PC/Laptop to send UDP packet to EVM board.

      PC[rj 45 connector]  ==udp sendpacket==> c6670 evm [rj45 connector]

      do you mean that the PA config does not allow you to send packet inside. can you please reason out why?

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Eric Ruei
      Posted by Eric Ruei
      on Aug 01 2012 15:46 PM
      Intellectual1940 points

      Hi, RC:

      1. The PA_simpleExample CANT do any ethernet packet communication with external world [laptop/pc].
      [Eric] The PA_simpleEXample does not send packet to the ethernet port (CPSW) by default. 
                 Int cpswLpbkMode = CPSW_LOOPBACK_PA;

        /* Send the packet out the mac. It will loop back to PA if the mac/switch have been
         * configured properly */ 
        if(cpswLpbkMode == CPSW_LOOPBACK_PA)
          Qmss_queuePush (gvTxQ[0], hd, len4, CONFIG_SIZE_DESC, Qmss_Location_TAIL);
        else
          Qmss_queuePush (gvTxQ[8], hd, len4, CONFIG_SIZE_DESC, Qmss_Location_TAIL);

      You need to change the cpswLpbk_mode to other values.

      /* Define LoopBack modes */ 
      #define CPSW_LOOPBACK_NONE           0
      #define CPSW_LOOPBACK_INTERNAL       1
      #define CPSW_LOOPBACK_EXTERNAL       2
      #define CPSW_LOOPBACK_PA             3

      Which mode do you use to send and receive packet? Can you do the same CPSW dump before and after you run the test successfully?

      Best regards,

      Eric

       

       

       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 01 2012 20:19 PM
      Genius3245 points

      Hi Eric,

                If you happen to read my first post [in this same thread], i have already mentioned the info

      3. Following are my settings 

      Int cpswLpbkMode = CPSW_LOOPBACK_NONE; //CPSW_LOOPBACK_PA;
      Int cpswSimTest = 0;

      i have put diagram and statement also to explain what i am trying to achieve. I assume this diagram itself tells i DONT want any loop back

      PC based udp packet generator   <====Ethernet connection====> [c6670 EVM running PA_SimpleExample project].

      My aim/objective is to generate a single UDP packet [which is same in contents as the packet in the PA_Simpleexample project] and to make the EVM running the project receive the packet.

      with above statements, i MEAN I DONT WANT ANY LOOPBACK, i WANT ONLY PC to EVM connection though ethernet cable.

      As i reiterate again, the CPSW dump before and after is all zeros 

      If you read my above two posts again, i did following experiments

      1. I did run the ccs project [here project means PA_SimpleExample project] on evm board c6670 as is [as is means i didnt modify anything in the code] and when i see dump at the address [you mentioned],its all zeros.

      2. I asked you in my earlier post, which is the appropriate place to view the dump and i told at what point i am viewing the dump.

      [i am looking at the values after putting breakpoint at 

        System_printf ("Test Completed successfully\n");] ]

      3. finally, whether i run the PA_Simpleexample in evm board c6670,i am not seeing any values in the address range you mentioned, kindly let me know is there any structure [structure means data structure] which i can view in the expressions windows for the cpsw  stats.

      4. Also let me reiterate again and again, i am running the project on c6670 evm board.

      Hi Eric,

                  My kind request is to please go through my previous posts [in THIS same thread/chain] and please see if i am missing anything. 

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 02 2012 05:12 AM
      Genius3245 points

      HI Eric,

                after much debugging and going through all possible documents, i found that i am doing a simple silly mistake [too bad on my part, i accept it] and the mistake was i was using simulator based .ccxml [Though i was running on the c6670 board]. sorry for earlier incorrect cpsw stats, here are the new stats

      but my project is still not coming to successfull completion.

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Eric Ruei
      Posted by Eric Ruei
      on Aug 02 2012 07:56 AM
      Intellectual1940 points

      Hi, RC:

      We are geting there. Can you show me the rx and tx statistics of CPPI port (0x2090b00)? Please dump the following memory location in 32-bit format:
               0x2000000-0x200005f (24 32-bit words) after you forward the packet.

      Is it possible to use a private (controlled) network, so that we know what and how many packets are delivered to the EVM board.

      Best regards,

      Eric

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 02 2012 09:00 AM
      Genius3245 points

      Hi Eric,

                  Thanks for your reply.

             w.r.t to you question [Is it possible to use a private (controlled) network, so that we know what and how many packets are delivered to the EVM board.]

      Yes, my network is private controlled, i mean i have pc/laptop connected to EVM [c6670] board through a straight cable [its a point to point connection].

      from udp packet generator, i sent 2 packets and here i am attaching the captures 

      =============output logs===============

      [C66xx_0] function findPacket: Timeout waiting for data packet
      [C66xx_0] --- PA STATS ---
      C1 number of packets: 6
      C1 number IPv4 packets: 0
      C1 number IPv6 packets: 0
      C1 number custom packets: 0
      C1 number SRIO packets: 0
      C1 number llc/snap fail: 0
      C1 number table matched: 0
      [C66xx_0] C1 number failed table matched: 3
      C1 number Ingress IP frags: 0
      C1 number IP depth overflow: 0
      C1 number vlan depth overflow: 0
      C1 number gre depth overflow: 0
      C1 number mpls packets: 0
      C1 number of parse fail: 0
      C1 number invalid [C66xx_0] IPv6 opts: 0
      C1 number of Egress IP frags: 0
      C1 number of silent discard: 3
      C1 number of invalid control: 0
      C1 number of invalid states: 0
      C1 number of system fails: 0

      [C66xx_0] C2 number of packets: 5
      C2 number of UDP packets: 0
      C2 number of TCP packets: 0
      C2 number of custom packets: 0
      C2 number of silent discard: 0
      C2 number of invalid control: 0

      [C66xx_0] Modify number of command file: 0

      [C66xx_0] Function findPacket failed

      =============================udp tool packet vals =====

      10 11 12 13 14 15 00 0e a6 66 57 04 08 00 45 00
      00 6c 00 00 01 00 05 11 a5 97 9e da 6d 0a 01 02
      03 04 12 34 00 00 00 58 e1 98 32 33 34 35 36 37
      38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47
      48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57
      58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67
      68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77
      78 79 7a 7b 7c 7d 7e 7f 80 81

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

      i have a doubt, the address 0x2090b00 belongs to [EMAC port 0 = SGMII_0 = switch port 1 = AMC backplane lines]

      i have a doubt, the address 0x2090c00 belongs to [EMAC port 1 = SGMII_1 = switch port 2 = RJ45 connector] ? please confirm/correct my understanding.

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 02 2012 09:07 AM
      Genius3245 points

      Also Eric,

                     one more information i wanted to provide. I have added udp port based classification custom rules [but if i understand, that are at Level 4, here what i see is Level 2 MAC itself is failing].

      The other part is udp port classification [256 ports per queue] works in loopback and it classifies 

      Port Range start          Port Range End          QueueNumber

         0x0000                         0x00FF                        904

         0x0100                         0x01FF                        905

         0x0200                         0x02FF                        906

         0x0300                         0x03FF                        907

      so the example works in loopback mode, so i assume the code which i added [w.r.t to ports based classification is not coming in the PC<=>EVM board connection based testing]. please let me know if i am doing anything incorrect.

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • RCReddy
      Posted by RCReddy
      on Aug 02 2012 14:22 PM
      Genius3245 points

      Hi Eric,

                 based on your suggestion, i made the changes as below

      //if(cpswLpbkMode != CPSW_LOOPBACK_NONE)
      CSL_CPSW_3GF_enableAleBypass();

      Now with above changes, i pumped in 10 packets [in which only 5 packets are correct and remaining 5 packets are incorrect, this is due to bug in packet generator tool :-( ], so based on that 5 packets will be custom packets which will reach the Rxqueue [host queue]  after all classification checks.

      ==============outputs=============

      [C66xx_0] function findPacket: Timeout waiting for data packet
      [C66xx_0] --- PA STATS ---
      C1 number of packets: 23
      C1 number IPv4 packets: 10
      C1 number IPv6 packets: 0
      C1 number custom packets: 0
      C1 number SRIO packets: 0
      C1 number llc/snap fail: 0
      C1 number table matched: [C66xx_0] 20
      C1 number failed table matched: 0
      C1 number Ingress IP frags: 5
      C1 number IP depth overflow: 0
      C1 number vlan depth overflow: 0
      C1 number gre depth overflow: 0
      C1 number mpls packets: 0
      C1 number of parse fail: 0
      C1 number inval[C66xx_0] id IPv6 opts: 0
      C1 number of Egress IP frags: 0
      C1 number of silent discard: 5
      C1 number of invalid control: 0
      C1 number of invalid states: 0
      C1 number of system fails: 0

      [C66xx_0] C2 number of packets: 10
      C2 number of UDP packets: 0
      C2 number of TCP packets: 0
      C2 number of custom packets: 5
      C2 number of silent discard: 0
      C2 number of invalid control: 0

      [C66xx_0] Modify number of command file: 0

      [C66xx_0] Function findPacket failed

      with the code changes above, the example works for 5 packets [which is inline with my expectations]. Thanks Eric and now i have to investigate why and how this ALEBypass condition affected my project.

      Thanks

      RC Reddy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use