How to set input and output data types separately for a filter when using generatehdl()?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to do PDM to PCM conversion on the FPGA and found a couple of nice examples how to generate a CIC+fir-filter with MATLAB. My problem is that an input signal is 1 bit wide but output should be 24 bits (or 16). Generatehdl() function only has an argument for input data type. Is there a way to generate a filter in VHDL with different in and out data types?
0 comentarios
Respuestas (2)
Julia Antoniou
el 27 de Oct. de 2017
Hi Johannes,
On the "generatehdl" documentation page, there is a long list of Name-Value pair arguments under the Input Arguments section. One of these Name-Value pairs is 'OutputType'. For VHDL, you can choose to set the OutputType to 'Same as input data type', 'std_logic_vector', and 'signed/unsigned'. See the documentation page linked below:
https://www.mathworks.com/help/hdlfilter/generatehdl.html#input_argument_namevalue_d119e19688
If this property is not quite what you are looking for, the link below has a list of all the properties that can be changed when using the Filter Design HDL Coder.
https://www.mathworks.com/help/hdlfilter/propertylist.html
1 comentario
Johannes Oksanen
el 31 de Oct. de 2017
Editada: Walter Roberson
el 2 de Nov. de 2017
Bharath Venkataraman
el 2 de Nov. de 2017
The output of cicCompCascade is the output of the filter, and this is what Filter Design HDL Coder uses as the output type. Please make sure that the output of cicCompCascade is 16 or 24 bits and Filter Design HDL Coder will generate the HDL code output type appropriately.
0 comentarios
Ver también
Categorías
Más información sobre PCM en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!