Skip to content

Adding Unload and Reload Specification File example in NI-Digital - #2264

Draft
NI-velmurugan wants to merge 5 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-nidigital-upload-and-reload-specification-file
Draft

NI-velmurugan wants to merge 5 commits into
ni:masterfrom
NI-velmurugan:users/velmurugan/add-nidigital-upload-and-reload-specification-file

Conversation

@NI-velmurugan

Copy link
Copy Markdown
Contributor
  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
    - [ ] I've added tests applicable for this pull request

What does this Pull Request accomplish?

This PR adds nidigital_unload_and_reload_specifications_file.py a Python adaptation of the LabVIEW NI-Digital Unload and Reload Specifications File.vi along with the supporting digital pattern editor project files.

What testing has been done?

Manually validated the example using simulated hardware only.
Ref #2254 (comment) for skipping the HW validation.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@codecov-commenter

codecov-commenter commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.12%. Comparing base (8e495b6) to head (f18524c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2264      +/-   ##
==========================================
- Coverage   88.97%   88.12%   -0.86%     
==========================================
  Files          82       88       +6     
  Lines       20306    22830    +2524     
==========================================
+ Hits        18068    20119    +2051     
- Misses       2238     2711     +473     
Flag Coverage Δ
codegenunittests 84.78% <ø> (ø)
nidcpowersystemtests 94.40% <ø> (+0.04%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.04% <ø> (ø)
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.08% <ø> (ø)
nifgensystemtests 94.34% <ø> (ø)
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests 82.71% <ø> (ø)
nirfsaunittests 63.37% <ø> (ø)
nirfsgsystemtests 81.22% <ø> (?)
niscopesystemtests 89.99% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (ø)
nitclksystemtests 94.87% <ø> (ø)
nitclkunittests 98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NI-velmurugan NI-velmurugan changed the title Adding Unload and Reload Specification File example in NI_Digital Adding Unload and Reload Specification File example in NI-Digital Nov 12, 2026
session.apply_levels_and_timing(levels_filename, timing_filename)

session.burst_pattern(start_label='startdemo')
site_number, captured_waveform = next(iter(session.fetch_capture_waveform(CAPTURE_WAVEFORM_NAME, len(source_waveform_data)).items()))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pin map defines four sites, but this reads only the first site’s waveform, if I'm not wrong.
Could we iterate over the returned dictionary to report results for every site?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like,

                captured_waveforms = session.fetch_capture_waveform(CAPTURE_WAVEFORM_NAME, len(source_waveform_data))
                for site_number, captured_waveform in captured_waveforms.items():
                    mismatch_fraction = _count_mismatched_bits(source_waveform_data, captured_waveform) / total_bits
                    print('Site {}: {}={:g}, {}={:g}: {:.4f}'.format(site_number, x_spec_name, x_value, y_spec_name, y_value, mismatch_fraction))

mismatch_fraction = _count_mismatched_bits(source_waveform_data, captured_waveform) / total_bits
print('Site {}: {}={:g}, {}={:g}: {:.4f}'.format(site_number, x_spec_name, x_value, y_spec_name, y_value, mismatch_fraction))

print('Done sweeping specifications')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's print this at the end after disconnecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants