ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:33.91KB ,
资源ID:7406024      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/7406024.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(VerilogHDL数字设计与综合夏宇闻译第二版课后题答案.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

VerilogHDL数字设计与综合夏宇闻译第二版课后题答案.docx

1、VerilogHDL数字设计与综合夏宇闻译第二版课后题答案Verilog-HDL数字设计与综合-夏宇闻译(第二版)课后题答案LT c: -2(1010)-取反(1101)-再加一(1110) d: h1234/*2-*/ a:正确 b:正确 c:正确 d:正确/*3-*/ a : 合法 b : 合法 c : 不合法,含有$ 为延时含义 d : 标识符组成:字母数字下划线。/*4-*/ a: wire 7:0 a_in; b: reg 31:0 c: integer count; d: time snap_shot; e: integer delays20; f: reg 63:0 mem256

2、; g: parameter cach_size=256;/*5-*/ a : 1010 b: 10 c : 400第四章/*1-*/模块的基本组成部分有哪些?哪几个部分必须出现? 模块定义已关键字module开始,模块名,端口列表,端口声明和可选的参数声明出现在其他部分的前面 ,endmodule必须为最后一条语句 1)wire。reg和其他类型的变量的声明 2)数据流语句 (assign,连续赋值语句) 3)低层模块实例 4)always和initial块,所有的行为语句都在这些块中 5) 任务和函数。 其中module和模块名和endmodule是必不可少的。 /*2-*/ /一个不与外

3、界环境交互的模块是否有端口?模块定义中是否有端口列表? 不与外界交互即没有端口列表,在没有端口的情况下端口列表也是不存在的。/*3-*/ module shift_reg(reg_in3:0 , clock , reg_out3:0 ); input 3:0 reg_in; input clock; output 3:0 reg_out; /. endmodule;/*4-*/ /connect in order module stimulus(); reg 3:0 REG_IN; wire 3:0 REG_OUT; reg CLK; shift_reg sr1(REG_IN,CLK,REG_

4、OUT); endmodule/*5-*/ /connect by name module stimulus(); reg 3:0 REG_IN; wire 3:0 REG_OUT; reg CLK; shift_reg sr1(.clock(CLK) ,.reg_in(REG_IN) , .reg_out(REG_OUT) ); endmodule/*6-*/ stimulus.REG_IN stimulus.CLK; stimulus.REG_OUT;/*7-*/ stimulus.sr1; stimulus.sr1.clock; stimulus.sr1.reg_in; stimulus

5、.sr1.reg_out;第五章/*1-*/ /利用双输入的nand门设计自己的与或非门。 /my_and module my_and(out , in1,in2); input in1,in2; output out; endmodule /my_not module my_not(out , in1); input in1; output out; nand(out , in1 ,in1 ); endmodule /my_and module my_or(out ,in1 ,in2); wire t; nand(t,in1,in2); nand(out,t,t); / endmodule/

6、*2-*/ /使用上题中完成的my_or,my_and,my_not构造一个双 /输入的xor门,其功能是计算z=xy+xy /*3-*/ /全加器 module sum(a,b,c_in,sum,c_out); input a,b,c_in; output sum,c_out; wire y1,y2,y3,y4; wire x1,x2,x3; or(sum,y1,y2,y3,y4); and(y1,a,b,c_in); and(y2,x1,b,x3); and(y3,x1,x2,c_in); and(y4,a,x2,x3); not(x1,a); not(x2,b); not(x3,c);

7、wire j1,j2,j3; or(c_out,j1,j2,j3); and(j1,a,b); and(j2,b,c_in); and(j3,a,c_in); endmodule /*4-*/带有延时的SR锁存器 module SR(reset , q ,set , qbar); input reset,set; output q,qbar; wire line1,line2; nor( line2 , reset ,line1 ); nor( line1, set ,line2 ); endmodule/*-ISE中一个端口如何接多根线?*/*5-*/ module select(out,i

8、n1,in2,s); input in1,in2,s; output out; /3为上升延迟,4为下降延时,5为关断延迟。 bufif1 #(1:2:3,3:4:5,5:6:7) b2(out,in1,s); bufif0 #(1:2:3,3:4:5,5:6:7) b1(out,in2,s); endmodule/*-*/第六章/*1-*/全减器/输入 :x,y,z(前面的借位)/输出: 差和借位module sub(x,y,z,D,B); input x,y,z; output D,B; wire y0,y1,y2,y3; wire j1,j2,j0; /非门 not(j0,x); not

9、(j1,y); not(j2,z); and(y0,j0,j1,j2); and(y1,j0,y,j2); and(y2,x,j1,j2); and(y3,x,y,z); or(D,y0,y1,y2,y3); /B wire a1,a0,a2; and(a0 , j0 ,y); and( a1, j0, z); and( a2, y , z); or(B,a1,a0,a2); endmodule/激励模块:module stimulus;/initial 从仿真0时刻开始,而且只执行一次,若程序中有若干个initial块,则并发执行。 reg a,b,c; wire d,e; reg i; s

10、ub sub(a,b,c,d,e); initial for(i=1 ;i0;) begin #5 ; a=1; b=1; c=0; #5; a=1; b=0; c=0; endendmodule/*2-*/大小比较器module cmp(A ,B ,A_gt_B , A_lt_B,A_eq_B); input 3:0 A,3:0 B; output A_gt_B , A_lt_B , A_eq_B ; endmodule/*3 -*/ module syn_counter(clear,clock,count_enable,Q); input clear,clock,count_enable;

11、 output 3:0 Q; wire 3:0 Q; wire b1,b2,b3; nand(b1,count_enable,Q1); nand(b2,b1,Q2); nand(b3,b2,Q3); jk jk1(count_enable,count_enable,clear,clock,Q0,); jk jk2(b1,b1,clear,clock,Q1,); jk jk3(b2,b2,clear,clock,Q2,); jk jk4(b3,b3,clear,clock,Q3,);endmodulemodule jk(J,K,clear,clock,q,qbar); input J,K,cle

12、ar,clock; output q,qbar; wire a,y,c,b,ybar,cbar,d; not (cbar,clock); nand a1(a,qbar,J,clock,clear); nand a2(b,clock,K,q); nand a3(y,a,ybar); nand a4(ybar,y,clear,b); nand a5(c,y,cbar); nand a6(d,cbar,ybar); nand a7(q,c,qbar); nand a8(qbar,q,clear,d);endmodule第七章/*1-*/ reg oscillate=0; initial begin forever #30 oscillate=oscillate; end/*2-*/ initial clock=0; always begin #30 clock=1; #10 clock=0; end/*3 -*/ 执行时刻:0,10,15,35. 最终结果:a=0,b=1,c=0;d=3b010;/*4-*/ 执行时刻:0,10,5,20. 最终结果:a=0,b=1,c=0;d=3b010;/*5 -*/ a,b,c,d: 0 ,1,1,0 /每个initial中的语句是串行执行的。/*6 -*/ d=0;

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1