exponenta event banner

generatehdl

Создание кода HDL для квантованного фильтра

Описание

пример

generatehdl(filtSO,'InputDataType',nt) генерирует код HDL для указанного фильтра System object™ и типа входных данных, nt.

Созданный файл является единственным исходным файлом, включающим объявление объекта и код архитектуры. Вы можете найти этот файл в текущей рабочей папке, внутри hdlsrc подпапка.

generatehdl(filtSO,'InputDataType',nt,'FractionalDelayDataType',fd) генерирует код HDL для dsp.VariableFractionalDelay фильтровать системный объект. Укажите тип входных данных, ntи тип данных дробной задержки, fd.

generatehdl(filterObj) генерирует код HDL для указанного dfilt фильтрация объекта с использованием настроек по умолчанию.

пример

generatehdl(___,Name,Value) использует необязательные аргументы «имя-значение» в дополнение к входным аргументам в предыдущих синтаксисах. Эти свойства используются для переопределения настроек генерации кода HDL по умолчанию.

Примеры

свернуть все

Спроектируйте симметричный эквиропльный фильтр прямой формы со следующими характеристиками:

  • Нормированная частота полосы пропускания 0,2

  • Нормированная частота полосы останова 0,22

  • Пульсация полосы пропускания 1 дБ

  • Затухание полосы останова 60 дБ

design функция возвращает dsp.FIRFilter Системный object™, реализующий спецификацию.

filtSpecs = fdesign.lowpass('Fp,Fst,Ap,Ast',0.2,0.22,1,60);
FIRe = design(filtSpecs,'equiripple','FilterStructure','dfsymfir','SystemObject',true)
FIRe = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form symmetric'
      NumeratorSource: 'Property'
            Numerator: [1x202 double]
    InitialConditions: 0

  Show all properties

Для генерации кода HDL вызовите generatehdl функция. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для ввода с помощью свойства InputDataType. Кодер генерирует файл MyFilter.vhd в целевой папке по умолчанию, hdlsrc.

generatehdl(FIRe,'InputDataType',numerictype(1,16,15),'Name','MyFilter');
### Starting VHDL code generation process for filter: MyFilter
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex48836167/hdlsrc/MyFilter.vhd
### Starting generation of MyFilter VHDL entity
### Starting generation of MyFilter VHDL architecture
### Successful completion of VHDL code generation process for filter: MyFilter
### HDL latency is 2 samples

Спроектируйте симметричный эквиропльный фильтр прямой формы со следующими характеристиками:

  • Нормированная частота полосы пропускания 0,2

  • Нормированная частота полосы останова 0,22

  • Пульсация полосы пропускания 1 дБ

  • Затухание полосы останова 60 дБ

design функция возвращает dsp.FIRFilter Системный object™, реализующий спецификацию.

filtSpecs = fdesign.lowpass('Fp,Fst,Ap,Ast',0.2,0.22,1,60);
FIRe = design(filtSpecs,'equiripple','FilterStructure','dfsymfir','SystemObject',true)
FIRe = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form symmetric'
      NumeratorSource: 'Property'
            Numerator: [1x202 double]
    InitialConditions: 0

  Show all properties

Создание кода VHDL и тестового стенда VHDL для фильтра FIR equiripple. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для типа входных данных. Кодер генерирует файлы MyFilter.vhd и MyFilterTB.vhd в целевой папке по умолчанию, hdlsrc.

generatehdl(FIRe,'InputDataType',numerictype(1,16,15),'Name','MyFilter',...
    'GenerateHDLTestbench','on','TestBenchName','MyFilterTB')
### Starting VHDL code generation process for filter: MyFilter
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex63281302/hdlsrc/MyFilter.vhd
### Starting generation of MyFilter VHDL entity
### Starting generation of MyFilter VHDL architecture
### Successful completion of VHDL code generation process for filter: MyFilter
### HDL latency is 2 samples
### Starting generation of VHDL Test Bench.
### Generating input stimulus
### Done generating input stimulus; length 4486 samples.
### Generating Test bench: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex63281302/hdlsrc/MyFilterTB.vhd
### Creating stimulus vectors ...
### Done generating VHDL Test Bench.

Проектируйте симметричный равнодействующий фильтр прямой формы с полностью параллельной (по умолчанию) архитектурой и программируемыми коэффициентами. design функция возвращает dsp.FIRFilter Системные object™ со спецификацией фильтра нижних частот по умолчанию.

firfilt = design(fdesign.lowpass,'equiripple','FilterStructure','dfsymfir','SystemObject',true)
firfilt = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form symmetric'
      NumeratorSource: 'Property'
            Numerator: [1x43 double]
    InitialConditions: 0

  Show all properties

Для генерации кода HDL вызовите generatehdl функция. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для входных данных. Чтобы создать интерфейс процессора для коэффициентов, необходимо указать дополнительный аргумент пары имя-значение.

generatehdl(firfilt,'InputDataType',numerictype(1,16,15),'CoefficientSource','ProcessorInterface')
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex74213987/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 2 samples

Кодер генерирует этот объект VHDL для объекта фильтра.

Создайте антисимметричный фильтр прямого вида с коэффициентами:

