imx6x muliticore

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6x muliticore

imx6x muliticore

i.MX 6 SoloX MCC

  • MCC is a library for lightweight communication between cores
  • Configured at compile time (mcc_config.h)
  • Current version (2.0) is not backward compatible
  • MCC works with shared memory area
  • Communication is performed through ‘send’ and ‘receive’ functions

Shared memory Cores communicate through shared memory

pastedImage_19.png

Core structures of the MCC  MCC_ENDPOINT

core

  • Identifies a processor core, A9 is 0 and M4 is 1.

node

  • In Linux, each process using MCC has its own node number. MQX has only one node number.

port

  • Any number of ports per node is allowed.
  • Value MCC_RESERVED_PORT_NUMBER is not allowed.

The number of endpoints in system is defined during compile time by macro MCC_ATTR_MAX_RECEIVE_ENDPOINTS.

MCC_BOOKEEPING_STRUCT Endpoint table I.

pastedImage_20.png

MCC API  Functions

  • Standard API

−int mcc_initialize(MCC_NODE);

−int mcc_destroy(MCC_NODE);

−int mcc_create_endpoint(MCC_ENDPOINT*, MCC_PORT);

−int mcc_destroy_endpoint(MCC_ENDPOINT*);

−int mcc_send(MCC_ENDPOINT*, MCC_ENDPOINT*, void*, MCC_MEM_SIZE, unsigned int);

−int mcc_recv(MCC_ENDPOINT*, MCC_ENDPOINT*, void*, MCC_MEM_SIZE, MCC_MEM_SIZE*, unsigned int);

−int mcc_msgs_available(MCC_ENDPOINT*, unsigned int*);

−int mcc_get_info(MCC_NODE, MCC_INFO_STRUCT*);

  • MCC_SEND_RECV_NOCOPY_API_ENABLED

−int mcc_get_buffer(void**, MCC_MEM_SIZE*, unsigned int);

−int mcc_send_nocopy(MCC_ENDPOINT*, MCC_ENDPOINT*, void*, MCC_MEM_SIZE);

−int mcc_recv_nocopy(MCC_ENDPOINT*, MCC_ENDPOINT*, void**, MCC_MEM_SIZE*, unsigned int);

−int mcc_free_buffer(void*);

%3CLINGO-SUB%20id%3D%22lingo-sub-1109125%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx6x%20muliticore%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1109125%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%3CSTRONG%3Ei.MX%206%20%3C%2FSTRONG%3E%3CSTRONG%3ESoloX%3C%2FSTRONG%3E%3CSTRONG%3E%20MCC%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3EMCC%20is%20a%20library%20for%20lightweight%20communication%20between%20cores%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3EConfigured%20at%20compile%20time%20(mcc_config.h)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3ECurrent%20version%20(2.0)%20is%20not%20backward%20compatible%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3EMCC%20works%20with%20shared%20memory%20area%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3ECommunication%20is%20performed%20through%20%E2%80%98send%E2%80%99%20and%20%E2%80%98receive%E2%80%99%20functions%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3E%3CSTRONG%3EShared%20memory%20%3C%2FSTRONG%3E%3CSTRONG%3ECores%20communicate%20through%20shared%20memory%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_19.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_19.png%22%20style%3D%22width%3A%20851px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F4080i0D4C5120F93E9B51%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_19.png%22%20alt%3D%22pastedImage_19.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2015px%3B%20color%3A%20%23000000%3B%22%3E%3CSTRONG%3ECore%20structures%20of%20the%20%3CSTRONG%3EMCC%3C%2FSTRONG%3E%3CSTRONG%3E%26nbsp%3B%20%3C%2FSTRONG%3E%3CSTRONG%3EMCC_ENDPOINT%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3Ecore%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%20margin-left%3A%200.31in%3B%20text-indent%3A%20-0.31in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3EIdentifies%20a%20processor%20core%2C%20A9%20is%200%20and%20M4%20is%201.%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3Enode%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%20margin-left%3A%200.31in%3B%20text-indent%3A%20-0.31in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3EIn%20Linux%2C%20each%20process%20using%20MCC%20has%20its%20own%20node%20number.%20MQX%20has%20only%20one%20node%20number.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%20margin-left%3A%200.31in%3B%20text-indent%3A%20-0.31in%3B%22%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3Eport%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%20margin-left%3A%200.31in%3B%20text-indent%3A%20-0.31in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3EAny%20number%20of%20ports%20per%20node%20is%20allowed.%20%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%20margin-left%3A%200.31in%3B%20text-indent%3A%20-0.31in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3EValue%20MCC_RESERVED_PORT_NUMBER%20is%20not%20allowed.%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%20margin-left%3A%200.31in%3B%20text-indent%3A%20-0.31in%3B%22%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3EThe%20number%20of%20endpoints%20in%20system%20is%20defined%20during%20compile%20time%20by%20macro%20MCC_ATTR_MAX_RECEIVE_ENDPOINTS.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%200pt%3B%20margin-bottom%3A%200pt%3B%22%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%3CSTRONG%3EMCC_BOOKEEPING_STRUCT%20%3C%2FSTRONG%3E%3CSTRONG%3EEndpoint%20table%20I.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_20.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_20.png%22%20style%3D%22width%3A%20895px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F4120iA793E9640EC24556%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_20.png%22%20alt%3D%22pastedImage_20.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%3CSTRONG%3EMCC%20API%26nbsp%3B%20%3CSTRONG%3EFunctions%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%3CSTRONG%3EStandard%20API%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_initialize(MCC_NODE)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_destroy(MCC_NODE)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_create_endpoint(MCC_ENDPOINT*%2C%20MCC_PORT)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_destroy_endpoint(MCC_ENDPOINT*)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_send(MCC_ENDPOINT*%2C%20MCC_ENDPOINT*%2C%20void*%2C%20MCC_MEM_SIZE%2C%20unsigned%20int)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_recv(MCC_ENDPOINT*%2C%20MCC_ENDPOINT*%2C%20void*%2C%20MCC_MEM_SIZE%2C%20MCC_MEM_SIZE*%2C%20unsigned%20int)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_msgs_available(MCC_ENDPOINT*%2C%20unsigned%20int*)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_get_info(MCC_NODE%2C%20MCC_INFO_STRUCT*)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3C%2FLI%3E%3CLI%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.26in%3B%20text-indent%3A%20-0.26in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%3CSTRONG%3EMCC_SEND_RECV_NOCOPY_API_ENABLED%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_get_buffer(void**%2C%20MCC_MEM_SIZE*%2C%20unsigned%20int)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_send_nocopy(MCC_ENDPOINT*%2C%20MCC_ENDPOINT*%2C%20void*%2C%20MCC_MEM_SIZE)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_recv_nocopy(MCC_ENDPOINT*%2C%20MCC_ENDPOINT*%2C%20void**%2C%20MCC_MEM_SIZE*%2C%20unsigned%20int)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-top%3A%205.75pt%3B%20margin-bottom%3A%200.75pt%3B%20margin-left%3A%200.44in%3B%20text-indent%3A%20-0.18in%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%20font-size%3A%2015px%3B%22%3E%E2%88%92int%20mcc_free_buffer(void*)%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎12-30-2016 02:43 AM
Updated by: