Phase 3
Phase 3
Introduction
The specifications for this phase include the use of paramatizable d-flip flops which have an asynchronous clear and paramatizable ripple carry
adders in conjunction with multipliers to construct the overall structure of the fir filter. The block diagram of the filter was assembled by using the
above components and a list of coefficients were extracted to be used with the filter from a filter code provided in the matlab format.
What is expected?
To explain what an fir filter does; it can be simply be put as that a finite impulse response filter is a type of a signal processing filter whose
impulse response (or response to any finite length input) is of finite duration, and therefore it is expected that in a finite time the impulse response
should die to zero.
Ripple Adder
Ripple Adder Code
Figure7: Model simulation for the ripple carry adder in binary and decimal.
Phase3
The figures below show the zoomed in/out versions of the fir filter block diagram on graphical view in VHDL. It consists of 30 d-fliop flops
cascaded In parallel with branches connectiong to the multipliers which have furthur branches connecting to the adders.
Figure 9: Block diagram of the filter output and modelsimulation showing the output signal getting truncated.
Coefficient bank
A coefficient bank was constructed to store the 31 coefficient values that were obtained from matlab. Figure 10 shows the coefficient bank and the values each coefficient
holds in binary and decimal respectively.
Test bench
An extra output port from the sumout21 was made in the fir filter so that it enabled the user to see what they get before the signal gets truncated when using the test
bench.
Tester Code (impulse response)
Model Sim(Impulse Response)
Radix fixpoint was set to 9 to see the actual coefficients at the sumout21. This was done to change the binray point representation of the coefficients to include the floating
point numbers.
Simulations showing the truncated coefficients and actual coefficients coming out of the filter, and shows tat the input ultimately dies to zero after a finite number of
clocks.
As you can see in the figures above the sumout21 shows the actual coefficients coming out of the filter which then get truncated by 5 bits from the LSB therefore the
output at the filter_output shows a binary value of 19 bits.
Heres a comparision between the expected coefficients that were extracted from matlab, and the actual coefficients values achieved from vhdl simulations. Its evident that
the two values are very close to each other .