coeffs = fir1(22,0.45);
firfilt = dsp.FIRFilter('Numerator',coeffs,'Structure','Direct form antisymmetric')
firfilt = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form antisymmetric'
      NumeratorSource: 'Property'
            Numerator: [1x23 double]
    InitialConditions: 0

  Show all properties

Для генерации кода HDL вызовите generatehdl функция. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для входных данных. Чтобы создать частично последовательную архитектуру, укажите последовательный раздел. Позволить CoefficientMemory свойство, необходимо задать CoefficientSource кому ProcessorInterface.

generatehdl(firfilt,'InputDataType',numerictype(1,16,15), ...
    'SerialPartition',[7 4],'CoefficientMemory','DualPortRAMs', ...
    'CoefficientSource','ProcessorInterface')
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex21465785/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Clock rate is 7 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 3 samples

Сгенерированный код включает в себя двухпортовый интерфейс ОЗУ для программируемых коэффициентов.

Изучите тактовую частоту и задержку для различных последовательных реализаций одного фильтра. Использование симметричной структуры также позволяет логике фильтра совместно использовать множители для симметричных коэффициентов.

Создайте симметричный фильтр FIR прямой формы со следующими спецификациями:

  • Порядок фильтрации 13

  • Нормированная частота отсечки 0,4 для точки 6-dB

design функция возвращает dsp.FIRFilter Системный object™, реализующий спецификацию.

FIR = design(fdesign.lowpass('N,Fc',13,.4),'FilterStructure','dfsymfir','SystemObject',true)
FIR = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form symmetric'
      NumeratorSource: 'Property'
            Numerator: [1x14 double]
    InitialConditions: 0

  Show all properties

Для генерации кода HDL вызовите generatehdl функция. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для входных данных.

Для сравнения базовой линии сначала создайте полностью параллельную архитектуру по умолчанию.

generatehdl(FIR,'Name','FullyParallel', ...
    'InputDataType',numerictype(1,16,15))
### Starting VHDL code generation process for filter: FullyParallel
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex94948885/hdlsrc/FullyParallel.vhd
### Starting generation of FullyParallel VHDL entity
### Starting generation of FullyParallel VHDL architecture
### Successful completion of VHDL code generation process for filter: FullyParallel
### HDL latency is 2 samples

Создайте полностью последовательную архитектуру, установив размер раздела на эффективную длину фильтра. Тактовая частота системы в шесть раз превышает входную частоту дискретизации. Сообщенная задержка HDL на один образец больше, чем параллельная реализация по умолчанию.

generatehdl(FIR,'SerialPartition',6,'Name','FullySerial', ...
    'InputDataType',numerictype(1,16,15))
### Starting VHDL code generation process for filter: FullySerial
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex94948885/hdlsrc/FullySerial.vhd
### Starting generation of FullySerial VHDL entity
### Starting generation of FullySerial VHDL architecture
### Clock rate is 6 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: FullySerial
### HDL latency is 3 samples

Создайте частично последовательную архитектуру с тремя равными разделами. Эта архитектура использует три множителя. Тактовая частота в два раза превышает входную, а задержка совпадает с параллельной реализацией по умолчанию.

generatehdl(FIR,'SerialPartition',[2 2 2],'Name','PartlySerial', ...
    'InputDataType',numerictype(1,16,15))
### Starting VHDL code generation process for filter: PartlySerial
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex94948885/hdlsrc/PartlySerial.vhd
### Starting generation of PartlySerial VHDL entity
### Starting generation of PartlySerial VHDL architecture
### Clock rate is 2 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: PartlySerial
### HDL latency is 3 samples

Создайте каскадно-последовательную архитектуру, разрешив повторное использование накопителя. Укажите три секции в порядке убывания размера. Обратите внимание, что тактовая частота выше, чем частота в примере частично последовательного (без повторного использования аккумулятора).

generatehdl(FIR,'SerialPartition',[3 2 1],'ReuseAccum','on','Name','CascadeSerial', ...
    'InputDataType',numerictype(1,16,15))
### Starting VHDL code generation process for filter: CascadeSerial
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex94948885/hdlsrc/CascadeSerial.vhd
### Starting generation of CascadeSerial VHDL entity
### Starting generation of CascadeSerial VHDL architecture
### Clock rate is 4 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: CascadeSerial
### HDL latency is 3 samples

Также можно создать каскадно-последовательную архитектуру без явного указания разделов. Кодер автоматически выбирает размеры разделов.

generatehdl(FIR,'ReuseAccum','on','Name','CascadeSerial', ...
    'InputDataType',numerictype(1,16,15))
### Starting VHDL code generation process for filter: CascadeSerial
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex94948885/hdlsrc/CascadeSerial.vhd
### Starting generation of CascadeSerial VHDL entity
### Starting generation of CascadeSerial VHDL architecture
### Clock rate is 4 times the input sample rate for this architecture.
### Serial partition # 1 has 3 inputs.
### Serial partition # 2 has 3 inputs.
### Successful completion of VHDL code generation process for filter: CascadeSerial
### HDL latency is 3 samples

Создайте двухступенчатый каскадный фильтр со следующими характеристиками для каждой ступени фильтра:

  • Симметричный КИХ-фильтр прямого вида

  • Порядок фильтров 8

  • Нормированная частота отсечки 0,4 для точки 6-dB

Каждый вызов design функция возвращает dsp.FIRFilter Системный object™, реализующий спецификацию. cascade функция возвращает двухступенчатый каскадный фильтр.

lp = design(fdesign.lowpass('N,Fc',8,.4),'FilterStructure','dfsymfir','SystemObject',true)
lp = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form symmetric'
      NumeratorSource: 'Property'
            Numerator: [1x9 double]
    InitialConditions: 0

  Show all properties

hp = design(fdesign.highpass('N,Fc',8,.4),'FilterStructure','dfsymfir','SystemObject',true)
hp = 
  dsp.FIRFilter with properties:

            Structure: 'Direct form symmetric'
      NumeratorSource: 'Property'
            Numerator: [1x9 double]
    InitialConditions: 0

  Show all properties

casc = cascade(lp,hp)
casc = 
  dsp.FilterCascade with properties:

    Stage1: [1x1 dsp.FIRFilter]
    Stage2: [1x1 dsp.FIRFilter]

Для генерации кода HDL вызовите generatehdl для каскадного фильтра. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для входных данных.

Укажите различные разделы для каждой каскадной стадии в качестве массива ячеек.

generatehdl(casc,'InputDataType',numerictype(1,16,15),'SerialPartition',{[3 2],[4 1]})
### Starting VHDL code generation process for filter: casfilt
### Cascade stage # 1
### Starting VHDL code generation process for filter: casfilt_stage1
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex16715237/hdlsrc/casfilt_stage1.vhd
### Starting generation of casfilt_stage1 VHDL entity
### Starting generation of casfilt_stage1 VHDL architecture
### Clock rate is 3 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage1
### Cascade stage # 2
### Starting VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex16715237/hdlsrc/casfilt_stage2.vhd
### Starting generation of casfilt_stage2 VHDL entity
### Starting generation of casfilt_stage2 VHDL architecture
### Clock rate is 4 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex16715237/hdlsrc/casfilt.vhd
### Starting generation of casfilt VHDL entity
### Starting generation of casfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt
### HDL latency is 2 samples

Чтобы изучить эффективную длину фильтра и опции секционирования для каждой ступени фильтра каскада, вызовите hdlfilterserialinfo функция. Функция возвращает вектор разбиения, соответствующий требуемому количеству умножителей. Запросите возможности последовательного разбиения для первого этапа и выберите ряд множителей.

hdlfilterserialinfo(casc.Stage1,'InputDataType',numerictype(1,16,15))
   | Total Coefficients | Zeros | A/Symm | Effective |
   ---------------------------------------------------
   |          9         |   0   |    4   |     5     |

Effective filter length for SerialPartition value is 5.

  Table of 'SerialPartition' values with corresponding values of 
  folding factor and number of multipliers for the given filter.

   | Folding Factor | Multipliers | SerialPartition |
   --------------------------------------------------
   |        1       |      5      |[1 1 1 1 1]      |
   |        2       |      3      |[2 2 1]          |
   |        3       |      2      |[3 2]            |
   |        4       |      2      |[4 1]            |
   |        5       |      1      |[5]              |

Выберите вектор последовательного разбиения для цели из двух умножителей и передайте векторы в generatehdl функция. Вызов функции таким образом возвращает первый возможный вектор разбиения, но существует несколько векторов разбиения, которые достигают двухкратной архитектуры. Каждый каскад использует различную тактовую частоту на основе количества умножителей. Кодер генерирует контроллер синхронизации для получения этих тактовых импульсов.

sp1 = hdlfilterserialinfo(casc.Stage1,'InputDataType',numerictype(1,16,15),'Multiplier',2)
sp1 = 1×2

     3     2

sp2 = hdlfilterserialinfo(casc.Stage2,'InputDataType',numerictype(1,16,15),'Multiplier',3)
sp2 = 1×3

     2     2     1

generatehdl(casc,'InputDataType',numerictype(1,16,15),'SerialPartition',{sp1,sp2})
### Starting VHDL code generation process for filter: casfilt
### Cascade stage # 1
### Starting VHDL code generation process for filter: casfilt_stage1
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex16715237/hdlsrc/casfilt_stage1.vhd
### Starting generation of casfilt_stage1 VHDL entity
### Starting generation of casfilt_stage1 VHDL architecture
### Clock rate is 3 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage1
### Cascade stage # 2
### Starting VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex16715237/hdlsrc/casfilt_stage2.vhd
### Starting generation of casfilt_stage2 VHDL entity
### Starting generation of casfilt_stage2 VHDL architecture
### Clock rate is 2 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex16715237/hdlsrc/casfilt.vhd
### Starting generation of casfilt VHDL entity
### Starting generation of casfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt
### HDL latency is 2 samples

Создайте прямой фильтр I SOS формы со следующими спецификациями:

  • Частота дискретизации 48 кГц

  • Порядок фильтров 5

  • Частота отсечки 10,8 кГц для точки 3 дБ

design функция возвращает dsp.BiquadFilter Системный object™, реализующий спецификацию. Пользовательский тип данных накопителя позволяет избежать ошибки квантования.

Fs = 48e3;
Fc = 10.8e3;
N = 5;
lp = design(fdesign.lowpass('n,f3db',N,Fc,Fs),'butter', ...
    'FilterStructure','df1sos','SystemObject',true) 
