东北大学EDA数字系统设计第三章改.ppt

  1. 1、本文档共102页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
东北大学EDA数字系统设计第三章改

第3章 典型Verilog HDL设计实例;3.1 组合逻辑电路设计;;3.1.1逻辑门电路设计;例3-1用Verilog HDL设计实现如下逻辑表达式所对应的基本逻辑门电路 ;module example3_1 (a,b,c,d,e,f,g, f1,f2,f3,f4,f5,f6,f7); input a,b,c,d,e,f,g; output f1,f2,f3,f4,f5,f6,f7; assign f1 = ~ a; assign f2 = b c; assign f3 = ~(b c); assign f4 = d | e; assign f5 = ~(d | e); assign f6 = f ^ g; assign f7 = f ~^ g; endmodule ;module example3_1 (a,b,c,d,e,f,g, f1,f2,f3,f4,f5,f6,f7); input a,b,c,d,e,f,g; output f1,f2,f3,f4,f5,f6,f7; assign f1 = ~ a; assign f2 = b c; assign f3 = ~(b c); assign f4 = d | e; assign f5 = ~(d | e); assign f6 = f ^ g; assign f7 = f ~^ g; endmodule;例3-2 用Verilog HDL设计实现如下逻辑表达式所对应的逻辑门电路 ;module example3_2 (a,b,c,d,f); input a,b,c,d; output [3:0] f;? assign f[0] = (a b) | (b c) | (~ b ~ c); assign f[1] = (a b c) | ~(~ a | ~ b | c); assign f[2] = (a ^ b ^ c) | (~(d) (a | c)); assign f[3] = ~((a b) ^ (c d)) | ((a b d) ^ (b c d)); endmodule;module example3_2 (a,b,c,d,f); input a,b,c,d; output[3:0] f;? assign f[0] = (a b) | (b c) | (~ b ~ c); assign f[1] = (a b c) | ~(~ a | ~ b | c); assign f[2] = (a ^ b ^ c) | (~(d) (a | c)); assign f[3] = ~((a b) ^ (c d)) | ((a b d) ^ (b c d)); endmodule;module example3_2n1 (a,b,c,d,f); input a,b,c,d; output f; reg[3:0] f; always@(a or b or c or d ) begin if(a==1 b==1) f[0]=1; else if (b==1 c==1) f[0]=1; else if(b==0 c==0) f[0]=1; else f[0]=0; end endmodule ;溜延伐娠恳兹磊且羡伯养样擦萎东势蚌寸苹帚义荐板两白烛境残磅嘛晃嘶东北大学EDA数字系统设计第三章改东北大学EDA数字系统设计第三章改;3.1.2 常用编码器设计; I0` I1` I2` I3` I4` I5` I6` I7`;输出函数;module example3_31 (i,y); input[7:0] i; output[2:0] y; ? assign y[0] = ~( ~ i[1] ~ i[3] ~i[5] ~ i[7]); assign y[1] = ~( ~ i[2] ~ i[3] ~i[6] ~ i[7]); assign y[2] = ~( ~ i[4] ~ i[5] ~i[6] ~ i[7]); endmodule ;module example3_32 (i,y); input[7:0] i;output[2:0] y; reg[2:0] y; always @(i) begin case (i) 8 y = 3b000; 8 y = 3b001; 8 y = 3b010; 8 y = 3b011; 8 y = 3b100; 8 y = 3b101;

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档