Skip to content

Add AD9084 PFIR/CFIR filter support, gain LUT calibration, and hardwa… - #174

Open
JahshawnR2 wants to merge 2 commits into
analogdevicesinc:masterfrom
JahshawnR2:ad9084-filter-support
Open

Add AD9084 PFIR/CFIR filter support, gain LUT calibration, and hardwa…#174
JahshawnR2 wants to merge 2 commits into
analogdevicesinc:masterfrom
JahshawnR2:ad9084-filter-support

Conversation

@JahshawnR2

Copy link
Copy Markdown

…re tests

  • PFilt.m / CFIR.m: filter classes with design, quantize, write, and response methods
  • FIRcoeff.m: Q15 tap quantization for hardware register loading
  • filter_demo.m / filter_compare.m: end-to-end walkthrough and before/after comparison
  • pfir_gain_lut_study.m / cfir_gain_lut_study.m: gain characterization and LUT generation
  • pfir_gain_calibration.m / pfir_sweep_study.m: tap linearity and normalization analysis
  • plotting_fft.m: real-time spectrum display
  • AD9084HWTests.m: hardware test suite for filter loading and attenuation
  • AD9084_WALKTHROUGH.txt: full documentation of signal chain, usage, and findings
  • Rx.m / Tx.m: added EnablePFIRs/EnableCFIRs properties, NCO bugfix

…re tests

- PFilt.m / CFIR.m: filter classes with design, quantize, write, and response methods
- FIRcoeff.m: Q15 tap quantization for hardware register loading
- filter_demo.m / filter_compare.m: end-to-end walkthrough and before/after comparison
- pfir_gain_lut_study.m / cfir_gain_lut_study.m: gain characterization and LUT generation
- pfir_gain_calibration.m / pfir_sweep_study.m: tap linearity and normalization analysis
- plotting_fft.m: real-time spectrum display
- AD9084HWTests.m: hardware test suite for filter loading and attenuation
- AD9084_WALKTHROUGH.txt: full documentation of signal chain, usage, and findings
- Rx.m / Tx.m: added EnablePFIRs/EnableCFIRs properties, NCO bugfix

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove this file. This should be part of the PR message and not the code

Comment thread +adi/+AD9084/CHANGES.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove from commit. This can be seen from commit itself

% filter on the Washington hardware. For ease of use, the filtView switch have been
% added to turn off/on the filter analysis tool (fvtool).

clear; clc;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove these lines

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move file to hsx_examples/streaming folder

Comment thread +adi/+AD9084/pfir_gain_calibration.m Outdated
Comment on lines +44 to +47
repoRoot = fullfile(fileparts(mfilename('fullpath')), '..', '..');
addpath(genpath(repoRoot));
clear classes
rehash toolboxcache

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove lines

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move to hsx_examples/streaming

Comment thread +adi/+AD9084/CFIR.m Outdated

properties
taps (:,1) double % Column vector of taps
params struct % Normalized parameters (header fields, etc.)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Flatten this struct into class properties rather than a struct. It will make the input much easier to create

Comment thread +adi/+AD9084/CFIR.m Outdated
Comment on lines +49 to +54
%complex_scalar Complex Scalar Multiplier
% 16-bit signed [real, imag] pair applied as a complex
% multiplier after filtering. Normalized by 32767.
% [32767 0] = unity real, [0 32767] = 90 degree rotation.
% Range: each component [-32768, 32767].
options.complex_scalar (1,2) double = [32767 0]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this should just be a complex scalar and not a dual element vector. complex numbers are native to MATLAB

Comment thread +adi/+AD9084/CFIR.m Outdated
% Programmable gain block at the CFIR output. Ranges from
% -18 dB to +12 dB in 6 dB steps.
% Options: '-18', '-12', '-6', '0', '6', '12'
options.gain {mustBeText} = "0"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use enum

Comment thread +adi/+AD9084/PFilt.m Outdated

properties
taps (:,1) double % Column vector of taps
params struct % Normalized parameters (header fields, etc.)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should be flattened similar to CFIR

…r, move scripts

- Flatten params struct into individual class properties in CFIR.m and PFilt.m
- Change CFIR complex_scalar from [real, imag] vector to native MATLAB complex
- Add mustBeMember enum validation for gain, selection_mode, etc.
- Remove path setup boilerplate from scripts
- Move example/study scripts to hsx_examples/streaming/ and trx_examples/streaming/
- Add CFIR all-pass to pfir_gain_lut_study to prevent residual CFIR interference
- Update .gitignore for gain_study_results directories

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JahshawnR2
JahshawnR2 requested a review from tfcollins July 1, 2026 18:39
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.

2 participants