lp = 
  dsp.BiquadFilter with properties:

                       Structure: 'Direct form I'
                 SOSMatrixSource: 'Property'
                       SOSMatrix: [3x6 double]
                     ScaleValues: [4x1 double]
      NumeratorInitialConditions: 0
    DenominatorInitialConditions: 0
        OptimizeUnityScaleValues: true

  Show all properties

nt_accum = numerictype('Signedness','auto','WordLength',20, ...
    'FractionLength',15);
nt_input = numerictype(1,16,15);
lp.NumeratorAccumulatorDataType = 'Custom';
lp.CustomNumeratorAccumulatorDataType = nt_accum;
lp.DenominatorAccumulatorDataType = 'Custom';
lp.CustomDenominatorAccumulatorDataType = nt_accum;

Чтобы перечислить все возможные спецификации последовательной архитектуры для этого фильтра, вызовите hdlfilterserialinfo функция. Если фильтр является объектом System, необходимо указать тип данных с фиксированной точкой для входных данных.

hdlfilterserialinfo(lp,'InputDataType',nt_input)
  Table of folding factors with corresponding number of multipliers for the given filter.

   | Folding factor | Multipliers |
   --------------------------------
   |        6       |      3      |
   |        9       |      2      |
   |       18       |      1      |

Для генерации кода HDL вызовите generatehdl функция с одной из последовательных архитектур. Укажите либо NumMultipliers или FoldingFactor собственность, но не оба. Например, использование NumMultipliers свойство:

generatehdl(lp,'NumMultipliers',2,'InputDataType',nt_input)
### Starting VHDL code generation process for filter: lp
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex90334139/hdlsrc/lp.vhd
### Starting generation of lp VHDL entity
### Starting generation of lp VHDL architecture
### Successful completion of VHDL code generation process for filter: lp
### HDL latency is 2 samples

Либо укажите ту же архитектуру с помощью FoldingFactor собственность.

generatehdl(lp,'FoldingFactor',9,'InputDataType',nt_input)
### Starting VHDL code generation process for filter: lp
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex90334139/hdlsrc/lp.vhd
### Starting generation of lp VHDL entity
### Starting generation of lp VHDL architecture
### Successful completion of VHDL code generation process for filter: lp
### HDL latency is 2 samples

Обе эти команды генерируют фильтр, который использует в общей сложности два умножителя с задержкой в девять тактовых циклов. Эта архитектура использует меньшую площадь, чем параллельная реализация, за счет задержки.

Используйте распределенные арифметические опции для уменьшения числа множителей в реализации фильтра.

Создайте фильтр FIR прямой формы и рассчитайте длину фильтра. FL.

filtdes = fdesign.lowpass('N,Fc,Ap,Ast',30,0.4,0.05,0.03,'linear');
firfilt = design(filtdes,'FilterStructure','dffir','SystemObject',true);
FL = length(find(firfilt.Numerator ~= 0))
FL = 31

Укажите набор разделов таким образом, чтобы размеры разделов добавлялись к длине фильтра. Это только один вариант секционирования, можно указать другие комбинации размеров.

generatehdl(firfilt,'InputDataType',numerictype(1,16,15), ...
    'DALUTPartition',[8 8 8 7])
Warning: Structure fir has symmetric coefficients, consider converting to structure symmetricfir for reduced area.
Warning: Structure fir has symmetric coefficients, consider converting to structure symmetricfir for reduced area.
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex00198568/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Clock rate is 16 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 3 samples

Для сравнения создайте симметричный КИХ-фильтр прямой формы. Длина фильтра в симметричном случае меньше.

filtdes = fdesign.lowpass('N,Fc,Ap,Ast',30,0.4,0.05,0.03,'linear');
firfilt = design(filtdes,'FilterStructure','dfsymfir','SystemObject',true);
FL = ceil(length(find(firfilt.Numerator ~= 0))/2)
FL = 16

Укажите набор разделов таким образом, чтобы размеры разделов добавлялись к длине фильтра. Это только один вариант секционирования, можно указать другие комбинации размеров. Совет: Используйте hdlfilterdainfo функция для отображения эффективной длины фильтра, опций разбиения LUT и возможных DARadix значения для фильтра.

generatehdl(firfilt,'InputDataType',numerictype(1,16,15), ...
    'DALUTPartition',[8 8])
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex00198568/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Clock rate is 17 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 3 samples

Используйте распределенные арифметические опции для уменьшения числа множителей в реализации фильтра.

Создайте многофазный прореживатель FIR прямой формы и рассчитайте длину фильтра.

d = fdesign.decimator(4);
filt = design(d,'SystemObject',true);
FL = size(polyphase(filt),2)
FL = 27

Укажите распределенные арифметические разделы LUT, добавляемые к размеру фильтра. При указании секций в качестве вектора для многофазного фильтра каждый субфильтр использует одни и те же секции.

generatehdl(filt,'InputDataType',numerictype(1,16,15), ...
    'DALUTPartition',[8 8 8 3])
### Starting VHDL code generation process for filter: firdecim
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex51670151/hdlsrc/firdecim.vhd
### Starting generation of firdecim VHDL entity
### Starting generation of firdecim VHDL architecture
### Clock rate is 4 times the input and 16 times the output sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: firdecim
### HDL latency is 16 samples

