Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:mcapi:mcapi_introduction [26 Jul 2020 05:10] – [MCAPI Linux demos] Sunny Fengresources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:mcapi:mcapi_introduction [01 Sep 2020 11:37] (current) jian chen
Line 5: Line 5:
  
 This example involves two following parts: This example involves two following parts:
- 
   * Baremetal: MCAPI Baremetal CCES projects run on SHARC 1 core and shrac 2 core   * Baremetal: MCAPI Baremetal CCES projects run on SHARC 1 core and shrac 2 core
   * Linux: Linux MCAPI demo examples run on ARM core   * Linux: Linux MCAPI demo examples run on ARM core
  
 There are 3 MCAPI inter-operability demos included in the libmcapi tests, currently we only support msg demo: There are 3 MCAPI inter-operability demos included in the libmcapi tests, currently we only support msg demo:
- 
   * msg (unconnected message protocol)            – supported   * msg (unconnected message protocol)            – supported
   * sclchan (connected scalar channel protocol)   –  unsupported   * sclchan (connected scalar channel protocol)   –  unsupported
   * pktchan (connected packet channel protocol)   – unsupported   * pktchan (connected packet channel protocol)   – unsupported
-There are 2 ways to load the MCAPI baremetal project: loaded by ROM code and loaded by ICE1000 in CCES. 
  
-For more information about "loaded by ROM code", please refer to Multicore loading using the BootROM 
  
-For more information about "loaded by ICE1000 in CCES", please refer to Run Linux on ARM and bare-metal application on SHARC+There are 2 ways to load the MCAPI baremetal project: loaded by remoteproc and loaded by ICE1000 in CCES. 
 + 
 +For more information about "**loaded by Remoteproc**", please refer to ''[[resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/remoteproc/remoteproc|Multicore loading using the Remoteproc]]''\\ 
 +For more information about "**loaded by ICE1000 in CCES**", please refer to ''[[resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/mcapi/mcapi_example|Run Linux on ARM and bare-metal application on SHARC]]''
  
 ===== MCAPI Baremetal test examples ===== ===== MCAPI Baremetal test examples =====
