在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3129|回复: 10

基于FPGA的四阶IIR数字滤波器

[复制链接]
发表于 2006-11-8 14:32:15 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
entity smultadd1 is

port (clk_regbt,clk_reg: in std_logic:

x0,x1,x2,y0,y1:in std_logic_vector(9 downto 0);

yout: out std_logic_vector(9 downto 0));

end smultadd1;

architecture behav of smultadd1 is

signal tan,tbn,tp2n:std_logic;

signal cnt: std_logic_vector(2 downto 0);

signal ta,tb,taa,tbb:std_logic_vector(8 downto 0);

signal tmpa,tmpb:std_logic_vector(9 downto 0);

signal tp:std_logic_vector(18 downto 0);

signal tpp:std_logic_vector,22 downto 0);

signal ytmp,p:std_logic_vector(23 downto 0);

constant a0:std_logic_vector(9 downto 0:=“0000011100”

(其余常数说明略)

begin

tp2n<=tan xor tbn;--求补后送阵列乘法器

taa<=not ta +‘1’ when (tan=‘1’) else ta;

tbb<=not tb +‘1’ when (tbn=‘1’) else tb;

tpp<=‘1’&‘1’&‘1’&‘1’& not tp +‘1’ when(tp2n=‘1’) else tp;

tmpa<=a0 when cnt=0 else

a1 when cnt=1 else

a2 when cnt=2 else

b0 when cnt=3 else

b1 when cnt=4 else (others=>‘0’);

tmpb<=x0 when cnt=0 else

x1 when cnt=1 else

x2 when cnt=2 else

y0 when cnt=3 else

y1 when cnt=4 else (others=>‘0’);

ta<=tmpa(8 downto 0);tb<=tmpb(8 downto 0);

tan<=tmpa(9);tbn<=tmpb(9);

tp<=taa*tbb;

p<=(others=>‘0’) when (tmpb=“0000000000”) else

tp2n & tpp;

process (clk_reg,clk_regbt)

begin

if clk_reg=‘1’ then cnt<=“000”;ytmp<=(others=>‘0’);

elsif (clk_regbt’event and clk_regbt=‘1’) then

if cnt<5 then cnt<=cnt+1;ytmp<=ytmp+p;

elsif (cnt=5) then

if ytmp(7)=‘1’ then

yout(8 downto 0)<=ytmp(16 downto 8)+1;

yout(9)<=ytmp(23);

else yout(8 downto 0)<=ytmp(16 downto 8);

yout(9)<=ytmp(23); end if;

end if;

end if;

end process;

end behav;
头像被屏蔽
发表于 2006-11-16 17:40:02 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2007-11-3 14:43:39 | 显示全部楼层
解析一下就好了
发表于 2007-11-20 13:50:11 | 显示全部楼层
bu cuo ~~~~
发表于 2009-3-24 11:38:50 | 显示全部楼层
发表于 2009-3-27 21:48:50 | 显示全部楼层
谢谢,虽然看不懂,还是对你表示感谢
发表于 2009-3-28 12:05:04 | 显示全部楼层
大哥你写的是什么啊
发表于 2010-7-7 22:25:51 | 显示全部楼层
ddddddddddd
发表于 2014-9-24 10:11:42 | 显示全部楼层
不懂的只能慢慢飘过,顶一个。
发表于 2014-9-24 22:35:13 | 显示全部楼层
看着看着 发现不知道自己是谁了.......................................
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-6 20:41 , Processed in 0.036530 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表