Можно также указать уникальные секции для каждого вложенного фильтра. Для того же фильтра укажите секционирование субфильтра как матрицу. Длина первого субфильтра равна 1, а другие субфильтры имеют длину 26. Совет: Используйте hdlfilterdainfo функция для отображения эффективной длины фильтра, опций разбиения LUT и возможных DARadix значения для фильтра.

d = fdesign.decimator(4);
filt = design(d,'SystemObject',true);
generatehdl(filt,'InputDataType',numerictype(1,16,15), ...
    'DALUTPartition',[1 0 0 0; 8 8 8 2; 8 8 6 4; 8 8 8 2])
### Starting VHDL code generation process for filter: firdecim
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex51670151/hdlsrc/firdecim.vhd
### Starting generation of firdecim VHDL entity
### Starting generation of firdecim VHDL architecture
### Clock rate is 4 times the input and 16 times the output sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: firdecim
### HDL latency is 16 samples

Используйте распределенные арифметические опции для уменьшения числа множителей в реализации фильтра.

Создать каскадный фильтр

Создайте двухступенчатый каскадный фильтр. Определите различные разделы LUT для каждого этапа и укажите векторы разделов в массиве ячеек.

lp = design(fdesign.lowpass('N,Fc',8,.4),'filterstructure','dfsymfir', ...
    'SystemObject',true);
hp = design(fdesign.highpass('N,Fc',8,.4),'filterstructure','dfsymfir', ...
    'SystemObject',true);
casc = cascade(lp,hp);
nt1 = numerictype(1,12,10);
generatehdl(casc,'InputDataType',nt1,'DALUTPartition',{[3 2],[2 2 1]})
### Starting VHDL code generation process for filter: casfilt
### Cascade stage # 1
### Starting VHDL code generation process for filter: casfilt_stage1
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt_stage1.vhd
### Starting generation of casfilt_stage1 VHDL entity
### Starting generation of casfilt_stage1 VHDL architecture
### Clock rate is 13 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage1
### Cascade stage # 2
### Starting VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt_stage2.vhd
### Starting generation of casfilt_stage2 VHDL entity
### Starting generation of casfilt_stage2 VHDL architecture
### Clock rate is 29 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt.vhd
### Starting generation of casfilt VHDL entity
### Starting generation of casfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt
### HDL latency is 4 samples

Распределенные арифметические параметры

Используйте hdlfilterdainfo функция для отображения эффективной длины фильтра, опций разбиения LUT и возможных DARadix значения для каждой ступени фильтра каскада. Функция возвращает вектор разбиения LUT, соответствующий требуемому количеству адресных битов.

Запрос возможностей разделения LUT для первого этапа.

 hdlfilterdainfo(casc.Stage1,'InputDataType',nt1);
   | Total Coefficients | Zeros | A/Symm | Effective |
   ---------------------------------------------------
   |          9         |   0   |    4   |     5     |

Effective filter length for SerialPartition value is 5.

  Table of 'DARadix' values with corresponding values of 
  folding factor and multiple for LUT sets for the given filter.

   | Folding Factor | LUT-Sets Multiple | DARadix |
   ------------------------------------------------
   |        1       |         12        |   2^12  |
   |        3       |         6         |   2^6   |
   |        4       |         4         |   2^4   |
   |        5       |         3         |   2^3   |
   |        7       |         2         |   2^2   |
   |       13       |         1         |   2^1   |

  Details of LUTs with corresponding 'DALUTPartition' values.

   | Max Address Width | Size(bits) |      LUT Details      | DALUTPartition |
   ---------------------------------------------------------------------------
   |         5         |     416    |1x32x13                |[5]             |
   |         4         |     216    |1x16x12, 1x2x12        |[4 1]           |
   |         3         |     124    |1x4x13, 1x8x9          |[3 2]           |
   |         2         |     104    |1x2x12, 1x4x12, 1x4x8  |[2 2 1]         |

Notes:
1. LUT Details indicates number of LUTs with their sizes. e.g. 1x1024x18
   implies 1 LUT of 1024 18-bit wide locations.

Чтобы запросить возможности секционирования LUT для второго этапа, необходимо сначала определить тип входных данных второго этапа.

y = casc.Stage1(fi(0,nt1));
nt2 = y.numerictype;
hdlfilterdainfo(casc.Stage2,'InputDataType',nt2);
   | Total Coefficients | Zeros | A/Symm | Effective |
   ---------------------------------------------------
   |          9         |   0   |    4   |     5     |

Effective filter length for SerialPartition value is 5.

  Table of 'DARadix' values with corresponding values of 
  folding factor and multiple for LUT sets for the given filter.

   | Folding Factor | LUT-Sets Multiple | DARadix |
   ------------------------------------------------
   |        1       |         28        |   2^28  |
   |        3       |         14        |   2^14  |
   |        5       |         7         |   2^7   |
   |        8       |         4         |   2^4   |
   |       15       |         2         |   2^2   |
   |       29       |         1         |   2^1   |

  Details of LUTs with corresponding 'DALUTPartition' values.

   | Max Address Width | Size(bits) |       LUT Details      | DALUTPartition |
   ----------------------------------------------------------------------------
   |         5         |     896    |1x32x28                 |[5]             |
   |         4         |     488    |1x16x27, 1x2x28         |[4 1]           |
   |         3         |     304    |1x4x28, 1x8x24          |[3 2]           |
   |         2         |     256    |1x2x28, 1x4x23, 1x4x27  |[2 2 1]         |

