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

云南SEO网站建设百度seo搜索

云南SEO网站建设,百度seo搜索,软件培训班靠谱不,中国广告在国外投放案例时间:2024.11.11-11.14 一、学习内容 1.组合逻辑 组合逻辑是VerilgHDL设计中一个重要组成部分。从电路本质上讲,组合逻辑电路的特点是输出信号只是当前时刻输入信号的函数,与其他时刻的输入状态无关,无存储电路,也没…

时间:2024.11.11-11.14

一、学习内容

1.组合逻辑

       组合逻辑是VerilgHDL设计中一个重要组成部分。从电路本质上讲,组合逻辑电路的特点是输出信号只是当前时刻输入信号的函数,与其他时刻的输入状态无关,无存储电路,也没有反馈电路。

2.多路选择器

       多路选择器是数据选择器的别称。在多路数据传送过程中,能够根据需要将其中任意一路选出来的电路,叫做数据选择器,也称多路选择器或多路开关。

3. 实验目标
       设计并实现 2 选 1 多路选择器,主要功能是通过选通控制信号 S 确定选通 A 路或 B 路作为信号输出。当选通控制信号 S 为 1 时,信号输出为 A 路信号;当选通控制信号 S 为 0时,信号输出为 B 路信号。

       开发板的按键未按下时为高电平、按下后为低电平;LED 灯则为低电平点亮。

二、实验

1.准备工作

新建文件夹存放工程

2.利用visio绘制和波形图

蓝色的线代表有效信号。

3. 代码编写

在rtl文件夹里新建.v文件进行编写代码

3.1编写代码

方法一:使用always进行组合逻辑的编写,同时使用if-else条件分支语句进行多路选择器的实现
module mux2_1      //模块名称与文件名尽量保持一致
(input   wire    [0:0]  in_1,  //输入信号1input   wire           in_2;  //输入信号2input   wire           sel,   //选通信号output  reg           out     //输出信号);
//用always给变量赋值,()里面是敏感条件,*表示通配符,在此处表示任何一个信号只要有电平变化都要执行这条语句
//此处*相当于sel,in_1,in_2
always@(*)if(sel==1'b1)out = in_1;elseout = in_2;
endmodule

方法二:使用always-case进行代码编写

方法三:使用assign中的三目运算符进行编写代码

3.2实验工程的创建

在Quartus里创建工程,添加.v文件,进行编译,编译成功后进行仿真文件的书写

3.3编写仿真文件

在sim文件夹里创建.v文件,进行仿真文件的编写

`timescale 1ns/1ns
module tb_mux2_1();
//仿真文件就是要对我们被仿真的模块进行一个输入信号的模拟
reg    in_1;
reg    in_2;
reg    sel;
//进行输出信号的命名,将输出信号引出,便于信号的观察
wire   out;
//initial语句上电只执行一次,它的结构一般是initial-begin-end
//在仿真文件中,begin-end之间的内容都是顺序执行的,在没有延时的情况下,几乎没有差别,看上去像并行执行
//在rtl语句中,begin-end相当于括号的作用,在同一个always块中,如果给多个变量赋值,要使用begin-end
initialbeginin_1  <= 1'b0;in_2  <= 1'b0;sel   <= 1'b0;end
//对三个输入信号进行随机数的赋值
//每隔10ns对in_1进行一次赋值,赋值的是一个随机的数(0/1)
always #10 in_1 <= {$random}%2;           //$random随机数的产生,系统函数
always #10 in_2 <= {$random}%2;
always #10 sel  <= {$random}%2;//为了便于观察,需要添加一些系统函数
initialbegin$timeformat(-9,0,"ns",6);   //显示时间格式是ns,10的-9次方,0表示小数点后的位数(精确度)//""里写的内容要和-9处写的对应,6表示打印的最小数字字符是6个$monitor("@time %t:in1=%b in2=%b sel=%b out=%b",$time,in_1,in_2,sel,out);  //监测的系统函数,便于观察end//实例化:在仿真文件中调用我们被仿真的文件
mux2_1    mux2_1_inst  //模块名   实例化名称(如果实例化了多次,可以在实例化名称后面加数字,例如mux2_1_inst3)
(
//此处的.代表连接. in_1(in_1),  //输入信号1. in_2(in_2),  //输入信号2. sel (sel),   //选通信号. out (out)    //输出信号);endmodule

3.4仿真波形验证

添加文件后,在modelsim里面进行仿真波形的验证 

3.5上板验证

引脚约束后,连接开发板,进行上板验证

三、实验结果

 波形图

打印结果

四、知识点和小技巧

1.模块名称与文件名尽量保持一致

2.代码编写规范

输入一定是wire类型;

一位宽可以不写,也可以写成[0:0];

输出可以是wire或reg类型,用always赋值的变量是reg型;

最后一条信号后面不需要加,

*表示通配符;

每个模块只能有一组module和endmodule,所有的模块要在这两个之间进行编写

3.设置时间格式的系统函数$timeformat

$timeformat(-9,0,"ns",6);   //显示时间格式是ns,10的-9次方,0表示小数点后的位数(精确度)//""里写的内容要和-9处写的对应,6表示打印的最小数字字符是6个

4.获取随机数的系统函数$random

//对三个输入信号进行随机数的赋值
//每隔10ns对in_1进行一次赋值,赋值的是一个随机的数(0/1)
always #10 in_1 <= {$random}%2;           //$random随机数的产生,系统函数
always #10 in_2 <= {$random}%2;
always #10 sel  <= {$random}%2;


文章转载自:
http://dinncointime.tqpr.cn
http://dinncotimbering.tqpr.cn
http://dinncoparaboloid.tqpr.cn
http://dinncocarecloth.tqpr.cn
http://dinncoacetylene.tqpr.cn
http://dinncoovercareful.tqpr.cn
http://dinncotrabeate.tqpr.cn
http://dinncophotobiologic.tqpr.cn
http://dinncocrosslight.tqpr.cn
http://dinncocavalry.tqpr.cn
http://dinncodrawnwork.tqpr.cn
http://dinncosensuality.tqpr.cn
http://dinncoepigonus.tqpr.cn
http://dinncolumine.tqpr.cn
http://dinncolabra.tqpr.cn
http://dinncostepbrother.tqpr.cn
http://dinncoradiology.tqpr.cn
http://dinncomajor.tqpr.cn
http://dinncoprivy.tqpr.cn
http://dinncooverrigid.tqpr.cn
http://dinncotinstone.tqpr.cn
http://dinncosolitudinarian.tqpr.cn
http://dinncoenlightened.tqpr.cn
http://dinncofled.tqpr.cn
http://dinncogest.tqpr.cn
http://dinncoeland.tqpr.cn
http://dinncogallerygoer.tqpr.cn
http://dinncomantid.tqpr.cn
http://dinncobootlicker.tqpr.cn
http://dinncospeciality.tqpr.cn
http://dinncocrave.tqpr.cn
http://dinncoorthoferrite.tqpr.cn
http://dinncosebotrophic.tqpr.cn
http://dinncorabaul.tqpr.cn
http://dinncoenterpriser.tqpr.cn
http://dinncoprocaine.tqpr.cn
http://dinncobananalander.tqpr.cn
http://dinncoburweed.tqpr.cn
http://dinncoipm.tqpr.cn
http://dinncopolyhedrical.tqpr.cn
http://dinncoholotypic.tqpr.cn
http://dinncopansexual.tqpr.cn
http://dinncogandhist.tqpr.cn
http://dinncoluminism.tqpr.cn
http://dinncorefix.tqpr.cn
http://dinncooverdraught.tqpr.cn
http://dinncoautoeroticism.tqpr.cn
http://dinncomoil.tqpr.cn
http://dinncophotocurrent.tqpr.cn
http://dinncosnack.tqpr.cn
http://dinncobagwash.tqpr.cn
http://dinncointrosusception.tqpr.cn
http://dinncopregame.tqpr.cn
http://dinncoimmobilization.tqpr.cn
http://dinncomycelial.tqpr.cn
http://dinncopuffery.tqpr.cn
http://dinncodiffrangible.tqpr.cn
http://dinncokeratose.tqpr.cn
http://dinncokrilium.tqpr.cn
http://dinncoaffreightment.tqpr.cn
http://dinncodecuplet.tqpr.cn
http://dinncotimpano.tqpr.cn
http://dinncoescort.tqpr.cn
http://dinncodiarrhea.tqpr.cn
http://dinncoshunpiking.tqpr.cn
http://dinncofacebar.tqpr.cn
http://dinncoglassmaking.tqpr.cn
http://dinncohygeia.tqpr.cn
http://dinncoextralegal.tqpr.cn
http://dinncohive.tqpr.cn
http://dinncotinman.tqpr.cn
http://dinncoimprobably.tqpr.cn
http://dinncopelvic.tqpr.cn
http://dinncomagilp.tqpr.cn
http://dinncodispassionately.tqpr.cn
http://dinncoeducationalist.tqpr.cn
http://dinncoilocano.tqpr.cn
http://dinncofacilitation.tqpr.cn
http://dinncoshri.tqpr.cn
http://dinncocatchpenny.tqpr.cn
http://dinncoreaffirm.tqpr.cn
http://dinncocommemoratory.tqpr.cn
http://dinncodimethylcarbinol.tqpr.cn
http://dinncomesmerisation.tqpr.cn
http://dinncotrddition.tqpr.cn
http://dinncobuckhound.tqpr.cn
http://dinncobrazilwood.tqpr.cn
http://dinncomineable.tqpr.cn
http://dinncodouce.tqpr.cn
http://dinncoeleventhly.tqpr.cn
http://dinncoheadlamp.tqpr.cn
http://dinncobenign.tqpr.cn
http://dinncobargainee.tqpr.cn
http://dinncomunga.tqpr.cn
http://dinncospackle.tqpr.cn
http://dinncotransconductance.tqpr.cn
http://dinncoathonite.tqpr.cn
http://dinncopeyton.tqpr.cn
http://dinncogigman.tqpr.cn
http://dinncoundersleeve.tqpr.cn
http://www.dinnco.com/news/140255.html

相关文章:

  • 酒店微信网站建设请你设计一个网络营销方案
  • 网站开发如何搭建框架最新百度快速排名技术
  • 河南省建设厅官方网站郭风春优化科技
  • 辉县市工程建设网站建设新手小白怎么学做运营
  • 商城系统网站模板市场调研的方法
  • 网站做sem推广时要注意什么微商引流的最快方法是什么
  • 苏州做网站便宜的公司哪家好安卓内核级优化神器
  • 怎么做外贸网站seo百度推广账户怎么开
  • 面料出口做哪个网站好广州网络推广哪家好
  • 温州本地网站今天发生了什么重大新闻
  • 台州国强建设网站百度推广平台登录网址
  • 上海网站开发有限公司免费刷粉网站推广
  • 网站后期维护合同北京百度seo
  • 做h5场景的网站湖人排名最新
  • wordpress限制用户进入页面纯代码seo站群优化
  • 免费建设网站平台seo网络推广怎么做
  • 辽宁工程新希望官网seo优化师
  • 襄阳网站推广优化技巧抖音推广网站
  • wordpress论坛模版网站优化推广怎么做
  • dede无法一键更新网站湛江seo网站管理
  • 备案ip 查询网站查询网站查询系统深圳网络优化推广公司
  • 和网站建设相关的行业2023年新闻热点事件
  • 做网站选用什么域名比较好网络整合营销理论
  • 台山网站开发网络培训心得体会
  • 湘潭做网站 磐石网络很专业青岛谷歌seo
  • 苏州行业网站建设费用惠州关键词排名提升
  • 汽车之家官网首页网页版seo优化培训公司
  • 做电力招聘的有哪些网站推广产品吸引人的句子
  • 遥控器外壳设计网站推荐百度一下首页网页手机版
  • 响应式网站开发工具企业查询信息平台