-You can get the MCAPI Baremetal test examples code after installing the linux kit, and the examples code in "/opt/analog/cces-linux-add-in/1.3.0/examples/cces_mcapi_test/". You'll find three folders which are for msg, sclchan and pktchan, each folder contains the baremetal mcapi cces projects for sc589, sc584 and sc573 boards, "Mcapi_Test_Core1.c" is the main application c file. You should use CCES to open and build the project, since we only support msg test example, we'll take the MCAPI Baremetal MSG test as the example in the next section.+The MCAPI example for ARM core (Running Linux) is included in the YOCTO, and you can get the MCAPI example for SHARC+ Cores from the gitbub [[https://bitbucket.analog.com/projects/DTE/repos/lnxdsp-examples|lnxdsp-examples]] 
 + 
 +The examples code in "lnxdsp-exmaples/mcapi/mcapi-message-example". You'll find three folders which are for msg, sclchan and pktchan, each folder contains the baremetal mcapi cces projects for sc589, sc584 and sc573 boards, "Mcapi_Test_Core1.c" is the main application c file. You should use CCES to open and build the project, since we only support msg test example, we'll take the MCAPI Baremetal MSG test as the example in the next section.
  
 ===== MCAPI Linux demos ===== ===== MCAPI Linux demos =====
-After buildroot has been compiled, source files of MCAPI-lib, demos can be found in "buildroot/output/build/libmcapi-HEAD/", "arm_sharc_msg_demo.c" is the main application c file.+The MCAPI example for ARM core (Running Linux) is included in the YOCTO through the package "libmcapi" demos can be found in "build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/libmcapi", "arm_sharc_msg_demo.c" is the main application c file.
  
-Once the linux boot finished, one command for MCAPI demo test can be found in linux, you are able to use "arm_sharc_msg_demo -h" to get more information about the command:+Once the linux boot finished, one command for MCAPI demo test can be found in linux, you are able to use "//**arm_sharc_msg_demo -h**//" to get more information about the command:
 <code> <code>
 # arm_sharc_msg_demo -h # arm_sharc_msg_demo -h
Line 43: Line 44:
 "arm_sharc_msg_demo" shows the example use of blocking/nonblocking message send/receive between two different endpoints on different nodes, the endpoint of ARM sends a message then receives a message from another endpoint of CORE1 in one round, after comparing the receive data with the data you expect, the number of passed rounds will be increased, only when the passed rounds and the test rounds are equal, it'll give demo passed log. "arm_sharc_msg_demo" shows the example use of blocking/nonblocking message send/receive between two different endpoints on different nodes, the endpoint of ARM sends a message then receives a message from another endpoint of CORE1 in one round, after comparing the receive data with the data you expect, the number of passed rounds will be increased, only when the passed rounds and the test rounds are equal, it'll give demo passed log.
  
-Each mode means the different ways to do message transaction between two endpoints using different MCAPI APIs we supported(MCAPI APIs Support in Linux Add-in 1.2.0), and you can choose the way by "-m":+Each mode means the different ways to do message transaction between two endpoints using different MCAPI APIs we supported, and you can choose the way by "-m":
  
 ^ Options   ^ Descrition  ^^^^ ^ Options   ^ Descrition  ^^^^
-  ;|**-m,--mode**  + 
-  : |mode 0 |nonblocking send  |mcapi_test() / mcapi_msg_available() |nonblocking recv  | +  ;**-m,--mode**  
-  : |mode 1 |nonblocking send |mcapi_test()                         |nonblocking recv +  :mode 0 |nonblocking send    |nonblocking recv  |mcapi_test() / mcapi_msg_available()  
-  : |mode 2 |nonblocking send |mcapi_wait()                         |nonblocking recv  +  :mode 1 |nonblocking send    |nonblocking recv  |mcapi_test()                        
-  :|mode 3 |blocking send   |                                       |blocking recv  | +  :mode 2 |nonblocking send    |nonblocking recv  |mcapi_wait()                        
-  ;|**-t,--timeout**    +  :mode 3 |blocking send    |blocking recv   
-  :|Timeout value is used to set the maximum wait time for wait and blocking function  |||| +  ;**-t,--timeout**    
-  ;|**-r,--round**      +  :Timeout value is used to set the maximum wait time for wait and blocking function 
-  :|Round is the number of rounds you want to test, since the total number of check round in MCAPI baremetal test example is a while loop, we should also make sure that the total number of check round in linux is less than or equal to 100, if number equals 100,  passed log will be output in CCES.   ||||+  ;**-r,--round**      
 +  :Round is the number of rounds you want to test, the default check round is 100, if number equals 100,  passed log will be output in CCES. 
  
 \\ \\
-===== Performance of MCAPI ===== +---- 
-The test method of the performance data of MCAPI is to measure the time required of doing message transactions about 1000 rounds between 2 endpoints on ARM and SHARC, and one round includes sending and receiving one message for each endpoint, that's what the MCAPI demo example does, so we'll measure the interval time by running the MCAPI demo example. For more information about the message transaction, please refer to Multi-Core Communication .  +**BACK TO** [[resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/mcapi/start|Multi-Core Support]]
- +
-==== Dependencies ==== +
- +
-There are many influences in measuring the MCAPI performance: +
- +
-Different platform We'll test on all sc5xx boards(SC589, SC584, SC573)  +
-System load We assume that the system load should be normal, and can be ingored, we disable all logs of MCAPI(both Linux and Baremetal) +
-MCAPI operation mode +
-  +
- +
-==== Result ==== +
- +
-Below table is the interval time of 1000 rounds message transaction under different conditions: +
- +
-  +
- +
-^Board           ^Mode 0        ^Mode 1         ^Mode 2         ^Mode3     ^ +
-|sc589-ezkit  |190.98ms |186.48ms |174.34ms |150.49ms +
-|sc584-ezkit  |188.72ms |180.95ms |176.29ms |145.65ms +
-|sc573-ezkit  |191.28ms |184.99ms |178.85ms |147.92ms +
resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/mcapi/mcapi_introduction.1595733007.txt.gz · Last modified: 26 Jul 2020 05:10 by Sunny Feng