Notes:
1. LUT Details indicates number of LUTs with their sizes. e.g. 1x1024x18
   implies 1 LUT of 1024 18-bit wide locations.

Различные разделы LUT для каждой ступени

Выберите ширину адреса и коэффициенты складывания, чтобы получить раздел LUT для каждого этапа. На первом этапе используются LUT с максимальным размером адреса, равным пяти битам. На втором этапе используются LUT с максимальным размером адреса, равным трем битам. Они работают с одинаковой тактовой частотой и имеют различные разделы LUT.

dp1 = hdlfilterdainfo(casc.Stage1,'InputDataType',nt1, ...
    'LUTInputs',5,'FoldingFactor',3);
dp2 = hdlfilterdainfo(casc.Stage2,'InputDataType',nt1, ...
    'LUTInputs',3,'FoldingFactor',5);
generatehdl(casc,'InputDataType',nt1,'DALUTPartition',{dp1,dp2});
### Starting VHDL code generation process for filter: casfilt
### Cascade stage # 1
### Starting VHDL code generation process for filter: casfilt_stage1
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt_stage1.vhd
### Starting generation of casfilt_stage1 VHDL entity
### Starting generation of casfilt_stage1 VHDL architecture
### Clock rate is 13 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage1
### Cascade stage # 2
### Starting VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt_stage2.vhd
### Starting generation of casfilt_stage2 VHDL entity
### Starting generation of casfilt_stage2 VHDL architecture
### Clock rate is 29 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt.vhd
### Starting generation of casfilt VHDL entity
### Starting generation of casfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt
### HDL latency is 4 samples

Отличающийся DARadix Значения для каждого этапа

Можно также указать различные DARadix значения для каждого фильтра в каскаде. В командной строке можно указать только различные каскадные разделы. При указании разделов в диалоговом окне «Создание HDL» все каскадные этапы используют одни и те же разделы. Проверка результатов hdlfilterdainfo установить DARadix значения для каждого этапа.

generatehdl(casc,'InputDataType',nt1, ...
'DALUTPartition',{[3 2],[2 2 1]},'DARadix',{2^3,2^7})
### Starting VHDL code generation process for filter: casfilt
### Cascade stage # 1
### Starting VHDL code generation process for filter: casfilt_stage1
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt_stage1.vhd
### Starting generation of casfilt_stage1 VHDL entity
### Starting generation of casfilt_stage1 VHDL architecture
### Clock rate is 5 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage1
### Cascade stage # 2
### Starting VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt_stage2.vhd
### Starting generation of casfilt_stage2 VHDL entity
### Starting generation of casfilt_stage2 VHDL architecture
### Clock rate is 5 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex17169310/hdlsrc/casfilt.vhd
### Starting generation of casfilt VHDL entity
### Starting generation of casfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt
### HDL latency is 4 samples

Укажите различные архитектуры фильтров для различных стадий каскадного фильтра. Можно указать сочетание последовательной, распределенной арифметической (DA) и параллельной архитектур в зависимости от аппаратных ограничений.

Создать каскадный фильтр

Создайте трехступенчатый фильтр. Каждый этап имеет свой тип.

h1 = dsp.FIRFilter('Numerator',[0.05 -.25 .88 0.9 .88 -.25 0.05]);
h2 = dsp.FIRFilter('Numerator',[-0.008 0.06 -0.44 0.44 -0.06 0.008], ...
    'Structure','Direct form antisymmetric');
h3 = dsp.FIRFilter('Numerator',[-0.008 0.06 0.44 0.44 0.06 -0.008], ...
    'Structure','Direct form symmetric');
casc = cascade(h1,h2,h3);

Укажите архитектуру для каждого этапа

Укажите архитектуру DA для первой ступени, последовательную архитектуру для второй ступени и полностью параллельную (по умолчанию) архитектуру для третьей ступени.

Получить DARadix значения для первой архитектуры, использование hdlfilterdainfo, затем выберите значение из dr.

nt = numerictype(1,12,10);
[dp,dr,lutsize,ff] = hdlfilterdainfo(casc.Stage1, ...
    'InputDataType',numerictype(1,12,10));
dr
dr = 6x1 cell
    {'2^12'}
    {'2^6' }
    {'2^4' }
    {'2^3' }
    {'2^2' }
    {'2^1' }

Задайте значения свойств в виде массивов ячеек, где каждая ячейка применяется к рабочей области. Чтобы отключить свойство для определенной стадии, используйте значения по умолчанию (-1 для секций и 2 для DARadix).

generatehdl(casc,'InputDataType',nt, ...
    'SerialPartition',{-1,3,-1}, ...
    'DALUTPartition',{[4 3],-1,-1}, ...
    'DARadix',{2^6,2,2});
