FIR設计报告.docVIP

  • 5
  • 0
  • 约1.03万字
  • 约 13页
  • 2016-11-30 发布于重庆
  • 举报
FIR設计报告

FIR滤波器设计报告 摘要:本设计运用模块化思想简化原理图,得到简单易实现的数字电路模块单元,再由模块级联可完成该设计.本设计由基本实体4位先行进位加法器,位移器,D寄存器组成. 关键字: 进位加法器 位移器 D寄存器 FIR 实验目的 掌握先行进位加法器的原理 掌握移位器移位规则使用 模块化设计思想 FIR滤波器原理 实验要求及步骤 设计4位加法器:用超前进位加法器; 2、使用4位加法器为模块设计16位加法器; 3、设计module实现一次乘和两次加以及延时操作; 4、将设计好的module0、module1、module2、module3级联起来; 5、测试设计的正确性,添加信号源:添加DDS(Direct Digital Synthesis) 6、仿真 三、 实验方案 1、结构设计 滤波器原理图如下: . 从图上可以看出,这个结构是个循环结构,可以分为若干段,每一段有重复结构. 将上面原理图改下如下: 该结构不仅减少了一半的乘法器,还把滤波器结构进行了简化. 基于模块化思想,本设计总过程为以下结构. 1、4位先行进位加法器 考虑到级联的加法器,在时间在消耗较大,故采用先行进位加法器. 其BOOL逻辑表达式如下: 电路原理图如下: 代码如下: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity frontplus4 is Port ( num1 : in STD_LOGIC_VECTOR (3 downto 0); num2 : in STD_LOGIC_VECTOR (3 downto 0); cin : in STD_LOGIC; cout : out STD_LOGIC; sum : out STD_LOGIC_VECTOR (3 downto 0)); end frontplus4; architecture Behavioral of frontplus4 is signal andexp: std_logic_vector (3 downto 0); signal norexp: std_logic_vector (3 downto 0); signal carry: std_logic_vector (3 downto 1); begin andexp=num1 AND num2; norexp=num1 XOR num2; sum(0)=norexp(0) XOR cin; carry(1)=(norexp(0) AND cin) OR andexp(0); sum(1)=norexp(1) XOR carry(1); carry(2)=andexp(1) OR (norexp(1) AND andexp(0)) OR (norexp(0) AND norexp(1) AND cin); sum(2)=norexp(2) XOR carry(2); carry(3)=andexp(2) OR (norexp(2) AND andexp(1)) OR (norexp(2) AND norexp(1) AND andexp(0)) OR (norexp(0) AND norexp(1) AND norexp (2) AND cin); sum(3)=norexp(3) XOR carry(3); cout=andexp(3) OR (norexp(3) AND andexp(2)) OR (norexp(3) AND norexp(2) AND andexp(1)) OR (norexp(3) AND norexp(2) AND norexp(1) AND andexp(0)) OR (norexp(3) AND norexp(2) AND norexp(1) AND norexp(0) AND cin); end Behavioral; 2、16加法器 将4个4位先行进位加法器进行级联,则可得到. 代码如下: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity pluser16bits is

文档评论(0)

1亿VIP精品文档

相关文档