matlab-design-dsphdl-ddc

Design, simulate, and generate HDL for Digital Down Converters using dsphdl System objects.

995|122|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-design-dsphdl-ddc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matlab-design-dsphdl-ddc
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/signal-processing/matlab-design-dsphdl-ddc
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-design-dsphdl-ddc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Designing an HDL-ready Digital Down Converter (DDC) in MATLAB requires correctly coordinating an NCO, mixer, and multi-stage decimation filter chain with fixed-point arithmetic, valid-signal pipelining, and resource-sharing settings — mistakes in any of these produce non-synthesizable or incorrect hardware. This Skill encodes the conventions and workflow so the generated design simulates correctly and converts cleanly to Verilog or VHDL.

Core Features & Use Cases

  • End-to-end DDC workflow: Computes NCO phase increments, designs CIC compensation filters with dsp.CICCompensationDecimator, instantiates dsphdl System objects, simulates the streaming chain, and generates HDL via HDL Coder.
  • Integer and non-integer decimation: Supports CIC+FIR staging for integer factors and adds dsphdl.FarrowRateConverter for fractional rate changes such as 8.2x or 12.5x.
  • Interactive requirements gathering: Prompts for sample rate, carrier frequency, output rate, bandwidth, input data type, decimation staging, CIC sections, and HDL language before generating code.
  • Use Case: An engineer needs a receiver front-end that down-converts a 25 MHz carrier sampled at 100 MHz to a 6.25 MHz baseband for an FPGA. The Skill gathers the specs, builds the NCO + CIC(x8) + FIR(x2) chain, simulates it with a modulated test signal, and emits synthesizable Verilog.

Quick Start

Ask the agent to design a Digital Down Converter with dsphdl System objects for your target sample rate, carrier frequency, and decimation factor, then simulate it and generate HDL.

Frequently Asked Questions about matlab-design-dsphdl-ddc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a Digital Down Converter in MATLAB for FPGA?

Combine a dsphdl.NCO for the local oscillator, a complex mixer using fi() arithmetic, and a decimation chain of dsphdl.CICDecimator plus dsphdl.FIRDecimator. Simulate the streaming design sample-by-sample, then generate Verilog or VHDL with HDL Coder using codegen.

How to handle non-integer decimation factors in an HDL DDC?

Use integer CIC and FIR stages for bulk decimation and add a dsphdl.FarrowRateConverter for the fractional remainder. Choose integer stages so CIC_R times FIR_R stays below the total decimation, keeping the Farrow RateChange above 1 since it must decimate in a DDC.

Why is my NCO down-conversion producing the wrong frequency?

The phase increment must be computed as round((-Fc * 2^AccumulatorWL) / Fs) with the negative sign included for correct down-conversion. Also set PhaseIncrementSource to 'Property' for fixed-frequency designs so the step signature stays nco(validIn).

Can I call dsp.CICCompensationDecimator inside an HDL function?

No, dsp.CICCompensationDecimator is not supported for HDL code generation. Run it in a separate design script to compute the compensation coefficients, then hardcode the resulting numeric vector as the FIRDecimator Numerator inside the HDL function.

What does the NumCycles property do on dsphdl FIR filters?

NumCycles enables multiplier resource sharing by telling the filter how many clock cycles elapse between valid input samples. Set it to the cumulative decimation at that stage's input, for example NumCycles = 8 for a FIR following a CIC that decimates by 8.

When should I not use this DDC design workflow?

This workflow targets HDL generation for FPGA or ASIC hardware only. It is not appropriate for non-HDL targets such as embedded C code generation, which require different toolchains and design conventions.