Warning: Structure fir has symmetric coefficients, consider converting to structure symmetricfir for reduced area.
Warning: Structure fir has symmetric coefficients, consider converting to structure symmetricfir for reduced area.
Warning: Structure fir has symmetric coefficients, consider converting to structure symmetricfir for reduced area.
### Starting VHDL code generation process for filter: casfilt
### Cascade stage # 1
### Starting VHDL code generation process for filter: casfilt_stage1
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex13094988/hdlsrc/casfilt_stage1.vhd
### Starting generation of casfilt_stage1 VHDL entity
### Starting generation of casfilt_stage1 VHDL architecture
### Clock rate is 2 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage1
### Cascade stage # 2
### Starting VHDL code generation process for filter: casfilt_stage2
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex13094988/hdlsrc/casfilt_stage2.vhd
### Starting generation of casfilt_stage2 VHDL entity
### Starting generation of casfilt_stage2 VHDL architecture
### Clock rate is 3 times the input sample rate for this architecture.
### Successful completion of VHDL code generation process for filter: casfilt_stage2
### Cascade stage # 3
### Starting VHDL code generation process for filter: casfilt_stage3
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex13094988/hdlsrc/casfilt_stage3.vhd
### Starting generation of casfilt_stage3 VHDL entity
### Starting generation of casfilt_stage3 VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt_stage3
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex13094988/hdlsrc/casfilt.vhd
### Starting generation of casfilt VHDL entity
### Starting generation of casfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: casfilt
### HDL latency is 3 samples

Можно задать входные коэффициенты для тестирования фильтра с программируемыми коэффициентами.

Создайте симметричный фильтр FIR прямой формы с полностью параллельной архитектурой (по умолчанию). Определение коэффициентов для объекта фильтра в векторе b. Кодер генерирует код тестового стенда для тестирования интерфейса коэффициентов с использованием второго набора коэффициентов. c. Обрезка кодера c к эффективной длине фильтра.

b = [-0.01 0.1 0.8 0.1 -0.01];
c = [-0.03 0.5 0.7 0.5 -0.03];
c = c(1:ceil(length(c)/2));
filt = dsp.FIRFilter('Numerator',b,'Structure','Direct form symmetric');
generatehdl(filt,'InputDataType',numerictype(1,16,15), ...
    'GenerateHDLTestbench','on', ...
    'CoefficientSource','ProcessorInterface','TestbenchCoeffStimulus',c)
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex66247050/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 2 samples
### Starting generation of VHDL Test Bench.
### Generating input stimulus
### Done generating input stimulus; length 3107 samples.
### Generating Test bench: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex66247050/hdlsrc/firfilt_tb.vhd
### Creating stimulus vectors ...
### Done generating VHDL Test Bench.

Создайте спецификацию фильтра. При создании кода HDL укажите программируемый интерфейс для коэффициентов.

Fs = 48e3;  
Fc = 10.8e3;
N = 5;
f_lp = fdesign.lowpass('n,f3db',N,Fc,Fs);
filtiir = design(f_lp,'butter','FilterStructure','df2sos','SystemObject',true);
filtiir.OptimizeUnityScaleValues = 0;
generatehdl(filtiir,'InputDataType',numerictype(1,16,15), ...
    'CoefficientSource','ProcessorInterface')
### Starting VHDL code generation process for filter: filtiir
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex92389569/hdlsrc/filtiir.vhd
### Starting generation of filtiir VHDL entity
### Starting generation of filtiir VHDL architecture
### Second-order section, # 1
### Second-order section, # 2
### First-order section, # 3
### Successful completion of VHDL code generation process for filter: filtiir
### HDL latency is 2 samples

Кодер генерирует этот объект VHDL для объекта фильтра.

Изучите различные способы определения тактовых портов для многоскоростных фильтров.

Настройка по умолчанию

Создайте многофазный преобразователь частоты дискретизации. По умолчанию кодер генерирует один входной синхросигнал (clk), включение входного синхросигнала (clk_enable) и выходной сигнал разрешения синхронизации с именем ce_out. ce_out сигнал указывает, когда выходной образец готов. ce_in выходной сигнал указывает, когда была принята входная выборка. Этот сигнал можно использовать для управления восходящим потоком данных.

firrc = dsp.FIRRateConverter('InterpolationFactor',5,'DecimationFactor',3);
generatehdl(firrc,'InputDataType',numerictype(1,16,15))
### Starting VHDL code generation process for filter: firrc
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex09049114/hdlsrc/firrc.vhd
### Starting generation of firrc VHDL entity
### Starting generation of firrc VHDL architecture
### Successful completion of VHDL code generation process for filter: firrc
### HDL latency is 2 samples

Сформированный объект имеет следующие сигналы:

Имена пользовательских часов

Можно указать пользовательские имена для входных сигналов включения синхронизации и выходных сигналов включения синхронизации. Вы не можете переименовать ce_in сигнал.

firrc = dsp.FIRRateConverter('InterpolationFactor',5,'DecimationFactor',3)
firrc = 
  dsp.FIRRateConverter with properties:

    InterpolationFactor: 5
       DecimationFactor: 3
              Numerator: [1x71 double]

  Show all properties

generatehdl(firrc,'InputDataType',numerictype(1,16,15),...
            'ClockEnableInputPort','clk_en1', ...
            'ClockEnableOutputPort','clk_en2')
### Starting VHDL code generation process for filter: firrc
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex09049114/hdlsrc/firrc.vhd
### Starting generation of firrc VHDL entity
### Starting generation of firrc VHDL architecture
### Successful completion of VHDL code generation process for filter: firrc
### HDL latency is 2 samples

Сформированный объект имеет следующие сигналы:

