This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone,
There are two C6678 DSPs ,whose ethernet interface are connected directly, on my board.
My goal is that C6678_A sends some data and C6678_B receives them correctly. I found an example project
under pdk_C6678_1_0_0_17\ packages \ ti \ drv \ exampleProjects \ PA_emacExample_exampleProject.
The remark in the example codes says that the packets sent by the application are sent on the wire and
since the destination MAC on the packet is the Ethernet switch MAC address,the packets are received by
simulator and passed back up to the example application for processing.
In my case,the packets sent by the C6678_A should be received by C6678_B. So I must set C6678_B's
IP address, MAC address and port number in codes running in C6678_A. Here are my questions.
1. How to allocate an IP address,MAC address and port number for C6678_B?
2. What function should be performed by the program running in C6678_B?
3. Why this project reffered above can't be run in single steps?
I am looking forward to your reply. Thank you very much.
Best Regards,
Nuoxi
Since your board with two C6678 EMACs of being directly connected is not a typical setup, this test cannot be run without modifications. Here are a couple of suggestions.
You example code needs to run without simulator.
Also can you confirm how the EMACs are connected. I assume, there is no PHY in between.
In the meanwhile, I am looking to see if there is any other example that you can use instead. You can also refer ‘PA_simpleExample_exampleProject”.
Hope this helps.
Hi Varada,
Thank you very much for your detailed reply. Your assumption is correct. There is no PHY in betwween.
I will try again according to your suggestions.
Best Regards,
Nuoxi
Hi varada,
I found several example projects related to ethernet. They are listed as follows:
mcsdk_2_00_05_17 \ examples \ ndk \ helloworld \ evmc6678l ,
mcsdk_2_00_05_17 \ examples \ ndk \ client \ evmc6678l ,
pdk_C6678_1_0_0_17 \ packages \ ti \ drv \ exampleProjects \ PA_emacExample_exampleProject ,
pdk_C6678_1_0_0_17 \ packages \ ti \ drv \ exampleProjects \ PA_simpleExample_exampleProject ,
pdk_C6678_1_0_0_17 \ packages \ ti \ drv \ exampleProjects \ PA_UnitTest_testProject .
1. Which project is most close to my purpose?
My purpose is to implement DSP_A sending data to DSP_B through ethernet.
2. I have modified the PA_emacExample_exampleProject accordng to your suggestions.
For project running on DSP_A, the following changes are made:
1) Delete the function Setup_RX() , CPSW_RXISR() and verifypacket() ;
2) Change Add_MACAddress(), AddIPAddress() and Add_Port() to match the information of DSP_B;
3) Change Dest mac, Dest IP and UDP port in pktMatch to match the ones set in the last step;
4) Change the function Init_SGMII_SERDES() ,for the code assumes a 125 MHz referebce clock
but actual reference clock on my board is 156.25 MHz.
CSL_BootCfgSetSGMIIConfigPLL(0x41);
CSL_BootCfgSetSGMIIRxConfig(0 ,0x00700621);
CSL_BootCfgSetSGMIITxConfig(0 ,0x000108A1);
CSL_BootCfgSetSGMIIRxConfig(1 ,0x00700621);
CSL_BootCfgSetSGMIITxConfig(1 ,0x000108A1);
=========>
CSL_BootCfgSetSGMIIConfigPLL(0x241);
CSL_BootCfgSetSGMIIRxConfig(0 ,0x00700611);
CSL_BootCfgSetSGMIITxConfig(0 ,0x00010F91);
CSL_BootCfgSetSGMIIRxConfig(1 ,0x00700611);
CSL_BootCfgSetSGMIITxConfig(1 ,0x00010F91);
Then build and run the project in DSP_A, the console window shows the following information.
Error : Inserting memory region 0 . Error code -131.
QMSS init failed.
Do you have any advice?(The mac address,Ip addressand port number of DSP_B have been changed accordingly.)
3. For the case of PA_simpleExample_exampleProject , I didn't change anything of it .
But it takes a long time to build and it can't generate .out file. If I build it for the second time,
then many errors will appear.
Please help me. I'm looking forward to your reply.
Best Regards,
Nuoxi
Nuoxi Lin said:1. Which project is most close to my purpose?
My purpose is to implement DSP_A sending data to DSP_B through ethernet.
The other tests you mention can be used for basic test. For example : “simpleExample” test does internal loopback in the CPSW. It can be run on each of the DSP and can be used as reference and good starting point.
Nuoxi Lin said:2) Change Add_MACAddress(), AddIPAddress() and Add_Port() to match the information of DSP_B;
Are these functions were run on DSP_A ? these functions will change the MAC, IP and port of the local c6678.
Nuoxi Lin said:Change the function Init_SGMII_SERDES .....(
I will check with an expert and reply.
Nuoxi Lin said:.... Then build and run the project in DSP_A, the console window shows the following information.
Error : Inserting memory region 0 . Error code -131.
QMSS init failed.
Do you have any advice?(The mac address,Ip addressand port number of DSP_B have been changed accordingly.)
Can you run this project as is, without any modifications and single step in CCS debugger ? Can you check the function Init_QMSS passes and returns success ?
Nuoxi Lin said:3. For the case of PA_simpleExample_exampleProject , I didn't change anything of it .
But it takes a long time to build and it can't generate .out file. If I build it for the second time,
then many errors will appear.
I am able to import the project ‘PA_simpleExample_exampleProject’ and also build in CCS. Can you first clean and then do a fresh build.
Other good resource for you is this post. Here the 2 6678 EVMs are communicating through the AMC connector card :
http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/192039.aspx
http://processors.wiki.ti.com/images/0/00/DualEVM_BOC_quick_setup_guide_09SEPT13.pdf
Hi varada,
Thank you very much for your kind help. Now I can build and run the PA_emacExample correctly without any modifications.
I am modifying the project
under pdk_C6678_1_0_0_17\ packages \ ti \ drv \ exampleProjects \ PA_emacExample_exampleProject.
But there are a few questions I am not so sure .
1. For my case, Is it right to set the global variables as follows ?
cpswSimTest = 0,
cpswLpbkMode = CPSW_LOOPBACK_EXTERNAL,
cpswEvm6678 = 1
2. I plan to set the two DSPs as follows:
DSPA(transmmiter): MAC address: 0x00 01 02 03 04 05,
IP address : 192.168.1.1
Port number : 0x1234
DSPB(receiver) : MAC address: 0x20 21 22 23 24 25,
IP address : 192.168.1.8
Port number : 0x9a00
Is there any problems with these settings?
3. For example, I want to set the mac address of DSPB in the program running in DSPB, then
I can achieve this by seeting the Dest mac in ethInfo to 0x20 21 22 23 24 25. Right? Please confirm.
4. When i run the modified project, the console window shows:
QMSS successfully initialized.
CPPI successfully initialized.
PASS successfully initialized.
Ethernet subsystem successfully initialized.
Rx setup successfully done.
Error obtaining a Tx free descriptor.
PASS setup failed.
Could you give me some suggestions?
Best Regards,
Nuoxi
Hi Varada,
I have been modifying the PA_emacExample_ExampleProject for several days but they still can't work correctly.
I think i must have mistaken something. So I attach my projects . I will be very grateful if you can help me
to have a look and give me some advice. The project named VPX_D6678_Ethernet_TX will be run in DSPA
and the other will be run in DSPB.
1. I plan to set the mac address , IP address and port number as follows.
DSPA: ethernet switch port 0 : mac address---> 0x00 01 02 03 04 05,
ethernet switch port 1 : mac address---> 0x10 11 12 13 14 15,
ethernet switch port 2: mac address---> 0x20 21 22 23 24 25 , IP address--->192.168.1.2 , UDP port number : 0x2000.
DSPB: ethernet switch port 0 : mac address---> 0x30 31 32 33 34 35,
ethernet switch port 1 : mac address---> 0x40 41 42 43 44 45,
ethernet switch port 2: mac address---> 0x50 51 52 53 54 55 , IP address--->192.168.1.8 , UDP port number : 0x8000
The ethernet switch port 2 of DSPA is connected to port 2 of DSPB without PHY.So I consider port 2 of DSPA as souce port
and that of DSPB as dest port.
2. The codes i modified are mainly listed as follows.
cppi_qmss_mgmt.c : data structure pktMatch,
function sendpacket() : psFlags = 0x 1---->psFlags = 0x2.
cpsw_mgmt.c : Init_SGMII(),
Init_SGMII_SERDES().
pa_mgmt.c : varariable srcMac[6],
Add_MACAddress(),
Add_IPAddress(),
Add_port().
spsw_singlecore.c : global variable cpswSimTest = 0,
cpswLpbkMode = cpsw_LoopBACK_EXTERNAL,
cpswEvm6678 = 1.
3. When I built and ran the two projects, the console window showed the following information.
C66xx_0 is the core 0 of DSPA and C66xx_8 is the core 0 of DSPB.
[C66xx_0] **************************************************
[C66xx_0] ******* Ethernet Single Core Example Start *******
[C66xx_0] **************************************************
[C66xx_0] QMSS successfully initialized
[C66xx_0] CPPI successfully initialized
[C66xx_0] PASS successfully initialized
[C66xx_0] Ethernet subsystem successfully initialized
[C66xx_0] Tx setup successfully done
[C66xx_0] Timeout waiting for reply from PA to Pa_addMac command
[C66xx_0] PASS setup failed
[C66xx_8] **************************************************
[C66xx_8] ******* Ethernet Single Core Example Start *******
[C66xx_8] **************************************************
[C66xx_8] QMSS successfully initialized
[C66xx_8] CPPI successfully initialized
[C66xx_8] PASS successfully initialized
[C66xx_8] Ethernet subsystem successfully initialized
[C66xx_8] Rx setup successfully done
[C66xx_8] Error obtaining a Tx free descriptor
[C66xx_8] PASS setup failed
I am looking forward to your reply. Thank you very much .
Best Regards,
Nuoxi
Thanks for the detail description of your setup.
I am looping an expert to answer your Qs, about the PA setup errors on DSP_A and DSP_B
I think you are doing all the setup correct.
One suggestion : Can you try with “cpswLpbkMode == CPSW_LOOPBACK_NONE”
HI Varada,
Thank you for your sustaining help. I will try according to your suggestion.
In addition, please inform me if you get more information.
Thanks in advance.
Best Regards,
Nuoxi
Hello Nuoxi,
Expert says :
"It is maybe a cache related problem? Where are the CPPI descriptors and Tx buffers? You can ask this customer to dump memory 0x2000000 to see whether that 1 appears at address 0x2000000."
Regards,
Varada
Hello Varada,
Thank you for your help. I have two more questions to consult you.
1. Now the initiation of modules is ok. And the transmitter(C6678A) can send data out.
But the receiver(C6678B) can't receive the data because Cpsw_RxISR(),whose function is pick up data, isn't called up.
I didn't modify the codes of RxSetup() . And i am using pdk_C6678_1_0_0_21.
Why this happened? What should I do to call up the Cpsw_RxISR()?
2. You toad me earlier that Add_MACAddress() sets the mac address of local.
But there are 3 ports of GbE switch. Which port local refers to ?
I am looking foward to your reply.Thank you in advance.
Best Regards,
Nuoxi
Hello Nuoxi,
I also want to add about how the device the IPaddress is set.
Typically the low level s/w driver will read the ‘MACID1/2 ‘ register and write this value to ‘MAC1/2_SA_xx’ MAC address registers.
All these registers are memory mapped and hence you can verify the addresses in your setup.
Hope this helps.
Hello Nuoxi Lin
Thank you for your discussion above. I have a question to consult you.
Now I get some trouble in testing two C6678s' communication, now the initiation of modules ok. And the transmitter(C6678A) can send data out(10 packets). But the receiver(C6678B) can't receive the data, how do you solve this problem?
I am looking foward to your reply.Thank you in advance.
Best Regards,
Hi Nuoxi and Varada ,
I want to do something like in the previous decision ,
I want to connect between two TMDSEVM6670LE board using Ethernet wire connection , so i want a start point to do this ,
Thanks in Advanced ,
Muhammad .
Hi Muhammad,
This workaround I did several months ago maybe can give you a little help
http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/232249/947376.aspx#947376
Regards,
Aditya