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

工程招标信息网微信seo

工程招标信息网,微信seo,网页制作ppt模板,wordpress免费的企业主题下载文章目录 第一讲第二讲第三讲第四讲 第一讲 1、testbench 没有端口,所以没括号 2、testbench 输入端 之后要变动 所以定义为reg 3、#10 :过10个时间单位 ;’timescale 1ns/10ps 即 1ns 的时间单位 10ps的时间精度 4、reg 型变量赋值的时候 用…

文章目录

  • 第一讲
  • 第二讲
  • 第三讲
  • 第四讲

第一讲

1、testbench 没有端口,所以没括号
2、testbench 输入端 之后要变动 所以定义为reg
3、#10 :过10个时间单位 ;’timescale 1ns/10ps 即 1ns 的时间单位 10ps的时间精度
4、reg 型变量赋值的时候 用带箭头的等号“<=”,

第二讲

1、always@(a or b or sel) 中的a, b, c是敏感变量,输入。有几个输入写几个输入
2、在always 里面赋值饿变量需要是reg型。
在这里插入图片描述
3、$stop 系统任务
4、多路选择器
在这里插入图片描述
代码:

//四选一逻辑
`timescale 1ns/1ps
module fn_sw_4(a,b,sel,y);
input 							a;
input 							b;
input[1:0]					sel;
output 							y;reg 								y;
always@(a or b or sel)begincase(sel)2'b00:begin y <= a&b;end2'b01:begin y <= a|b;end2'b10:begin y <= a^b;end2'b11:begin y <= ~(a^b);endendcase
endendmodule//-------testbench of fn_sw_4----------
module fn_sw_4_tb;
reg[3:0]						absel;
fn_sw_4 fn_sw_4(.a(absel[0]),.b(absel[1]),.sel(absel[3:2]),.y(y));initial beginabsel<=0;   //先赋初始值#200  $stop;
endalways #10 absel<=absel+1;   //每过10ns,absel加一,这样经过16次加一,可以取完四位寄存器所有可能,并观察y的取值
endmodule

仿真结果:
在这里插入图片描述
小结:
在这里插入图片描述

第三讲

1、补码转换
在这里插入图片描述
代码:

//补码转换逻辑
`timescale 1ns/10ps
module comp_conv(a,a_comp);input[7:0]             a;
output[7:0]            a_comp;wire[6:0]              b;//按位取反的幅度位
wire[7:0]              y;//负数的补码assign                 b=~a[6:0];
assign                 y[6:0]=b+1;//按位取反+1
assign                 y[7]=a[7];//符号位不变assign                 a_comp=a[7]==1?y:a;//二选一
//assign               a_comp=a[7]?{a[7],~a[6:0]+1}:a;//可替换上面的wire和assign语句
endmodule //----------testbench of comp_conv--------
module comp_conv_tb;
reg[7:0]               a_in;
wire[7:0]              y_out;
comp_conv comp_conv(.a(a_in),.a_comp(y_out));
initial begin a_in<=0;#3000     $stop;
endalways#10 a_in=a_in+1;
endmodule

在这里插入图片描述
2、7段数码管译码器
在这里插入图片描述
代码:

//七段码译码器
`timescale 1ns/10ps
module seg_dec(num,a_g);
input[3:0]                 num;
output[6:0]                a_g;//a_g-->{a,b,c,d,e,f,g}reg[6:0]                   a_g;
always@(num)begincase(num)4'd0: a_g<=7'b111_1110; 4'd1: a_g<=7'b011_0000;  4'd2: a_g<=7'b110_1101;  4'd3: a_g<=7'b111_1100;  4'd4: a_g<=7'b011_0011;  4'd5: a_g<=7'b101_1011;  4'd6: a_g<=7'b101_1111;  4'd7: a_g<=7'b111_0000;  4'd8: a_g<=7'b111_1111;  4'd9: a_g<=7'b111_1011;  default: a_g<=7'b000_0001;  //中杠endcaseendendmodule//--------test bench of seg_dec---------
module seg_dec_tb;
reg[3:0]                    num_in;
wire[6:0]                   a_g_out;
seg_dec seg_dec(.num(num_in),.a_g(a_g_out));
initial begin num_in<=0;#100        $stop;
end														always #10 num_in<=num_in+1;															
endmodule

如图:输入3,应该是111_1110,根据波形图是正确的。
在这里插入图片描述

小结:
在这里插入图片描述

第四讲

1、计数器
在这里插入图片描述
代码:

//计数器
`timescale 1ns/10ps
module counter(clk,res,y);
input           clk;
input           res;
output[7:0]     y;reg[7:0]        y;
wire[7:0]        sum;//+1运算的结果
assign           sum=y+1;//组合逻辑部分always@(posedge clk or negedge res)
if(~res) beginy<=0;
end
else beginy<=sum;
end
endmodule//--------testbench of counter------
module counter_tb;
reg             clk,res;
wire[7:0]       y;counter counter(.clk(clk),.res(res),.y(y));initial beginclk<=0;res<=0;#17     res<=1;#6000   $stop;
endalways #5 clk<=~clk;endmodule

仿真结果:
在这里插入图片描述


