This readme is about the OpenAMP matrix_multiply demo. The matrix_multiply is about one processor generates two matrices, and send them to the one, and the other one calcuate the matrix multiplicaiton and return the result matrix.
For now, it implements Linux generates the matrices, and the baremetal calculate the matrix mulitplication and send back the result.
Option WITH_MATRIX_MULTIPLY
is to control if the application will be built. By default this option is ON
when WITH_APPS
is on.
Here is an example:
$ cmake ../open-amp -DCMAKE_TOOLCHAIN_FILE=zynq7_generic -DWITH_OBSOLETE=on -DWITH_APPS=ON
You will need to manually compile the following kernel modules with your Linux kernel (Please refer to Linux kernel documents for how to add kernel module):
obsolete/system/linux/kernelspace/rpmsg_user_dev_driver
if you want to run the matrix_multiply app in Linux user space.obsolete/apps/matrix_multiply/system/linux/kernelspace/rpmsg_mat_mul_kern_app
if you want to run the matrix_multiply app in Linux kernel space.obsolete/apps/matrix_multiply/system/linux/userspace/mat_mul_demo
into your Linux OS.matrix_multiply
executable to the firmware of your Linux OS.After Linux boots,
rpmsg_mat_mul_kern_app
module, you will see the kernel app will generate two matrices to the other processor, and output the result matrix returned by the other processor.rpmsg_user_dev_driver
module.mat_mul_demo
, you will see the similar output on the console:**************************************** Please enter command and press enter key **************************************** 1 - Generates random 6x6 matrices and transmits them to remote core over rpmsg .. 2 - Quit this application .. CMD>
1
to run the matrix multiplication.2
to exit the application.After you run the demo, you will need to unload the kernel modules.
rpmsg_user_dev_driver
module.rpmsg_mat_mul_kern_app
module.