RFSoC unable to set NCO phase to -180.0 deg
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
It's possible to choose the phase offset in degrees of the NCO with the field PhaseOffset in the struct XRFdc_Mixer_Settings. However, it's not possible to set the phase to either -180.0 or +180.0 degrees. That is important in some scenarios, for example when an out-of-phase relation is required between NCOs on different ports, or when the NCO phase needs to be swept around the unit circle.
The issue seems to be the check in xrfdc_mixer.c:391:
if ((MixerSettingsPtr->PhaseOffset >= XRFDC_MIXER_PHASE_OFFSET_UP_LIMIT) ||
(MixerSettingsPtr->PhaseOffset <= XRFDC_MIXER_PHASE_OFFSET_LOW_LIMIT)) {
metal_log(METAL_LOG_ERROR, "\n Invalid phase offset value (%lf) for %s %u block %u in %s\r\n",
MixerSettingsPtr->PhaseOffset, (Type == XRFDC_ADC_TILE) ? "ADC" : "DAC", Tile_Id, Block_Id,
__func__);
Status = XRFDC_FAILURE;
goto RETURN_PATH;
}
I believe the second condition should be changed from <= to < to allow setting phases in the half-open interval [-180.0, +180.0).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in XilinxProcessorIPLib/drivers/rfdc/src/xrfdc_mixer.c around line 391 and inspect the PhaseOffset bounds check in the mixer settings path. Change the lower-bound handling so -180.0 is accepted while the stated half-open range still rejects +180.0. Done means the driver accepts the negative boundary without accepting the positive boundary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100