Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Update and Restructure #37

Open
wants to merge 65 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
925bf7f
overview: add AMP overview and introduce OpenAMP fundamentals
Sep 25, 2024
6b30c63
overview: provide high level architecture and diagram
Sep 26, 2024
40dacd0
overview: restructure and reword remaining sections
Sep 27, 2024
9072488
overview: small adjustments to overview page
Sep 29, 2024
8218504
overview: adjust images
Sep 29, 2024
0507788
overview: add master, slave and remote terms to topology example diagram
Sep 30, 2024
4c9723a
overview: add architecture sections and update references
Sep 30, 2024
a558125
overview: update architecture image to improve formatting online
Sep 30, 2024
b570981
overview: add and fix references and rearranged some paragraphs
Sep 30, 2024
1a26c84
overview: repeat architecture diagrams with highlighted components
Sep 30, 2024
efb94b1
overview: correct rpms architecture diagram object order and minor up…
Sep 30, 2024
47c40e4
overview: adjust topology naming to host remote
Oct 6, 2024
bae8713
rpmsg: add reference to rpmsg-endpoint
Oct 7, 2024
dc7d57a
demos: add a new demos index file and initial echo demo info
Oct 7, 2024
404e41a
index: add new demos index page to main index
Oct 7, 2024
0558aca
demos:echo: add diagram showing components and application in echo demo
Oct 8, 2024
b891b72
demos: remove peripherals and rpc from echo test architecture diagram
Oct 9, 2024
177b9c4
demos: add control flow diagram for echo test
Oct 9, 2024
d200d10
demos: add Reference Boards section in Reference Samples
Oct 14, 2024
618abea
demos: minor changes to demo text and titles
Oct 14, 2024
7f4c4d0
demos: remove reference boards from original demos index
Oct 14, 2024
49ca3f4
demos: move reference to linux app
Oct 14, 2024
ad2429e
demos: add matrix multiply demo/sample page
Oct 14, 2024
63426df
demos: add introduction to RPMsg multi services demo
Oct 21, 2024
986838b
demos: add component overview and control flow for RPMsg multi services
Oct 28, 2024
1b14585
review: adjustments based on review comments
Oct 28, 2024
650cb39
demos: fix broken reference board link
Oct 28, 2024
4920f2e
ATS: add inter process demo as a reference board
Nov 3, 2024
b8d212f
demos: add ioctl explanation to tty and raw character drivers
Nov 4, 2024
2978ed2
demos: update rpmsg demo control flow diagram to include ctrl
Nov 4, 2024
207599c
demos: correct sub-bullet on reference board section
Nov 4, 2024
15d265d
demos: use multiplex of channels on Virtio device
Nov 10, 2024
390a431
demos: add link for rpmsg_ctrl to source section of multi service demo
Nov 10, 2024
bb89973
demos: use toc to link to open-amp readme for inter process info
Nov 10, 2024
23169dc
overview: correct typo
Nov 11, 2024
bcbfd83
tools: add introduction to lopper tool
Nov 11, 2024
d091755
tools: minor updates to lopper introduction
Nov 17, 2024
d6b194a
tools: move lopper demo to tools section
Nov 17, 2024
b250b13
tools:lopper: add reference to runtime domain in OpenAMP introduction
Nov 18, 2024
5106109
design: add introduction to design/protocol details
Nov 18, 2024
845665b
design: add that remote can start on boot to AMP intro section
Nov 18, 2024
1fbace3
design: move rpmsg and remote proc under components
Nov 18, 2024
33eb7c4
design: adjust system considerations to use host/remote terminology
Nov 18, 2024
8990137
design: correct repo path to open-amp design doc folder
Nov 18, 2024
f6711d2
design details: add some headings to components front page
Nov 18, 2024
c2bff8a
design details: replace image for consistent formatting
Nov 18, 2024
6f29aad
design detail:components: add abstraction heading
Nov 18, 2024
22f8994
design details:components: reverse order of toc headings
Nov 18, 2024
9d14efb
library guide: correct doc folder name to open-amp repo
Nov 18, 2024
3595c5a
design details: change remoteproc and RPMsg intro to a table layout
Nov 18, 2024
2307978
design details: change lcm, rpmsg titles with capability and component
Nov 18, 2024
77f4936
design details: add topologies section name
Nov 18, 2024
0a5a53c
design details:rpmsg: rewording
Nov 18, 2024
8372956
design details: add summary of RPMsg implementation
Nov 24, 2024
3024a91
design details: move rpmsg protocol into own section/page
Nov 24, 2024
78eb97b
design details: rpmsg ring buffer wording adjustments and more info
Nov 24, 2024
b9412ec
lcm: reword and link to example shutdown message
Nov 24, 2024
fdf28b6
lcm: restructure into subpages
Nov 24, 2024
99aa4cd
lcm: fix or remove invalid links
Nov 25, 2024
95d01fb
design details: system considerations: minor adjustments
Nov 25, 2024
03c2357
design docs: add intro to distinguish why these docs exist as well
Nov 25, 2024
d5a4b5d
links: add link to webinar as it is a good introduction
Nov 25, 2024
085d6b4
design details: remove todo items from resource table and reword comp…
Nov 25, 2024
d06d1af
design details: expand info on resource table
Nov 29, 2024
e5c92db
demos: add linux rpc demo page and drawings
Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions demos/demos_index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

