加法器电路的设计_第1页
加法器电路的设计_第2页
加法器电路的设计_第3页
加法器电路的设计_第4页
加法器电路的设计_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、n 应用 数字信号处理和数字通信 n 地位 影响系统的运行速度 n 实现 l 级联加法器 l 并行加法器 l 超前进位加法器 l 流水线加法器 9.1.1 级连加法器 l 结构 由1位全加器级连 l 优点 结构简单 l 缺点 延时太长 1位 全加器 a0 b0 sum0 cin 1位 全加器 a1 b1 sum1 cin1 1位 全加器 a7 b7 sum7 cin7cout 【例9.1】8位级联加法器 module add_jl( sum, cout, a, b, cin ); output7:0 sum; output cout; input7:0 a, b; input cin; ful

2、l_add1 f0( a0, b0, cin, sum0, cin1 ); full_add1 f1( a1, b1, cin1, sum1, cin2 ); full_add1 f2( a2, b2, cin2, sum2, cin3 ); full_add1 f3( a3, b3, cin3, sum3, cin4 ); full_add1 f4( a4, b4, cin4, sum4, cin5 ); full_add1 f5( a5, b5, cin5, sum5, cin6 ); full_add1 f6( a6, b6, cin6, sum6, cin7 ); full_add1

3、f7( a7, b7, cin7, sum7, cout ); endmodule 1位全加器门级结构原理图 a b sum cout c s1 m1 m2 m3 module full_add1( a, b, cin, sum, cout ); input a, b, cin; output sum, cout; wire s1, m1, m2, m3; and ( m1, a, b ), ( m2, b, cin ), ( m3, a, cin); xor ( s1, a, b ), ( sum, s1, cin ); or ( cout, m1, m2, m3 ); endmodule

4、8位级联加法器rtl图 9.1.2 并行加法器 l 结构 用加法运算符描述 由eda软件综合 l 优点 运算速度快 【例9.2】8位并行加法器 module add_bx( cout, sum, a, b, cin ); output7:0 sum; output cout; input7:0 a, b; input cin; assign cout, sum = a + b + cin; endmodule 8位并行加法器rtl图 9.1.3 超前进位加法器 l 结构 引入超前进位链 l 优点 运算速度快 l 设计思路 n 1位全加器 sum = a b cin = ab (a b ) ci

5、n cout = ab+(a+b) cin 令 g = ab 进位产生 p = a+b 进位传输 则 sum = g p cin, cout = g+pcin n 4位全加器 c0 = cin c1 = g0+p0c0 = g0+p0cin c2 = g1+p1c1 = g1+p1g0+p1p0cin c3 = g2+p2c2 = g2+p2g1+p2p1g0+p2p1p0cin c4 = g3+p3c3 = g3+p3g2+ p3p2g1+p3p2p1g0+p3p2p1p0cin cout = c4 【例9.3】8位超前进位加法器 module add_ahead( sum, cout, a

6、, b, cin); output7:0 sum; / 和 output cout; input7:0 a, b; input cin; wire7:0 g, p; / 进位产生,进位传输 wire7:0 c; / 进位 assign g0 = a0 assign p0 = a0 | b0; assign c0 = cin; assign sum0 = g0 p0 c0; assign g1 = a1 assign p1 = a1 | b1; assign c1 = g0 | ( p0 assign sum1 = g1 p1 c1; assign g2 = a2 assign p2 = a2

7、| b2; assign c2 = g1 | ( p1 assign sum2 = g2 p2 c2; assign g3 = a3 assign p3 = a3 | b3; assign c3 = g2 | ( p2 assign sum3 = g3 p3 c3; assign g4 = a4 assign p4 = a4 | b4; assign c4 = g3 | ( p3 assign sum4 = g4 p4 c4; assign g5 = a5 assign p5 = a5 | b5; assign c5 = g4 | ( p4 assign sum5 = g5 p5 c5; assign g6 = a6 assign p6 = a6 | b6; assign c6 = g5 | ( p5 assign sum6 = g6 p6 c6; assign g7 = a7 assign p7 = a7 | b7; assign c7 = g6 | ( p6 assign sum7 = g7 p7 c7; assign cout = g7 | ( p7 endmodule 8位超前进位加法器rtl图 9.1.4 流

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论