gcj
Newbie level 1
matlab decimation filter
Hi,
I am designing a decimation filter for sigma delta ADC.
I have read some materials, and my design consists of 3-stages.
1 CIC filter, 1 CIC compensator and 1 halfband filter, with
oversampling rate 128, input bitstream (1 bit). The output will be 16bit.
I designed the filter in MATLAB, and with floating point precision,
everything works fine -- the output FFT plot and SNR is desired.
But I am confused when I use fixed-point precisions.
1. When cascading the filters, what should the wordlength, and
fraclength be in between? I guess since I use 16-bit output, I might
need more bits in between? But what's the number?
2. Is that true that in MATLAB, for each filter, I need to set
"FilterInternals" to be 'SpecifyPrecision' for each filter? If so,
what should the number of ProductWordLength, ProductFracLength,
AccumWordLength, AccumFracLength be? I think that will affect the
accuracy, as well as the number of cells used in the hardware, also
area.
3. Is my flow of design correct?
(1) MATLAB (filter toolbox) simulink simulation
(2) Quantization of the filter (fixed-point toolbox) and simulation
(3) generate HDL code (HDL coder in MATLAB)
(4) use RC to synthesize the circuit (gate level)
(5) verilog simulation (ncsim, probably?)
(6) transistor level simulation in spectre/ultrasim
I am not sure whether this flow is correct. What do you do?
Has anyone simulated the whole design in Spectre?
4. Also, what should be taken care of when generating HDL code in MATLAB? I generated a design with 7000 1-bit-full-adders, 3000 DFF's, so approximately 300,000 transistors. It seems that it is really really slow to simulate such a circuit in Spectre. Has anyone done this before? And are those numbers reasonable?
Thanks in advance.
Hi,
I am designing a decimation filter for sigma delta ADC.
I have read some materials, and my design consists of 3-stages.
1 CIC filter, 1 CIC compensator and 1 halfband filter, with
oversampling rate 128, input bitstream (1 bit). The output will be 16bit.
I designed the filter in MATLAB, and with floating point precision,
everything works fine -- the output FFT plot and SNR is desired.
But I am confused when I use fixed-point precisions.
1. When cascading the filters, what should the wordlength, and
fraclength be in between? I guess since I use 16-bit output, I might
need more bits in between? But what's the number?
2. Is that true that in MATLAB, for each filter, I need to set
"FilterInternals" to be 'SpecifyPrecision' for each filter? If so,
what should the number of ProductWordLength, ProductFracLength,
AccumWordLength, AccumFracLength be? I think that will affect the
accuracy, as well as the number of cells used in the hardware, also
area.
3. Is my flow of design correct?
(1) MATLAB (filter toolbox) simulink simulation
(2) Quantization of the filter (fixed-point toolbox) and simulation
(3) generate HDL code (HDL coder in MATLAB)
(4) use RC to synthesize the circuit (gate level)
(5) verilog simulation (ncsim, probably?)
(6) transistor level simulation in spectre/ultrasim
I am not sure whether this flow is correct. What do you do?
Has anyone simulated the whole design in Spectre?
4. Also, what should be taken care of when generating HDL code in MATLAB? I generated a design with 7000 1-bit-full-adders, 3000 DFF's, so approximately 300,000 transistors. It seems that it is really really slow to simulate such a circuit in Spectre. Has anyone done this before? And are those numbers reasonable?
Thanks in advance.