Skip to content

Commit

Permalink
Jenkins update (#29)
Browse files Browse the repository at this point in the history
* Updated Jenkinsfile to build doc

Signed-off-by: Pagadarai <[email protected]>

* Added missing / in Jenkinsfile

Signed-off-by: Pagadarai <[email protected]>

* Updated doc_ml target

Signed-off-by: Pagadarai <[email protected]>

* Updated doc_ml target to move doc folder

Signed-off-by: Pagadarai <[email protected]>

* Fixed toc.tmpl file

Signed-off-by: Pagadarai <[email protected]>

* Another fix to toc.tmpl file

Signed-off-by: Pagadarai <[email protected]>

* Another fix to toc.tmpl file

Signed-off-by: Pagadarai <[email protected]>

* Fixes to remove menu in streaming.md, extra index page

Signed-off-by: Pagadarai <[email protected]>

* Another fix to generate helptoc.xml

Signed-off-by: Pagadarai <[email protected]>

* Minor update to allsysobjs.tmpl

Signed-off-by: Pagadarai <[email protected]>

* Simulation models subsection removed from install.md

Signed-off-by: Pagadarai <[email protected]>

---------

Signed-off-by: Pagadarai <[email protected]>
  • Loading branch information
SrikanthPagadarai authored Feb 27, 2023
1 parent 9c6d402 commit e6668ef
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 63 deletions.
5 changes: 1 addition & 4 deletions CI/gen_doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ; \
Expand Down
9 changes: 0 additions & 9 deletions CI/gen_doc/docs/_pages/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions CI/gen_doc/docs/_pages/streaming.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion CI/gen_doc/docs/_pages/toc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<toc>
<tocitem target="index.html">Analog Devices, Inc RF and Microwave Toolbox
{%- for page in pages %}
<tocitem target="{{ page }}/index.html">{{ page|capitalize }}</tocitem>
<tocitem target="{{ page }}/index.html">{{ page|capitalize }}</tocitem>
{%- endfor %}
<tocitem target="objects/index.html">Hardware Interface APIs
{%- for obj in devices %}
Expand Down
2 changes: 1 addition & 1 deletion CI/gen_doc/docs/_templates/allsysobjs.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% include 'header.tmpl' %}
# Hardware Interface APIs

Available hardware streaming interfaces in RFM Toolbox:
Available hardware streaming interfaces in RFuW Toolbox:
<!--
- [{{ obj }}](matlab:web([docroot '/3ptoolbox/analogdevicesincrfmicrowavetoolboxtoolbox/doc/sysobjects/{{ obj }}/index.html']))
-->
Expand Down
45 changes: 0 additions & 45 deletions CI/gen_doc/docs/_templates/sysobj.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,48 +47,3 @@

{% endblock %}

<div class="sysobj_desc_title">Example Usage</div>

```
{% 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 %}
```
1 change: 1 addition & 0 deletions CI/gen_doc/docs/gen_md_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
1 change: 1 addition & 0 deletions CI/gen_doc/requirements_doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ mkdocs-material
mkdocs-awesome-pages-plugin
mkdocs-mermaid2-plugin
mkdocs-plugin-inline-svg
jinja2
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e6668ef

Please sign in to comment.