Несколько тактовых входов

Для генерации нескольких входных синхросигналов для поддерживаемого многоскоростного фильтра установите ClockInputs свойство для 'Multiple'. В этом случае кодер не генерирует порты включения выходного синхросигнала.

decim = dsp.CICDecimator(7,1,4);
generatehdl(decim,'InputDataType',numerictype(1,16,15), ...
    'ClockInputs','Multiple')
### Starting VHDL code generation process for filter: cicDecOrIntFilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex09049114/hdlsrc/cicDecOrIntFilt.vhd
### Starting generation of cicDecOrIntFilt VHDL entity
### Starting generation of cicDecOrIntFilt VHDL architecture
### Section # 1 : Integrator
### Section # 2 : Integrator
### Section # 3 : Integrator
### Section # 4 : Integrator
### Section # 5 : Comb
### Section # 6 : Comb
### Section # 7 : Comb
### Section # 8 : Comb
### Successful completion of VHDL code generation process for filter: cicDecOrIntFilt
### HDL latency is 7 samples

Сформированный объект имеет следующие сигналы:

Создание объекта фильтра. Затем позвоните generatehdl и укажите инструмент синтеза.

lpf = fdesign.lowpass('fp,fst,ap,ast',0.45,0.55,1,60);
firfilt = design(lpf,'equiripple','FilterStructure','dfsymfir', ...
    'SystemObject',true);
generatehdl(firfilt,'InputDataType',numerictype(1,14,13), ...
    'HDLSynthTool','Quartus');
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex92219095/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 2 samples

Кодер создает файл сценария с именем firfilt_quartus.tcl, используя свойства сценария по умолчанию для инструмента синтеза Altera ® Quartus II.

type hdlsrc/firfilt_quartus.tcl
load_package flow
set top_level firfilt
set src_dir "./hdlsrc"
set prj_dir "q2dir"
file mkdir ../$prj_dir
cd ../$prj_dir
project_new $top_level -revision $top_level -overwrite
set_global_assignment -name FAMILY "Stratix II"
set_global_assignment -name DEVICE EP2S60F484C3
set_global_assignment -name TOP_LEVEL_ENTITY $top_level
set_global_assignment -name vhdl_FILE "../$src_dir/firfilt.vhd"
execute_flow -compile
project_close

Можно задать для свойств автоматизации сценария фиктивные значения, чтобы проиллюстрировать, как кодер создает сценарий синтеза из свойств.

Спроектируйте фильтр и создайте ЛПВП. Укажите инструмент синтеза и пользовательский текст для включения в сценарий синтеза.

lpf = fdesign.lowpass('fp,fst,ap,ast',0.45,0.55,1,60);
firfilt = design(lpf,'equiripple','FilterStructure','dfsymfir', ...
    'Systemobject',true);
generatehdl(firfilt,'InputDataType',numerictype(1,14,13), ...
    'HDLSynthTool','ISE', ...
    'HDLSynthInit','init line 1 : module name is %s\ninit line 2\n', ...
    'HDLSynthCmd','command : HDL filename is %s\n', ...
    'HDLSynthTerm','term line 1\nterm line 2\n');
### Starting VHDL code generation process for filter: firfilt
### Generating: /tmp/BR2021ad_1655202_180016/mlx_to_docbook1/tp7b274b1c/hdlfilter-ex64737676/hdlsrc/firfilt.vhd
### Starting generation of firfilt VHDL entity
### Starting generation of firfilt VHDL architecture
### Successful completion of VHDL code generation process for filter: firfilt
### HDL latency is 2 samples

Кодер создает файл сценария с именем firfilt_ise.tcl. Обратите внимание на расположение указанного пользовательского текста. Эту функцию можно использовать для добавления инструкций по синтезу к созданному сценарию.

type hdlsrc/firfilt_ise.tcl
init line 1 : module name is firfilt
init line 2
command : HDL filename is firfilt.vhd
term line 1
term line 2

Входные аргументы

свернуть все

Фильтр, из которого создается код HDL, указанный как объект System фильтра. Чтобы создать объект System фильтра, используйте design или см. справочную страницу объекта. Из Toolbox™ системы DSP можно использовать следующие системные объекты:

Тип входных данных, указанный как numerictype объект. Этот аргумент применяется только в том случае, если входной фильтр является объектом System. Звонить numerictype(s,w,f), где s равно 1 для подписанных и 0 для неподписанных, w - длина слова в битах, и f - количество дробных битов.

Тип данных дробной задержки, указанный как numerictype объект. Этот аргумент применяется только в том случае, если входной фильтр является dsp.VariableFractionalDelay Системный объект. Звонить numerictype(s,w,f), где s равно 1 для подписанных и 0 для неподписанных, w - длина слова в битах, и f - количество дробных битов.

Фильтр, из которого генерируется код HDL, указанный как dfilt объект. Этот объект можно создать с помощью design функция. Обзор поддерживаемых функций фильтра см. в разделе Параметры конфигурации фильтра.

Альтернативы

Вы можете использовать fdhdltool вместо этого создается код HDL (требуется Coder™ HDL конструкции фильтра). Укажите типы данных входной и дробной задержки в качестве аргументов, а затем задайте дополнительные свойства в диалоговом окне Создать HDL (Generate HDL).

См. также

|

Представлен до R2006a