.. _demos-reference-samples:

OpenAMP Samples and Demos
=========================

.. toctree::
:maxdepth: 2
:caption: Contents:

echo
matrix_multiply
2 changes: 2 additions & 0 deletions demos/docker_images.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _docker-images-label:

==========================
OpenAMP Demo Docker images
==========================
Expand Down
93 changes: 93 additions & 0 deletions demos/echo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
========================
OpenAMP Echo Test Sample
========================

.. _echo-test-intro:

***************
Echo Test Intro
***************

The echo test reference sample, as the name suggests, demonstrates OpenAMP :ref:`Interprocessor Communications (IPC)<ipc-work-label>` components by providing an echo application on a remote which simply returns (echoes) packets as they are received at an :ref:`RPmsg endpoint <rpmsg-endpoint>` from the host controller. The host controller then verifies the returned packet for integrity.

.. image:: ../images/demos/echo-test-intro.svg

.. _echo-test-components:

********************
Echo Test Components
********************

There are two applications involved in this demonstration.
The :ref:`remote application<echo-test-remote-app>` runs as an echo service, which returns packets it receives on an :ref:`RPmsg endpoint <rpmsg-endpoint>`.
The :ref:`host application<echo-test-host-app>` is the test application sending packets to the echo service and monitoring for their return.

The underlying OpenAMP architectural components used by these applications are

* :ref:`Remoteproc<overview-remoteproc-work-label>`
* :ref:`Resource Table<overview-remoteproc-work-label>`
* :ref:`RPMsg<overview-rpmsg-work-label>`
* :ref:`Virtio<overview-rpmsg-work-label>`
* :ref:`Libmetal<overview-proxy-libmetal-label>`

The following architecture diagram shows the components involved in the demonstration.

.. image:: ../images/demos/echo-test-components.svg

The top-level control flow is shown in the following message diagram.

.. image:: ../images/demos/echo-test-control-flow.svg

.. _echo-test-remote-app:

RPmsg Echo Remote Application
=============================

The remote application, rpmsg-echo, is the core of the demonstration. It is a simple application serving a :ref:`RPmsg endpoint <rpmsg-endpoint>` running as the main task on the remote processor, once loaded and started using :ref:`Remoteproc<overview-remoteproc-work-label>`.


.. _echo-test-host-app:

Echo Test Host Application
==========================

The echo_test application forms the host controller side of the demonstration. It repeatedly writes an increasing length payload of 0xA5's up to the maximum data size (packet size minus header) to the RPmsg endpoint. Following each packet send, it reads from the same endpoint and verifies the returned packet for correctness. The application will stop and report on the first corruption found.

Echo Test Host Script
=====================

The host is also responsible for loading the firmware containing the :ref:`RPmsg Echo Remote Application<echo-test-remote-app>` and starting the remote processor using :ref:`Remoteproc<overview-remoteproc-work-label>`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the echo test itself, the host does not load the remote firmware. it tests only rpmsg protocol with the remoteproc virtio transport. here is more a prerequiste

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker demo has demo1A script and which has echo image > /sys/class/remoteproc/remoteproc0/firmware, and then sends start to .../state. That is what this "Host Script" section is referring to, rather then the echo_test application itself.
Clarified by adding reference to demo1A of Demo Docker Images


For host controllers, like Linux, a script can be used to pipe the firmware to the exposed remoteproc system, followed by the execution of the user space echo_test application. For controllers without scripting capability, like baremetal and RTOS (Real Time Operating systems), this would be achieved in the code.

