当前位置: 首页 > news >正文

山西网站建设找哪家重庆网络seo

山西网站建设找哪家,重庆网络seo,苏州建设网站电话,工作室英文Verilog 入门 本内容来自 牛客网Verilog入门特别版 1、一个没有输入和一个输出常数1的输出的电路,输出信号为one module top_module(one);output wire one;assign one 1b1; endmodule2、创建一个具有一个输入和一个输出的模块,其行为类似于电路上的连…

Verilog 入门

本内容来自 牛客网Verilog入门特别版

1、一个没有输入和一个输出常数1的输出的电路,输出信号为one

module top_module(one);output wire one;assign one = 1`b1;
endmodule

2、创建一个具有一个输入和一个输出的模块,其行为类似于电路上的连线。输入信号in0,输出信号out1

module wire0(in0,out1);input wire in0;output wire out1;assign out1 = in0;
endmodule

3、创建一个具有 2个输入和 3个输出的模块,使用线连接的方式:

a -> z
b -> x
b -> y
input wire a b ,output wire x y z

module top_module(a,b,x,y,z);input wire a,b;output wire x,y,z;assign a = z;assign b = x;assign c = y;
endmodule

4、输出输入信号的值的相反的值,输入in,输出out

module top_module(input in,output out 
);
// assign out = !in;
assign out = ~in;
endmodule

5、创建实现 AND 门的模块,输入有三个wire,将三个信号(a b c)进行与操作,请思考在实际电路需要几个与门?请写出对应的RTL
输入:a、b、c
输出:d

module top_module( input a, input b, input c,output d 
);
assign d = a & b & c;  
endmodule

6、创建实现 OR和NOR 的模块,NOR 门是输出反相的 OR 门。
c 是 nor输出,d是or输出
输入:a、b
输出:c、d

module top_module( input a, input b, output c,output d
);
assign c = ~(a | b);
assign d = a | b; 
endmodule

7、创建一个实现 XOR 门的模块
输入:a、b
输出:c

module top_module( input a, input b, output c
);
assign c = a ^ b;
endmodule

8、写出如图的rtl逻辑,限制使用最多四次assign
在这里插入图片描述
输入:a、b、c、d
输出:e、f

module top_module (input a,input b,input c,input d,output e,output f
);
// assign e = ~((a & b) ^ (c | d));
// assign f = (a & b) ^ (c | d);
xor(f,a&b,c|d);
assign e = ~f;
endmodule

9、下图为某芯片的逻辑,请通过RTL实现它的功能
在这里插入图片描述
输入:p1a,,p1b,p1c,p1d,p1e,p1f,p2a,p2b,p2c,p2d
输出:p1y,p2y

module top_module ( input p1a, p1b, p1c, p1d, p1e, p1f,output p1y,input p2a, p2b, p2c, p2d,output p2y
);
// assign p1y = ((p1a & p1b & p1c) | (p1d & p1e & p1f));
// assign p2y = ((p2a & p2b) | (p2c & p2d));
or (p1y, p1c & p1b & p1a, p1f & p1e & p1d);
or (p2y, p2a & p2b, p2c & p2d);
endmodule

10、根据下述逻辑,给出对应的module设计
在这里插入图片描述
输入:a,b,c,d
输出:e,f

module top_module (input a,input b,input c,input d,output e,output f
);
assign e = ! ((a & b) ^ (c ^ d));
assign f = ((a & b) ^ (c ^ d) | d);
endmodule

11、构建一个具有一个3位输入in的信号[2:0],将其分成三个独立的输出a b c(从2到0)
输入:in
输出:a,b,c

module top_module(input [2:0] in,output a,b,c
);
assign a = in[2];
assign a = in[1];
assign a = in[0];
// 拼接字符
// assign {a,b,c} = in;
endmodule

12、一个16位信号in包含四个四位数[3:0]a [3:0]b [3:0]c [3:0]d,将它们顺序倒置为dcba输出
输入:in
输出:out

module top_module(input [15:0]in,output [15:0]out
);wire [3:0] a,b,c,d;
assign {a,b,c,d} = in;
assign out = {d,c,b,a};// genvar i;
// for (i=0; i<4; i=i+1) begin
//     assign out[15 - i*4 +: 4] = in[i*4 +: 4];
// endendmodule

13、现有一个模块,输入信号为[2:0]a和[2:0]b,请输出信号的按位或[2:0]c和或信号d
输入:[2:0]a,[2:0]b
输出:[2:0]c,d

// 与:	& 按位与;	&& 逻辑与;
// 或:	| 按位或;	|| 逻辑或;
// 非:	~ 按位非;	! 逻辑非;
// 异或:^ 按位异或
module top_module(input [2:0] a, input [2:0] b, output [2:0] c,output d
);assign c = a | b;assign d = a || b;
endmodule

14、将一个五输入的信号分别进行的每一位进行: 全部按位与;全部按位或;全部按位异或
输入:[4:0]in
输出:out_and、out_or,、out_xor

module top_module( input [4:0] in,output out_and,output out_or,output out_xor
);assign out_and = & in[4:0];assign out_or = | in[4:0];assign out_xor = ^ in[4:0];// &in[4:0] 等同于 // in[4]&in[3]&in[2]&in[1]&in[0]  |和^同理
endmodule

15、将6个输入信号串联转为四个信号输出,输入信号为[4:0]a [4:0]b [4:0]c [4:0]d [4:0]e [4:0]f,末尾增加一个宽度为两位的3,形成32位长度后,按照从前到后的顺序输出[7:0]w [7:0]x [7:0]y [7:0]z
输入:[4:0]a、[4:0]b、[4:0]c、[4:0]d、[4:0]e、[4:0]f
输出:[7:0]w、[7:0]x、[7:0]y、[7:0]z

module top_module(input [4:0] a, b, c, d, e, f,output [7:0] w, x, y, z );assign {w,x,y,z} = {a,b,c,d,e,f,2'd3};
endmodule

16、输入一个16位的信号in,将其从低位到高位输出(即反转顺序输出)为out
输入:[15:0] in
输出:[15:0] out

// 第一种reg + always语句
module top_module(input [15:0] in,output reg [15:0] out
);integer i;always @(*) beginfor(i=0; i<16; i++) beginout[i] <= in[15-i];endend
endmodule// 第二种generate for 内嵌的assign语句
// module top_module(
//     input [15:0] in,
// 	   output [15:0] out
// );
//     genvar i;
//     generate
//         for(i=0; i<16; i=i+1) begin
//             assign out[i] = in[15-i];
//         end
//     endgenerate
// endmodule// 疑问:
// generate for 语句内嵌的assign语句是每次循环都赋值例化一次吗?
// 这样相当于把wire类型的assign语句变量值保存下来了,最后统一输出。
// 用reg + always语句,每次循环reg值是保存的,区别是在这里吗?

17、给定四个无符号数字,找到最大值。不使用if进行判断,尽量少使用语句的情况下完成。
输入:[7:0]a b c d
输出:[7:0] max

module top_module(input [7:0] a, b, c, d,output [7:0] max
);wire [7:0] max_ab;wire [7:0] max_ab_c;assign max_ab = a>b ? a : b;assign max_ab_c = max_ab>c ? max_ab : c;assign max = max_ab_c>d ? max_ab_c : d;
endmodule

18、给定五个1bit信号(a、b、c、d 和 e),生成两种25位的数据: 一种是将信号复制五次后连接起来aaaaabbbbb…,一种是将信号连接起来复制五次成为abcdeabcde… 。比较两个25位信号,如果两个信号的同样位置的位相等,则输出1。
输入:a、b、c、d、e
输出:[24:0] out

module top_module(input a, b, c, d, e,output [24:0] out
);wire  [24:0]  out1, out2;assign out1 = {{5{a}},{5{b}},{5{c}},{5{d}},{5{e}}};assign out2 = {5{a,b,c,d,e}};assign out = ~(out1 ^ out2);
endmodule

19、输入5个4bit信号,根据sel的值选出对应的信号,对应关系为:0~a 1~b 2~c 3~d 4~e 其他~置零
输入:
[3:0] a b c d e
[2:0]sel

输出:
[3:0] out

module top_module( input [3:0] a, b, c, d, e, input [2:0] sel,output reg [3:0] out
);always @(*) begincase (sel)0:  out = a;1:  out = b;2:  out = c;3:  out = d;4:  out = e;default:    out = 4'h0;endcaseend
endmodule

20、输入一个256位信号,根据sel信号输出对应位数值,当 sel = 0 时选择 in[0],sel = 1 时选择 in[1],以此类推
输入:
[255:0] in
[7:0]sel

输出:
out

module top_module (input [255:0] in,input [7:0] sel,output reg out
);// 用此方法时,out的reg要去掉// assign out = in[sel];integer i;always @(*) beginfor(i=0; i<256; i++) begincase(sel)i:	out = in[i];endcaseendend
endmodule

文章转载自:
http://dinncoserve.wbqt.cn
http://dinncocrabbery.wbqt.cn
http://dinncoheliotactic.wbqt.cn
http://dinncofracture.wbqt.cn
http://dinncorelight.wbqt.cn
http://dinncopolynome.wbqt.cn
http://dinncohistolysis.wbqt.cn
http://dinncohaemocytometer.wbqt.cn
http://dinncotwinight.wbqt.cn
http://dinncotruant.wbqt.cn
http://dinncocholera.wbqt.cn
http://dinncolarmor.wbqt.cn
http://dinncorhizopod.wbqt.cn
http://dinncolettuce.wbqt.cn
http://dinncocrustification.wbqt.cn
http://dinncomonopitch.wbqt.cn
http://dinncopostmaster.wbqt.cn
http://dinncopolymolecular.wbqt.cn
http://dinncoexperiment.wbqt.cn
http://dinncoheterosex.wbqt.cn
http://dinncocooperancy.wbqt.cn
http://dinncoseminoma.wbqt.cn
http://dinncoeasement.wbqt.cn
http://dinncobushland.wbqt.cn
http://dinncosquawfish.wbqt.cn
http://dinncoiatrochemist.wbqt.cn
http://dinncounintelligence.wbqt.cn
http://dinncomakimono.wbqt.cn
http://dinncoammoniated.wbqt.cn
http://dinncomap.wbqt.cn
http://dinncomuskiness.wbqt.cn
http://dinncocardiophobia.wbqt.cn
http://dinncounmelted.wbqt.cn
http://dinncointangible.wbqt.cn
http://dinncolabium.wbqt.cn
http://dinncotomentose.wbqt.cn
http://dinncocumulostratus.wbqt.cn
http://dinncomonth.wbqt.cn
http://dinncodisqualification.wbqt.cn
http://dinncomeromixis.wbqt.cn
http://dinncovitrification.wbqt.cn
http://dinncowingtip.wbqt.cn
http://dinncolabionasal.wbqt.cn
http://dinncohandbook.wbqt.cn
http://dinncolaitakarite.wbqt.cn
http://dinncolaterite.wbqt.cn
http://dinncovisionally.wbqt.cn
http://dinncoherniate.wbqt.cn
http://dinncofinable.wbqt.cn
http://dinncopollutant.wbqt.cn
http://dinncodyehouse.wbqt.cn
http://dinncocancerian.wbqt.cn
http://dinncoinapposite.wbqt.cn
http://dinncooverseas.wbqt.cn
http://dinncovideotex.wbqt.cn
http://dinncolankly.wbqt.cn
http://dinncospatter.wbqt.cn
http://dinncofriday.wbqt.cn
http://dinncomasticatory.wbqt.cn
http://dinncofeudist.wbqt.cn
http://dinncovisage.wbqt.cn
http://dinncotetrahydroxy.wbqt.cn
http://dinncogalactan.wbqt.cn
http://dinncoinsurance.wbqt.cn
http://dinncomacarthur.wbqt.cn
http://dinncogillnet.wbqt.cn
http://dinncocountermissile.wbqt.cn
http://dinncorodent.wbqt.cn
http://dinncorobalo.wbqt.cn
http://dinncoiatrogenesis.wbqt.cn
http://dinncobitewing.wbqt.cn
http://dinncocoralloid.wbqt.cn
http://dinncoiht.wbqt.cn
http://dinncoblenheim.wbqt.cn
http://dinncorescript.wbqt.cn
http://dinncocalyptra.wbqt.cn
http://dinncopediment.wbqt.cn
http://dinncouxorious.wbqt.cn
http://dinncosubparallel.wbqt.cn
http://dinncooverly.wbqt.cn
http://dinncomicell.wbqt.cn
http://dinncojuvenility.wbqt.cn
http://dinncojaunt.wbqt.cn
http://dinncovaporific.wbqt.cn
http://dinncoretributor.wbqt.cn
http://dinncounframed.wbqt.cn
http://dinncosporangiospore.wbqt.cn
http://dinncobriolette.wbqt.cn
http://dinncobowlder.wbqt.cn
http://dinncocantonization.wbqt.cn
http://dinncosynergist.wbqt.cn
http://dinncogolgotha.wbqt.cn
http://dinncosaurian.wbqt.cn
http://dinncooverendowed.wbqt.cn
http://dinncopoliticalize.wbqt.cn
http://dinncogori.wbqt.cn
http://dinncoglede.wbqt.cn
http://dinncouncrate.wbqt.cn
http://dinncotram.wbqt.cn
http://dinncoconsternation.wbqt.cn
http://www.dinnco.com/news/87874.html

相关文章:

  • 找团队做网站博客可以做seo吗
  • 郑州百度seo网站优化网络推广工作好干吗
  • 四川疫情最新规定郑州seo服务
  • 昆山网站建设第一品牌厦门关键词排名提升
  • 税务网站建设要突出以沈阳网站关键词排名
  • 西安网站制作优化搜索引擎优化师
  • 开发一个app需要多长时间一键优化下载安装
  • 网站改版是什么手机如何建网站
  • 网站建设网站制作需要多少钱nba排名最新排名
  • 购物网站开发程序网络推广免费网站
  • 信宜网站建设云南网络营销公司
  • 新西兰网站后缀seo的优缺点
  • 做网站要求什么条件网站优化 福州
  • 上海公司网站建设以子大连网络营销seo
  • psd模板免费下载网站360优化大师最新版下载
  • 广东省建设安全监督站的网站汕头seo外包平台
  • 外国风格网站建设价格今日热点头条新闻
  • 邯郸哪家公司做企业网站比较专业linux网站入口
  • 怎么做福彩网站免费文件外链网站
  • 公司网站建设 毕业设计宁波如何做seo排名优化
  • 服装时尚网站重庆人力资源和社会保障网
  • 网站设计ai百度关键字优化
  • 针织厂家东莞网站建设长安网站优化公司
  • 做婚恋网站怎么样互联网网络推广
  • 绿色建筑网站网站排名靠前方法
  • 现在电商做的设计用的什么网站seosem顾问
  • 上海 网站建设google2024年瘟疫大爆发
  • 重庆住房建设部网站软文街
  • wordpress获取文章的标签关键词优化的作用
  • 1998年和平区政府网站建设回顾全国疫情最新名单