码迷,mamicode.com
首页 > 其他好文 > 详细

66AK2H14多核通信实验

时间:2015-10-19 12:20:25      阅读:443      评论:0      收藏:0      [点我收藏+]

标签:

1. dsp和arm通过配置ipc中断寄存器进行通信。
程序路径:
/home/lr/workspace_v6_0/ARM_DSP/ARM_DSP_Communication_ARM
/home/lr/workspace_v6_0/ARM_DSP/ARM_DSP_Communication_DSP
程序输出:
[C66xx_0] Initialize DSP main clock = 122.88MHz/4x39 = 1198MHz
Waiting for interrupt from ARM Core0!
[CortexA15_1] Interrupt init success
Trigger the IPCGR0 to generate the interrupt to DSP Core0!
Waiting for interrupt from DSP Core0!
[C66xx_0] Received interrupt from ARM Core0!
Trigger the IPCGR8 to generate the interrupt to ARM Core0!
结论和问题:DSP可以接收到ARM发出的中断。ARM不能接收DSP发出的中断。

2.dsp核间通过Transportshm进行通信。
程序路径:
/home/lr/workspace_v6_0/multicore_66ak2h14
程序输出:
Core 0 Trace...
2 Resource entries at 0x800000
enter main() , localQueueName is CORE0 , nextQueueName is CORE1
 Ipc_Start begain
 IPC_Start success
--> enter task
MultiProc_self is 0
HeapBufMp_create success
MessageQ_create success
MessageQ_open success
Start the main loop
Sending a message #1 to CORE1
Sending a message #2 to CORE1
The test is complete
-----------------------------------------
Core 1 Trace...
2 Resource entries at 0x800000
enter main() , localQueueName is CORE1 , nextQueueName is CORE2
 Ipc_Start begain
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 1                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE2                                                   
Get Message 10                                                                  
Sending a message #2 to CORE2                                                   
The test is complete                                                            
-----------------------------------------                                       
Core 2 Trace...                                                                 
2 Resource entries at 0x800000                                                  
enter main() , localQueueName is CORE2 , nextQueueName is CORE3                 
 Ipc_Start begain                                                               
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 2                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE3                                                   
Get Message 10                                                                  
Sending a message #2 to CORE3                                                   
The test is complete                                                            
-----------------------------------------                                       
Core 3 Trace...                                                                 
2 Resource entries at 0x800000                                                  
enter main() , localQueueName is CORE3 , nextQueueName is CORE4                 
 Ipc_Start begain                                                               
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 3                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE4                                                   
Get Message 10                                                                  
Sending a message #2 to CORE4                                                   
The test is complete                                                            
-----------------------------------------                                       
Core 4 Trace...                                                                 
2 Resource entries at 0x800000                                                  
enter main() , localQueueName is CORE4 , nextQueueName is CORE5                 
 Ipc_Start begain                                                               
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 4                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE5                                                   
Get Message 10                                                                  
Sending a message #2 to CORE5                                                   
The test is complete                                                            
-----------------------------------------                                       
Core 5 Trace...                                                                 
2 Resource entries at 0x800000                                                  
enter main() , localQueueName is CORE5 , nextQueueName is CORE6                 
 Ipc_Start begain                                                               
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 5                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE6                                                   
Get Message 10                                                                  
Sending a message #2 to CORE6                                                   
The test is complete                                                            
-----------------------------------------                                       
Core 6 Trace...                                                                 
2 Resource entries at 0x800000                                                  
enter main() , localQueueName is CORE6 , nextQueueName is CORE7                 
 Ipc_Start begain                                                               
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 6                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE7                                                   
Get Message 10                                                                  
Sending a message #2 to CORE7                                                   
The test is complete                                                            
-----------------------------------------                                       
Core 7 Trace...                                                                 
2 Resource entries at 0x800000                                                  
enter main() , localQueueName is CORE7 , nextQueueName is CORE0                 
 Ipc_Start begain                                                               
 IPC_Start success                                                              
--> enter task                                                                  
MultiProc_self is 7                                                             
HeapBufMp_open begin                                                            
HeapBufMp_open success                                                          
MessageQ_create success                                                         
MessageQ_open success                                                           
Start the main loop                                                             
Get Message 10                                                                  
Sending a message #1 to CORE0                                                   
Get Message 10                                                                  
Sending a message #2 to CORE0                                                   
The test is complete
结论和问题:dsp之可以使用Transportshm进行通信。
3.dsp和arm通过Transportmsg进行通信。
程序路径:
/home/lr/ti/mcsdk_bios_3_01_03_06/demos/image_processing/ipc/evmtci6638k2k/master
/home/lr/ti/mcsdk_bios_3_01_03_06/demos/image_processing/ipc/evmtci6638k2k/slave
程序输出:
3 Resource entries at 0x800000
registering rpmsg-proto service on 61 with HOST
Hello
DDR_MEM_MGMT: created MessageQ: SLAVE_DDR_CORE0; QueueID: 0x10000
Awaiting message from host...
Start core task
Core_Task: created MessageQ: core1_queue; QueueID: 0x10001
Waiting for message from master
[t=0x00000009:5f821273] ti.ipc.rpmsg.RPMessage: RPMessage_send: no object for endpoint: 53
[t=0x00000009:5fad3615] ti.ipc.rpmsg.RPMessage: RPMessage_send: no object for endpoint: 53
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 10395598 bytes of memory at 0xa1000000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 10388502 bytes of memory at 0xa19ea000
Awaiting message from host...
[t=0x0000000a:96d5a6ec] ti.ipc.rpmsg.RPMessage: RPMessage_send: no object for endpoint: 53
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1304514 bytes of memory at 0xa23d3000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 434838 bytes of memory at 0xa2512000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 434838 bytes of memory at 0xa257d000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1314036 bytes of memory at 0xa25e8000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2729000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2794000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1314036 bytes of memory at 0xa27ff000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2940000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa29ab000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1314036 bytes of memory at 0xa2a16000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2b57000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2bc2000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1314036 bytes of memory at 0xa2c2d000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2d6e000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2dd9000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1314036 bytes of memory at 0xa2e44000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2f85000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa2ff0000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1314036 bytes of memory at 0xa305b000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa319c000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 438012 bytes of memory at 0xa3207000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 1304514 bytes of memory at 0xa3272000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 434838 bytes of memory at 0xa33b1000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 434838 bytes of memory at 0xa341c000
Awaiting message from host...
Received message
Image Information:
    rgb_in: 0xa19ea000
    color_table: 0x0
    bitspp: 24
    width: 1587
    height: 274
    out: 0xa23d3000
    scratch_buf[0]: 0xa2512000
    scratch_buf_len[0]: 434838
    scratch_buf[1]: 0xa257d000
    scratch_buf_len[1]: 434838
Sending reply...
Shuting down
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 3462834 bytes of memory at 0xa3487000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Allocating 3466094 bytes of memory at 0xa37d5000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 10388502 bytes of memory at 0xa19ea000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1304514 bytes of memory at 0xa23d3000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 438012 bytes of memory at 0xa319c000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 438012 bytes of memory at 0xa3207000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1314036 bytes of memory at 0xa25e8000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1314036 bytes of memory at 0xa27ff000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1314036 bytes of memory at 0xa2a16000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1314036 bytes of memory at 0xa2c2d000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1314036 bytes of memory at 0xa2e44000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1314036 bytes of memory at 0xa305b000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 1304514 bytes of memory at 0xa3272000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 434838 bytes of memory at 0xa33b1000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 434838 bytes of memory at 0xa341c000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 3462834 bytes of memory at 0xa3487000
Awaiting message from host...
[t=0x0000000a:d5884b16] ti.ipc.rpmsg.RPMessage: RPMessage_send: no object for endpoint: 53
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 10395598 bytes of memory at 0xa1000000
Awaiting message from host...
Received msg from (procId:master_messageQ): 0x0:0x1
    payload: 16 bytes.
Freeing 3466094 bytes of memory at 0xa37d5000
Awaiting message from host...
[t=0x0000000a:e0289f4e] ti.ipc.rpmsg.RPMessage: RPMessage_send: no object for endpoint: 53
[t=0x0000000a:e0417f7f] ti.ipc.rpmsg.RPMessage: RPMessage_send: no object for endpoint: 53
结论和问题:
    必须使用版本号为03.0 1 .0 2 .0 5的mcsdk提供的image才能完成通信。使用3_01_03_06和3_01_04_07版本的会出现arm端不能接受到dsp端发送过来的MessageQ信息。
4、arm核间使用TransportQmss进行通信。
程序路径:
/home/lr/build/ipc-transport/linux/qmss/test
程序输出:
********************************************************
******** TransportQmss Linux Multi-Process Test *********
*********************************************************
TransportQmss Version : 0x01000000
Version String: Linux IPC Transports Revision: 01.00.00.00:Jun  3 2015:14:15:10
Process 1 : Initialized RM_Client1
Process 2 : Initialized RM_Client2
Process 0 : Initialized RM_Client0
Process 3 : Initialized RM_Client3
Process 1 : Creating TransportQmss instance
Process 2 : Creating TransportQmss instance
Process 0 : Creating TransportQmss instance
Process 3 : Creating TransportQmss instance
Process 1 : Local MessageQ: Process_1_MsgQ, QId: 0x89
Process 1 : Attempting to open remote queue: Process_2_MsgQ
Process 2 : Local MessageQ: Process_2_MsgQ, QId: 0x8a
Process 2 : Attempting to open remote queue: Process_3_MsgQ
Process 0 : Local MessageQ: Process_0_MsgQ, QId: 0x8b
Process 0 : Attempting to open remote queue: Process_1_MsgQ
Process 3 : Local MessageQ: Process_3_MsgQ, QId: 0x8c
Process 3 : Attempting to open remote queue: Process_0_MsgQ
Process 0 : Opened Remote queue: Process_1_MsgQ, QId: 0x89
Process 0 : Allocating round trip test MessageQ msg
Round Trip -    1
Process 0 : Sending msg to Process 1
Process 3 : Opened Remote queue: Process_0_MsgQ, QId: 0x8b
Process 1 : Opened Remote queue: Process_2_MsgQ, QId: 0x8a
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Opened Remote queue: Process_3_MsgQ, QId: 0x8c
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    2
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    3
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    4
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    5
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    6
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    7
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    8
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -    9
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Round Trip -   10
Process 0 : Sending msg to Process 1
Process 1 : Received msg with good data from Process 0
Process 1 : Sending msg to Process 2
Process 2 : Received msg with good data from Process 1
Process 2 : Sending msg to Process 3
Process 3 : Received msg with good data from Process 2
Process 3 : Sending msg to Process 0
Process 0 : Received msg with good data from Process 3
Test PASSED
Cleaning up
Test Complete!
结论和问题:arm多线程使用messageQ通信完成,底层通过qmss方式。
    



66AK2H14多核通信实验

标签:

原文地址:http://www.cnblogs.com/linrong/p/4891364.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!