****************
Echo Test Source
****************

RPmsg Echo Baremetal Source
===========================

The RPmsg Echo service application is available as a baremetal solution in the `open-amp Repository <https://github.com/OpenAMP/open-amp/blob/main/apps/examples/echo/rpmsg-echo.c>`_
arnopo marked this conversation as resolved.
Show resolved Hide resolved

It is a CMake application and can be built for any remote as long as the relevant :ref:`OS/HW abstraction layer<porting-guide-work-label>` components like libmetal are ported for that platform.

.. _echo-test-linux-app:

Echo Test Linux Source
======================

The echo test Linux application is executed on the Linux host controller as a user space application.
The application is available in the `OpenAMP System Reference repository <https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/linux/rpmsg-echo-test/echo_test.c>`_.

It is a Makefile application and can be built using the `Yocto rpmsg-echo-test recipe <https://github.com/OpenAMP/meta-openamp/blob/master/recipes-openamp/rpmsg-examples/rpmsg-echo-test_1.0.bb>`_

An example host control script is given in the `echo test readme <https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/linux/rpmsg-echo-test/README.md#run-the-demo>`_

*******************************
Reference Board Implementations
*******************************

This Echo Test Sample is demonstrated in the following reference implementations.

* :ref:`Docker Images<docker-images-label>` as demo1A
* :ref:`AMD-Xilinx platforms<demos-AMD--work-label>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also possible to run this test on a linux PC between 2 processes as described here:
https://github.com/OpenAMP/open-amp/blob/main/README.md#example-to-compile-openamp-for-communication-between-linux-processes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a todo for later addition

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

3 changes: 0 additions & 3 deletions demos/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ Samples and Demos
:maxdepth: 1
:caption: Contents:

system_reference-AMD-Xilinx
system_reference-ST
../open-amp/apps/examples/linux_rpc_demo/README
docker_images
../hypervisorless_virtio_zcu102/README_demo
../lopper/demos/openamp/README.md

Expand Down
100 changes: 100 additions & 0 deletions demos/matrix_multiply.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
==============================
OpenAMP Matrix Multiply Sample
==============================

.. _matrix-multiply-intro:

*********************
Matrix Multiply Intro
*********************

The matrix multiply reference sample, as the name suggests, demonstrates OpenAMP :ref:`Interprocessor Communications (IPC)<ipc-work-label>` components through matrix multiplication. The demonstration uses a host client, which generates random matrixes. It sends them to a service/daemon on a remote which performs a matrix calculation and returns the result via a :ref:`RPmsg endpoint <rpmsg-endpoint>`. The host controller then writes the matrix result to console output.

.. image:: ../images/demos/matrix-multiply-intro.svg

.. _matrix-multiply-components:

**************************
Matrix Multiply Components
**************************

There are two applications involved in this demonstration.
The :ref:`remote application<matrix-multiply-remote-app>` runs as an daemon/service which performs a matrix calculation and returns the result on an :ref:`RPmsg endpoint <rpmsg-endpoint>`.
The :ref:`host application<matrix-multiply-host-app>` is the client application sending two matrixes as a packet to the daemon/service and monitoring for the return result.

The underlying OpenAMP architectural components used by these applications are

* :ref:`Remoteproc<overview-remoteproc-work-label>`
* :ref:`Resource Table<overview-remoteproc-work-label>`
* :ref:`RPMsg<overview-rpmsg-work-label>`
* :ref:`Virtio<overview-rpmsg-work-label>`
* :ref:`Libmetal<overview-proxy-libmetal-label>`

The following architecture diagram shows the components involved in the demonstration.

.. image:: ../images/demos/matrix-multiply-components.svg

The top-level control flow is shown in the following message diagram.

.. image:: ../images/demos/matrix-multiply-control-flow.svg

.. _matrix-multiply-remote-app:

RPmsg Matrix Multiply Remote Application
========================================

The remote application, `matrix_multiplyd <https://github.com/OpenAMP/open-amp/blob/main/apps/examples/matrix_multiply/matrix_multiplyd.c>`_, is the core of the demonstration. It is a simple application serving a :ref:`RPmsg endpoint <rpmsg-endpoint>` running as the main task on the remote processor, once loaded and started using :ref:`Remoteproc<overview-remoteproc-work-label>`.


