diff --git a/src/nidigital/system_tests/test_system_nidigital.py b/src/nidigital/system_tests/test_system_nidigital.py index 51dec879c..70b3691f0 100644 --- a/src/nidigital/system_tests/test_system_nidigital.py +++ b/src/nidigital/system_tests/test_system_nidigital.py @@ -604,6 +604,40 @@ def test_write_sequencer_register(multi_instrument_session): 65535) +def test_configure_voltage_levels(multi_instrument_session): + assert multi_instrument_session.vil == pytest.approx(0.0, abs=1e-4) + assert multi_instrument_session.vih == pytest.approx(3.3, rel=1e-3) + assert multi_instrument_session.vol == pytest.approx(1.6, rel=1e-3) + assert multi_instrument_session.voh == pytest.approx(1.7, rel=1e-3) + assert multi_instrument_session.vterm == pytest.approx(2.0, rel=1e-3) + multi_instrument_session.load_pin_map(os.path.join(test_files_base_dir, "pin_map.pinmap")) + multi_instrument_session.pins['site0/PinA', 'site1/PinC'].configure_voltage_levels( + vil=1.0, + vih=2.0, + vol=3.0, + voh=4.0, + vterm=5.0) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].vil == pytest.approx(1.0, rel=1e-3) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].vih == pytest.approx(2.0, rel=1e-3) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].vol == pytest.approx(3.0, rel=1e-3) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].voh == pytest.approx(4.0, rel=1e-3) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].vterm == pytest.approx(5.0, rel=1e-3) + + +def test_configure_active_load_levels(multi_instrument_session): + assert multi_instrument_session.active_load_iol == pytest.approx(0.0015, rel=1e-3) + assert multi_instrument_session.active_load_ioh == pytest.approx(-0.0015, rel=1e-3) + assert multi_instrument_session.active_load_vcom == pytest.approx(2.0, rel=1e-3) + multi_instrument_session.load_pin_map(os.path.join(test_files_base_dir, "pin_map.pinmap")) + multi_instrument_session.pins['site0/PinA', 'site1/PinC'].configure_active_load_levels( + iol=0.024, + ioh=-0.024, + vcom=3.0) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].active_load_iol == pytest.approx(0.024, rel=1e-3) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].active_load_ioh == pytest.approx(-0.024, rel=1e-3) + assert multi_instrument_session.pins['site0/PinA', 'site1/PinC'].active_load_vcom == pytest.approx(3.0, rel=1e-3) + + def test_specifications_levels_and_timing_single(multi_instrument_session): pinmap = get_test_file_path('specifications_levels_and_timing_single', 'pin_map.pinmap') specs = get_test_file_path('specifications_levels_and_timing_single', 'specs.specs')