Altera_Forum
Honored Contributor
12 years agoA FIR FILTER , I cant understand
hi everyone:
I just read a part of vhdl code . The code is used to do filtering. The data avSigCreg(9) which is summed will be taken into a digital filter. The code is shown below: ------------------- FIR FILTER ------------------ process(CLK80) begin if (CLK80'event and CLK80='1') then if (DFTrigCReg='1') then-- the avSigCreg(9) which is a sum of 10 datas will change now. for I in 0 to firLength-1 loop CQRealReg(I) <= avSigCReg(9)(17 downto 4) * DFcoeff(I);-- this looks like (avSigCreg/16)* DFcoeff end loop; CSRealReg(0) <= CQRealReg(0)(23) & CQRealReg(0)(21 downto 0); for I in 1 to firLength-1 loop CSRealReg(I) <= CSRealReg(I-1) + (CQRealReg(I)(23) & CQRealReg(I)(21 downto 0)); end loop; end if; -- end if; -- CLK end process; I think the DFcoeff is filter coefficient. But why the designer do the process like this" CSRealReg(0) <= CQRealReg(0)(23) & CQRealReg(0)(21 downto 0);" Thanks for your reading