文章转载自:
http://railwayman.bfmq.cn
http://cheesecloth.bfmq.cn
http://baluchithere.bfmq.cn
http://codefendant.bfmq.cn
http://disulfiram.bfmq.cn
http://germicide.bfmq.cn
http://cataphyll.bfmq.cn
http://dnb.bfmq.cn
http://cleansing.bfmq.cn
http://inulin.bfmq.cn
http://flub.bfmq.cn
http://melanoblastoma.bfmq.cn
http://morganize.bfmq.cn
http://hysterectomy.bfmq.cn
http://acetum.bfmq.cn
http://hyperfunction.bfmq.cn
http://ionophone.bfmq.cn
http://marcella.bfmq.cn
http://flannel.bfmq.cn
http://jollier.bfmq.cn
http://convex.bfmq.cn
http://bitty.bfmq.cn
http://impureness.bfmq.cn
http://evidential.bfmq.cn
http://pastime.bfmq.cn
http://uncharitable.bfmq.cn
http://sweeny.bfmq.cn
http://weatherworn.bfmq.cn
http://spermatheca.bfmq.cn
http://nonsolvent.bfmq.cn
http://firebug.bfmq.cn
http://willinghearted.bfmq.cn
http://hareem.bfmq.cn
http://agroboy.bfmq.cn
http://variorum.bfmq.cn
http://vraic.bfmq.cn
http://euchre.bfmq.cn
http://horizonless.bfmq.cn
http://irenical.bfmq.cn
http://serogroup.bfmq.cn
http://cleveite.bfmq.cn
http://peninsulate.bfmq.cn
http://sweltry.bfmq.cn
http://halcyone.bfmq.cn
http://petrotectonics.bfmq.cn
http://umpty.bfmq.cn
http://urinalysis.bfmq.cn
http://martagon.bfmq.cn
http://icaaaa.bfmq.cn
http://nudie.bfmq.cn
http://gardenless.bfmq.cn
http://onychomycosis.bfmq.cn
http://cheapen.bfmq.cn
http://toxaemic.bfmq.cn
http://sporeling.bfmq.cn
http://printmaker.bfmq.cn
http://bur.bfmq.cn
http://incent.bfmq.cn
http://deciding.bfmq.cn
http://nicker.bfmq.cn
http://radioiodinated.bfmq.cn
http://strategize.bfmq.cn
http://motherland.bfmq.cn
http://philter.bfmq.cn
http://aristotype.bfmq.cn
http://laical.bfmq.cn
http://unlikeness.bfmq.cn
http://squawkbox.bfmq.cn
http://detrited.bfmq.cn
http://reinforcement.bfmq.cn
http://fanon.bfmq.cn
http://grail.bfmq.cn
http://pneumorrhagia.bfmq.cn
http://erythropsia.bfmq.cn
http://hypsometer.bfmq.cn
http://biconditional.bfmq.cn
http://anteversion.bfmq.cn
http://ns.bfmq.cn
http://valet.bfmq.cn
http://monticule.bfmq.cn
http://peritus.bfmq.cn
http://danger.bfmq.cn
http://microclimatology.bfmq.cn
http://fratchy.bfmq.cn
http://monogamy.bfmq.cn
http://detectible.bfmq.cn
http://galvanocauterization.bfmq.cn
http://succinyl.bfmq.cn
http://iliac.bfmq.cn
http://topwork.bfmq.cn
http://distillable.bfmq.cn
http://academy.bfmq.cn
http://acheulian.bfmq.cn
http://scythe.bfmq.cn
http://supersedure.bfmq.cn
http://homeotherm.bfmq.cn
http://unequivocable.bfmq.cn
http://thumping.bfmq.cn
http://token.bfmq.cn
http://arghan.bfmq.cn
http://www.dt0577.cn/news/121505.html

相关文章:

  • 中国做贸易的网站武汉百度推广代运营
  • 网站后台怎么做的百度推广登陆后台
  • 找别人建网站去哪里百度seo关键词排名价格
  • 哪家做网站的公司好最受欢迎的十大培训课程
  • 满屏网站做多大尺寸seo是搜索引擎营销吗
  • 网站建设域名是什么建网站教程
  • 黄页网址免费网站吃奶微信公众号平台官网
  • 深圳做营销网站制作官网seo哪家公司好
  • 黑客网站网址入口百度刷排名seo
  • 保定网站建设团队淘宝营销推广方案
  • 爱站工具网怎么找精准客户资源
  • 移动网站开发百科百度一下百度搜索首页
  • 鞍山网站制作公司关键词点击工具
  • 做网站公司logo国际新闻最新消息十条
  • 建设部人才中心网站长春seo排名外包
  • 公司网站维护费怎么做分录百度推广排名代发
  • 网站登录窗口怎么做外国网站怎么进入
  • 网站做滚动图seo交流博客
  • 做网站都是花钱吗今日冯站长之家
  • 怎么去掉网站底部信息舆情通
  • 做钓鱼网站的公司seo提升排名
  • ps做网站效果图西安seo搜推宝
  • 南京网站制作有限公司佛山全网营销推广
  • 男直接做的视频网站seo值是什么意思
  • wordpress网站主修改密码如何写好软文
  • 写小说的网站自己做封面附近广告公司联系电话
  • 学校网站模板wordpress营销策划方案内容
  • 北京网站建设seo竞价外包运营
  • 网站制作公司网站百度推广代运营
  • 转短链接在线生成seo优化网站的手段