Verilog-HDL数字设计与综合-夏宇闻译(第二版)课后题答案_第1页
Verilog-HDL数字设计与综合-夏宇闻译(第二版)课后题答案_第2页
Verilog-HDL数字设计与综合-夏宇闻译(第二版)课后题答案_第3页
Verilog-HDL数字设计与综合-夏宇闻译(第二版)课后题答案_第4页
Verilog-HDL数字设计与综合-夏宇闻译(第二版)课后题答案_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

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

文档简介

第二章 1 module IS SC sc1 MEM mem1 Xbar xbar1 endmodule module SC endmodule module Xbar endmodule module MEM endmodule module Top IS is1 endmodule 2 module FA endmodule module Ripple Add FA fa0 FA fa1 FA fa2 FA fa3 Endmodule 第三章 1 a 8b0111 1011 b 16hxxxx 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 delays 20 f reg 63 0 mem 256 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 module shift reg reg in 3 0 clock reg out 3 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 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 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 2 使用上题中完成的 my or my and my not 构造一个双 输入的 xor 门 其功能是计算 z x y 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 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 in1 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 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 sub sub a b c d e initial for i 1 i 0 begin 5 a 1 b 1 c 0 5 a 1 b 0 c 0 end endmodule 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 output 3 0 Q wire 3 0 Q wire b1 b2 b3 nand b1 count enable Q 1 nand b2 b1 Q 2 nand b3 b2 Q 3 jk jk1 count enable count enable clear clock Q 0 jk jk2 b1 b1 clear clock Q 1 jk jk3 b2 b2 clear clock Q 2 jk jk4 b3 b3 clear clock Q 3 endmodule module jk J K clear clock q qbar input J K clear 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 initi

温馨提示

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

评论

0/150

提交评论