From e6668ef7c6ea59f09b8877eaf4f1c281c3c59889 Mon Sep 17 00:00:00 2001 From: Srikanth Pagadarai Date: Mon, 27 Feb 2023 17:19:44 -0500 Subject: [PATCH] Jenkins update (#29) * Updated Jenkinsfile to build doc Signed-off-by: Pagadarai * Added missing / in Jenkinsfile Signed-off-by: Pagadarai * Updated doc_ml target Signed-off-by: Pagadarai * Updated doc_ml target to move doc folder Signed-off-by: Pagadarai * Fixed toc.tmpl file Signed-off-by: Pagadarai * Another fix to toc.tmpl file Signed-off-by: Pagadarai * Another fix to toc.tmpl file Signed-off-by: Pagadarai * Fixes to remove menu in streaming.md, extra index page Signed-off-by: Pagadarai * Another fix to generate helptoc.xml Signed-off-by: Pagadarai * Minor update to allsysobjs.tmpl Signed-off-by: Pagadarai * Simulation models subsection removed from install.md Signed-off-by: Pagadarai --------- Signed-off-by: Pagadarai --- CI/gen_doc/Makefile | 5 +-- CI/gen_doc/docs/_pages/install.md | 9 ----- CI/gen_doc/docs/_pages/streaming.md | 6 +-- CI/gen_doc/docs/_pages/toc.tmpl | 2 +- CI/gen_doc/docs/_templates/allsysobjs.tmpl | 2 +- CI/gen_doc/docs/_templates/sysobj.html | 45 ---------------------- CI/gen_doc/docs/gen_md_pages.py | 1 + CI/gen_doc/requirements_doc.txt | 1 + Jenkinsfile | 2 + 9 files changed, 10 insertions(+), 63 deletions(-) diff --git a/CI/gen_doc/Makefile b/CI/gen_doc/Makefile index 0fc30b3..130af15 100644 --- a/CI/gen_doc/Makefile +++ b/CI/gen_doc/Makefile @@ -42,14 +42,11 @@ GITTAG := $(shell git describe --tags HEAD) .ONESHELL: doc_ml: - cd ../.. ; \ cd docs ; \ - cp ../../scripts/ports.json . ; \ - cp ../../scripts/read_ports_json.py . ; \ - python3 read_ports_json.py ; \ MATLAB=ON python3 gen_all_doc.py ; \ cd .. ; \ mkdocs build -d doc + mv doc ../../ doc: cd docs ; \ diff --git a/CI/gen_doc/docs/_pages/install.md b/CI/gen_doc/docs/_pages/install.md index 47e0d0a..92f4ba3 100644 --- a/CI/gen_doc/docs/_pages/install.md +++ b/CI/gen_doc/docs/_pages/install.md @@ -5,15 +5,6 @@ The toolbox has different dependencies based on the features required. These are broken down into the base dependencies for running models, data stream and control, and HDL code generation. -### Simulation Models - -The simulation models for the different components can be used in either MATLAB or Simulink through the MATLAB System block. To run the available models requires the following toolboxes from MathWorks: - -- [DSP System Toolbox](https://www.mathworks.com/products/dsp-system.html) -- [Signal Processing Toolbox](https://www.mathworks.com/products/signal.html) -- [(Optional) Simulink](https://www.mathworks.com/products/simulink.html) - - ### Data Streaming with Hardware The base dependencies for the toolbox requires libiio and the libiio MATLAB bindings. There are three options for this install with different required MathWorks Toolboxes: diff --git a/CI/gen_doc/docs/_pages/streaming.md b/CI/gen_doc/docs/_pages/streaming.md index 4b30692..42ab93c 100644 --- a/CI/gen_doc/docs/_pages/streaming.md +++ b/CI/gen_doc/docs/_pages/streaming.md @@ -1,4 +1,4 @@ - +{% include 'header.tmpl' %} # Receiving and Sending Data Remote data streaming to and from hardware is made available through [system object interfaces](https://www.mathworks.com/help/matlab/matlab_prog/what-are-system-objects.html), which are unique for each component or platform. The hardware interfacing system objects provide a since class to both configure a given platform and move data back and forth from the device. @@ -11,9 +11,9 @@ Since libiio is cross-platform it can be used from Windows, Linux, or macOS base ## Connecting and Configuration -Connecting to hardware is done by setting the **uri** property of the system object interface. The **uri** for libiio always has the convention "*< backend >:< address >*", where *backend* can be ip,usb, or serial. *address* will be specific to the backend. This is documented in the [libiio API](https://analogdevicesinc.github.io/libiio/master/libiio/group__Context.html#gafdcee40508700fa395370b6c636e16fe). +Connecting to hardware is done by setting the **uri** property of the system object interface. The **uri** for libiio always has the convention "*< backend >:< address >*", where *backend* can be ip, usb, or serial. *address* will be specific to the backend. This is documented in the [libiio API](https://analogdevicesinc.github.io/libiio/master/libiio/group__Context.html#gafdcee40508700fa395370b6c636e16fe). -Below is a basic example of setting up an AD9361 receiver and the Stingray class in an X-band development kit using an Ethernet/IP backend where the address of the target system is 192.168.2.1: +Below is a basic example of setting up an AD9081 receiver and the Stingray class in an X-band development kit using an Ethernet/IP backend: ```linenums="1" uri = 'ip:192.168.1.211'; diff --git a/CI/gen_doc/docs/_pages/toc.tmpl b/CI/gen_doc/docs/_pages/toc.tmpl index 3a1b6d2..1383165 100644 --- a/CI/gen_doc/docs/_pages/toc.tmpl +++ b/CI/gen_doc/docs/_pages/toc.tmpl @@ -2,7 +2,7 @@ Analog Devices, Inc RF and Microwave Toolbox {%- for page in pages %} - {{ page|capitalize }} + {{ page|capitalize }} {%- endfor %} Hardware Interface APIs {%- for obj in devices %} diff --git a/CI/gen_doc/docs/_templates/allsysobjs.tmpl b/CI/gen_doc/docs/_templates/allsysobjs.tmpl index 4da06cc..9000d28 100644 --- a/CI/gen_doc/docs/_templates/allsysobjs.tmpl +++ b/CI/gen_doc/docs/_templates/allsysobjs.tmpl @@ -1,7 +1,7 @@ {% include 'header.tmpl' %} # Hardware Interface APIs -Available hardware streaming interfaces in RFM Toolbox: +Available hardware streaming interfaces in RFuW Toolbox: diff --git a/CI/gen_doc/docs/_templates/sysobj.html b/CI/gen_doc/docs/_templates/sysobj.html index 19c8120..415f88f 100644 --- a/CI/gen_doc/docs/_templates/sysobj.html +++ b/CI/gen_doc/docs/_templates/sysobj.html @@ -47,48 +47,3 @@ {% endblock %} -
Example Usage
- -``` -{% if obj.type == "Tx" %} -%% Configure device -tx = {{ obj.name }}; -tx.uri = "ip:analog.local"; -tx.DataSource = 'DMA'; -tx.EnableCyclicBuffers = true; -tx.EnabledChannels = 1; - -%% Generate tone -amplitude = 2^15; frequency = 0.12e6; -swv1 = dsp.SineWave(amplitude, frequency); -{% if obj.name == "adi.AD9081.Tx" or obj.name == "adi.AD9081.Rx" -%} -swv1.ComplexOutput = true; -{% endif -%} -swv1.SamplesPerFrame = 2^14; -{% if (obj.name == "adi.AD9081.Tx") or (obj.name == "adi.AD9081.Rx") -%} -swv1.SampleRate = 250e6; -{% else %} -swv1.SampleRate = tx.SamplingRate; -{% endif -%} -y = swv1(); - -%% Send -tx(y); -{% else %} -%% Rx set up -rx = {{ obj.name }}('uri','ip:analog.local'); -rx.SamplesPerFrame = 2^14; -rx.EnabledChannels = 1; - -%% Run -for k=1:10 - valid = false; - while ~valid - [out, valid] = rx(); - end -end - -%% Cleanup -release(rx) -{% endif %} -``` \ No newline at end of file diff --git a/CI/gen_doc/docs/gen_md_pages.py b/CI/gen_doc/docs/gen_md_pages.py index 57c2714..9d068c7 100644 --- a/CI/gen_doc/docs/gen_md_pages.py +++ b/CI/gen_doc/docs/gen_md_pages.py @@ -33,6 +33,7 @@ def gen_toc(pages, devices): template = env.get_template("toc.tmpl") + pages.remove('index') output = template.render(pages=pages, devices=devices) loc = os.path.dirname(__file__) diff --git a/CI/gen_doc/requirements_doc.txt b/CI/gen_doc/requirements_doc.txt index a23aded..5e8bb2c 100644 --- a/CI/gen_doc/requirements_doc.txt +++ b/CI/gen_doc/requirements_doc.txt @@ -4,3 +4,4 @@ mkdocs-material mkdocs-awesome-pages-plugin mkdocs-mermaid2-plugin mkdocs-plugin-inline-svg +jinja2 diff --git a/Jenkinsfile b/Jenkinsfile index d0bfae7..2d72d1a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,8 @@ stage("Build Toolbox") { withEnv(['PACKAGE='+branchName]) { checkout scm sh 'git submodule update --init' + sh 'pip3 install -r ./CI/gen_doc/requirements_doc.txt' + sh 'make -C ./CI/gen_doc doc_ml' sh 'python3 CI/scripts/rename_common.py' sh 'make -C ./CI/scripts gen_tlbx' archiveArtifacts artifacts: '*.mltbx'