Skip to content

Commit

Permalink
docs/plugins/dac: add docs and a test on the new "repeat data" option.
Browse files Browse the repository at this point in the history
Signed-off-by: AlexandraTrifan <[email protected]>
  • Loading branch information
AlexandraTrifan committed Feb 10, 2025
1 parent 9d43e40 commit 071863a
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 16 deletions.
40 changes: 24 additions & 16 deletions docs/plugins/dac/dac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ implements an output IIO buffer or at least one DDS (ALTVOLTAGE) output channel.

Both generation modes feature a few common items in their layout.

1. Tutorial button
1. Info button

The top left side information button will start a quick tutorial for basic
usage of the instrument.
The top left side information button will open a pop-up window containing
two buttons: **Tutorial** and **Documentation**.

The Documentation button will open this page in a browser and close the
pop-up window.

The Tutorial button will start a tutorial that will guide the user through
the main features of the plugin.

2. Right side menu

Expand Down Expand Up @@ -61,20 +67,29 @@ Find all the sections of the instrument described below.
List of detected IIO channels that are buffer capable. These can be
enabled or disabled using their left side check.

3. Cyclic
3. Repeat data

Choose whether to repeat the data columns loaded from file or not.
If enabled, the data columns will be repeated on all enabled channels,
without requiring the user to duplicate the data sets in the file to
match the number of enabled channels.

By default it is set to true.

4. Cyclic

Choose whether to push a cyclic IIO buffer or stream non-cyclic buffers.
If disabled, a new section containing "Buffer size" and "Kernel buffers"
will appear.

By default it is set to true.

4. File Size
5. File Size

The size of the loaded file. It is populated once loading is successful
and can be changed to a lower value, truncating the data loaded from file.

5. Run Button
6. Run Button

Start output generation on the currently enabled channels. If anything
is invalid in the setup it will appear in the bottom "Console Log" once
Expand All @@ -86,15 +101,15 @@ Find all the sections of the instrument described below.
- errors appeared while trying to configure the IIO Buffer
- the combined enabled channels are not compatible (for I/Q channels)

6. Data Configuration
7. Data Configuration

This section allows the user to scale the data before output.

7. Console Log
8. Console Log

All errors or status messages are displayed here.

8. File Configuration
9. File Configuration

This section is visible only when the buffer is non-cyclic. It contains a
control for buffer size and one for kernel buffers. Both are automatically
Expand Down Expand Up @@ -138,10 +153,3 @@ for available TX channels with I/Q corresponding channels.

.. note::
For scale, "-Inf dB" is equivalent with scale=0 or a disabled channel.


Tutorial
--------------------------------------------------------------------------------

A tutorial will automatically start first time the tool is open. It can
be restarted from tool Preferences.
71 changes: 71 additions & 0 deletions docs/tests/plugins/dac/dac_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -691,3 +691,74 @@ Test 10 - Channel attributes
The result of the test goes here (PASS/FAIL).

Test 11 - Repeat data option
--------------------------------------------

.. _TST.DAC.REPEAT_DATA:

**UID:** TST.DAC.REPEAT_DATA

**Description:** This test verifies the DAC plugin repeat data option.
The data sets loaded from the file should be repeated to fill in all the enabled
channels.

**Preconditions:**
- :ref:`AdalmPluto.Device<adalm_pluto_device_setup>`
- Enable 2 TX channels on your Pluto device.
- OS: ANY

**Resources:**
- `<https://github.com/analogdevicesinc/scopy/blob/main/plugins/dac/res/csv/sinewave_0.9_2ch.csv>`__

**Steps:**
1. Open the DAC plugin.
2. Switch the "Mode" to "Buffer".
3. Browse and select the *sinewave_0.9_2ch.csv* file.
4. Press the "Load" button.
- **Expected result:** The first 2 channels are enabled.
- **Actual result:**

..
Actual test result goes here.
..
5. Enable the remaining 2 channels from the channel list.
6. Set the **Repeat data** option to true and press **Run**.
- **Expected result:** The console log displays the following message: *Pushed 8444 samples, 67552 bytes (1/1 buffers).*
- **Actual result:**

..
Actual test result goes here.
..
7. Set the **Repeat data** option to false and press **Run**.
- **Expected result:** The console log displays the following message: *Not enough data columns for all enabled channels.*
- **Actual result:**

..
Actual test result goes here.
..
8. Leave the **Repeat data** as is, disable the last 2 channels and press **Run**:
- **Expected result:** The console log displays the following message: *Pushed 8444 samples, 33776 bytes (1/1 buffers).*
- **Actual result:**

..
Actual test result goes here.
..
**Tested OS:**

..
Details about the tested OS goes here.
**Comments:**

..
Any comments about the test goes here.
**Result:** PASS/FAIL

..
The result of the test goes here (PASS/FAIL).

0 comments on commit 071863a

Please sign in to comment.