.. _matrix-multiply-host-app:

Matrix Multiply Host Application
================================

The host application generates two matrices into a structure with size and 6x6 matrix, sequentially into a RPMsg packet. It then waits for matrix sized bytes to be returned and prints the resultant matrix as calculated by the remote.

There are two implementations. The `mat_mul_demo <https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/linux/rpmsg-mat-mul/mat_mul_demo.c>`_ application forms the host controller side of the demonstration, as a linux user space client application. The `matrix_multiply <https://github.com/OpenAMP/open-amp/blob/main/apps/examples/matrix_multiply/matrix_multiply.c>`_ application forms the host controller side of the demonstration, as a baremetal client application.


Matrix Multiply Host Script
===========================

The host is also responsible for loading the firmware containing the :ref:`RPmsg Matrix Multiply Remote Application<matrix-multiply-remote-app>` and starting the remote processor using :ref:`Remoteproc<overview-remoteproc-work-label>`.

For host controllers, like Linux, a script can be used to pipe the firmware to the exposed remoteproc system, followed by the execution of the user space mat_mul_demo application. For controllers without scripting capability, like baremetal and RTOS (Real Time Operating systems), this would be achieved in the code.

**********************
Matrix Multiply Source
**********************

RPmsg Matrix Multiply Baremetal Sources
=======================================

There are two baremetal applications, a daemon/service to run on the remote and a host/controller application which is the matrix multiply client requesting the calculations.

The RPmsg Matrix Multiply daemon/service application is available as a baremetal solution in the `OpenAMP Repository <https://github.com/OpenAMP/open-amp/blob/main/apps/examples/matrix_multiply/matrix_multiplyd.c>`_. Take note of the d for daemon at the end of the file.

The RPmsg Matrix Multiple host client application is available as a baremetal solution in the `OpenAMP Repository <https://github.com/OpenAMP/open-amp/blob/main/apps/examples/matrix_multiply/matrix_multiply.c>`_

Both are CMake application and can be built for any remote as long as the relevant :ref:`OS/HW abstraction layer<porting-guide-work-label>` components like libmetal are ported for that platform.

.. _matrix-multiply-linux-app:

Matrix Multiply Linux Source
============================

The matrix multiply Linux application is executed on the Linux host controller as a user space application.
The application is available in the `OpenAMP System Reference repository <https://github.com/OpenAMP/openamp-system-reference/blob/main/examples/linux/rpmsg-mat-mul/mat_mul_demo.c>`_.

It is a Makefile application and can be built using the `Yocto rpmsg-mat-mul recipe <https://github.com/OpenAMP/meta-openamp/blob/master/recipes-openamp/rpmsg-examples/rpmsg-mat-mul_1.0.bb>`_

An example host control script is given in the `matrix multiply readme <https://github.com/OpenAMP/openamp-system-reference/tree/main/examples/linux/rpmsg-mat-mul#run-the-demo>`_

*******************************
Reference Board Implementations
*******************************

This Matrix Multiply Sample is demonstrated in the following reference implementations.

* :ref:`Docker Images<docker-images-label>` as demo1B
* :ref:`AMD-Xilinx platforms<demos-AMD--work-label>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same it is available using Linux processes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

14 changes: 14 additions & 0 deletions demos/reference_boards.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

OpenAMP Reference Boards
========================

:ref:`OpenAMP Samples and Demos<demos-reference-samples>` are provided on a number of boards and virtual machines to demonstrate the implementation of each.

In general the OpenAMP feature being exemplified is found in the `OpenAMP source repository <https://github.com/OpenAMP/open-amp/tree/main/apps/examples>`_ through a number of examples. Additional supporting code is located in the `OpenAMP System Reference examples <https://github.com/OpenAMP/openamp-system-reference/tree/main/examples>`_

.. toctree::
:maxdepth: 2

docker_images
system_reference-AMD-Xilinx
system_reference-ST
5 changes: 5 additions & 0 deletions demos/system_reference-AMD-Xilinx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
System Reference Samples and Demos on the AMD-Xilinx platform
=============================================================

The following Reference Samples and Demos are implemented using the

* AMD `ZCU102 Evaluation Board <https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html#information>`_
* `QEMU <https://www.qemu.org/>`_ ZCU102 Virtual Machine in the :ref:`Docker Images References<docker-images-label>`

.. toctree::
:maxdepth: 2

Expand Down
Loading