id: uhd_rfnoc_ddc
label: RFNoC Digital Downconverter Block

templates:
  imports: |-
    from gnuradio import uhd
  make: |-
    uhd.rfnoc_ddc(
        self.rfnoc_graph,
        uhd.device_addr(${block_args}),
        ${device_select},
        ${instance_index})
    self.${id}.set_freq(${freq}, 0)
    self.${id}.set_output_rate(${output_rate}, 0)
  callbacks:
  - set_freq(${freq}, 0)
  - set_output_rate(${output_rate}, 0)

parameters:
- id: num_chans
  label: Number of Channels
  dtype: int
  default: 1
- id: block_args
  label: Block Args
  dtype: string
  default: ""
- id: device_select
  label: Device Select
  dtype: int
  default: -1
- id: instance_index
  label: Instance Select
  dtype: int
  default: -1
- id: freq
  label: Frequency Shift (Hz)
  dtype: real
  default: 0
- id: output_rate
  label: Output Rate (Hz)
  dtype: real
  default: 0

inputs:
- domain: rfnoc
  dtype: 'sc16'
  vlen: 1
  multiplicity: ${num_chans}

outputs:
- domain: rfnoc
  dtype: 'sc16'
  vlen: 1
  multiplicity: ${num_chans}

file_format: 1
