高手请留步 HDL设计毕业论文

[复制链接]
 楼主| 龙颜必怒 发表于 2010-1-18 14:18 | 显示全部楼层 |阅读模式
多级抽取CIC滤波器的Verilog HDL设计

单级的主程序    求测试程序   
module cic_dec_2_single(clk,clk1,reset,x_in,y_out)
input clk,clk1,reset;
input [7:0] x_in;
out [7:0] y_out;
reg[15:0] x_t,y_t;
reg[7:0] int_out;
always @(posedge clk)begin
if(!reset)begin
x_t<=0
int_out<=o
end
else begin
x_t<={x_t[7:0],x_in[7:0]}   合并变成14位信号
end
int_out<=x_t[7:0]+x_t[15:8]    完成单级积分滤波
end   
always @(posedge clk1)begin    完成抽取, 因为clk1是clk的一半
if(!reset)begin
y_t<=0
end
else begin
y_t<={y_t[7:0],int_out[7:0]}
end
end    完成单级梳状滤波
assign y_out=y_t[7:0]-y_t[15:8]
endmodule
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

1

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部