Skip to content

Commit

Permalink
Add testing for AD9081 real-only mode
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Sep 5, 2024
1 parent b0b5c8b commit 635c8ca
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ scapy
scipy<=1.12.0
pytest-cov
coveralls
pytest-libiio>=0.0.18
pytest-libiio>=0.0.20
bump2version
pytest-html==3.2.0
plotly-express
Expand Down
1 change: 1 addition & 0 deletions test/emu/devices/ad9081_full_bw_mock.xml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions test/emu/hardware_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ ad9081_tdd:
- data_devices:
- iio:device3
- iio:device4
ad9081_full_bw:
- axi-ad9081-tx-hpc
- axi-ad9081-rx-hpc
- axi-core-tdd
- hmc7044
- pyadi_iio_class_support:
- ad9081
- emulate:
- filename: ad9081_full_bw_mock.xml
- data_devices:
- iio:device2
- iio:device3
ad9084:
- axi-ad9084-tx-hpc
- axi-ad9084-rx-hpc
Expand Down
23 changes: 23 additions & 0 deletions test/test_ad9081.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,26 @@ def test_ad9081_nco_loopback(


#########################################
@pytest.mark.iio_hardware("ad9081_full_bw")
def test_full_bw_rx(iio_uri):
import adi

dev = adi.ad9081(uri=iio_uri)

assert not dev._rx_complex_data
assert dev._tx_complex_data

assert dev._rx_fine_ddc_channel_names == [
"voltage0",
"voltage1",
"voltage2",
"voltage3",
]
assert dev._rx_coarse_ddc_channel_names == ["voltage0", "voltage2"]
assert dev._tx_fine_duc_channel_names == [
"voltage0",
"voltage1",
"voltage2",
"voltage3",
]
assert dev._tx_coarse_duc_channel_names == ["voltage0", "voltage1"]

0 comments on commit 635c8ca

Please sign in to comment.