E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
#Verilog
HDLBits
Verilog
编程题127 存水放水状态机
HDLBits存水放水状态机-Exams/ece2412013q4状态转换图原题链接:https://hdlbits.01xz.net/wiki/Exams/ece241_2013_q4说明:水位在S1下(S1,S2,S3=0):fr1,fr2,fr3,dfr=1;水位在S2和S1之间(S1=1,S2,S3=0):fr1,fr2=1;水位在S3和S2之间(S1,S2=1,S3=0):fr1=1;水
Utopia_sy
·
2020-08-23 05:16
Verilog
HDLBits
Verilog
编程题136\137 串行数据接收状态机
串行数据接收状态机136:串行数据接收Serialreceiveranddatapath(fsm_serialdata)137:奇校验串行数据接收Serialreceiverwithparitychecking(Fsmserialdp)前一道题(135.Serialreceiver),不用记录数据,只输出接收完成标志done,只要把136中数据存储输出部分删除即可,因此这里不再赘述。136:串行数
Utopia_sy
·
2020-08-23 05:16
Verilog
HDLBits
Verilog
编程题134 PS/2数据传输状态机
PS/2packetparseranddatatpath当输入数据的in[7:0]的bit[3]=1时,开始接收数据;一次接收3字节的数据,存入输出out_bytes[23:0],并使能接收完成done=1。状态转换图说明:现态state_c=Done时,若接收数据的bit[3]=1,则接收下一次的3字节数;若bit[3]=0则重新接收数据。moduletop_module(inputclk,in
Utopia_sy
·
2020-08-23 05:16
Verilog
HDLBits
Verilog
编程题139 Mealy状态机时序检测设计
Mearly状态机时序检测设计139.Exams/ece2412013q8(Q8:DesignaMealyFSM)原题:ImplementaMealy-typefinitestatemachinethatrecognizesthesequence“101”onaninputsignalnamedx.YourFSMshouldhaveanoutputsignal,z,thatisassertedto
Utopia_sy
·
2020-08-23 05:16
Verilog
【
verilog
】四、数据流建模
-连续赋值语句:
Verilog
数据流建模的基本语句,用于对线网进行赋值。
JifengZ9
·
2020-08-23 05:37
verilog
FPGA学习路线
一、入门首先要掌握HDL(HDL=
verilog
+VHDL)。第一句话
Jerry·pi
·
2020-08-23 05:05
FPGA
verilog
层次调用
Verilog
HDL:CreatingaHierarchicalDesignThisexampledescribeshowtocreateahierarchicaldesignusing
Verilog
HDL.Thefiletop_ver.visthetoplevel
JackyTode
·
2020-08-23 04:33
FPGA
Verilog
综合练习 电子钟的实现
此次试验为我们的一次课程练习,仅供参考。所用硬件为老师基于MAXll系列EMP240T100C5芯片设计的电路板,包含振荡器、64个发光二极管、按钮,4个七段译码显示器等相关器件。要求编写程序完成电子钟功能。程序接口:pin_50,pin_51,未用。CP,振荡器脉冲输入。RST,Ch,Cm,三个按钮这里设计为复位校时校分。Hc,未用。wire[7:0]Sh,Sl,用于控制60个发光二极管显示秒针
Glasier
·
2020-08-23 04:26
可综合的
verilog
语法
(1)所有综合工具都支持的结构:always,assign,begin,end,case,wire,tri,aupply0,supply1,reg,integer,default,for,function,and,nand,or,nor,xor,xnor,buf,not,bufif0,bufif1,notif0,notif1,if,inout,input,instantitation,module
CraftinA
·
2020-08-23 04:10
Verilog
工具
arrays
output
module
integer
input
Verilog
专题(三十七)DEBUG专题
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page题目一(MUX)moduletop_module(inputsel,input[7:0]a,input[7:0]b,outputout);assignout=(~sel&a)|(sel&b);endmodule我的修正(一)moduletop_module(inputsel,input[7:0]
Andy_ICer
·
2020-08-23 04:31
HDLBits_Verilog
Verilog
专题(三十六)多功能Timer设计
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page本题是一组系列题(5题)的最后一题,从移位器、计数器、序列检测器、状态机到最后多功能Timer设计,前面的题目比较简单,所以这一系列的题目就只放最后一题。题目创建一个计时器:①当检测到特定模式(1101)时启动;②再移4位以确定延迟时间;③等待计数器完成计数,然后通知用户并等待用户确认计时器。当接收到
Andy_ICer
·
2020-08-23 04:31
HDLBits_Verilog
HDLBits系列汇总(
Verilog
专题)
这个网站的题目还是很适合练习
verilog
,每次看都有新的体会,也有很多经典的题目也是面试要手撕的题目,希望能有所帮助。
Andy_ICer
·
2020-08-23 04:31
HDLBits_Verilog
Verilog
专题(三十四)两输入的Mealy状态机
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page题目考虑输入为s和w的有限状态机,假定FSM以称为A的复位状态开始。只要s=0,FSM就会保持状态A,而当s=1时,FSM会进入状态B。一旦进入状态B,FSM就会在接下来的三个时钟周期中检查输入w的值,如果恰好在这些时钟周期中的两个时钟周期中w=1,则FSM必须在下一个时钟周期中将输出z设置为1,否则
Andy_ICer
·
2020-08-23 04:31
HDLBits_Verilog
Verilog
专题(三十八)根据波形写电路(十道题)
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page题目一moduletop_module(inputa,inputb,outputq);//assignq=0;//Fixmeendmodule我的设计(一)moduletop_module(inputa,inputb,outputq);// assign q = a&b; endmodu
Andy_ICer
·
2020-08-23 04:31
HDLBits_Verilog
Verilog
专题(三十三)用两种形式的状态机(Mealy & Moore)实现补码(2‘s complementer)功能
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page题目设计一个单输入单输出串行的补码状态机。输入(x)是一系列数字(每个时钟周期一个),从数字的最低有效位开始,而输出(Z)是输入的补码。状态机将接受任意长度的输入数字,该电路需要异步复位,转换在释放复位时开始,并在激活复位时停止。ModuleDeclarationmoduletop_module(in
Andy_ICer
·
2020-08-23 04:30
HDLBits_Verilog
verilog
和system
verilog
的Timing Check Tasks
FormalDefinitionTimingCheckTasksareforverificationoftimingpropertiesofdesignsandforreportingtimingviolations.Completedescription:LanguageReferenceManualsection§14.5.SimplifiedSyntax$setup(data_event,r
Augusdi
·
2020-08-23 04:00
IC
Verilog
专题(十)边沿检测电路设计
1、上升沿检测电路题目:对于8位向量中的每个位,检测输入信号何时从一个时钟周期的0变为下一个时钟周期的1(类似于上升沿检测)。应在从0到1的跳变发生后的周期内设置输出位。以下为例子,为了清楚起见,分别显示了in[1]和pedge[1]。moduletop_module(inputclk,input[7:0]in,outputreg[7:0]pedge);reg[7:0]d_last;always@
Andy_ICer
·
2020-08-23 04:59
HDLBits_Verilog
常用电路模块
Verilog
专题(二十一)经典水库题目
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page题目Alsoincludeanactive-highsynchronousresetthatresetsthestatemachinetoastateequivalenttoifthewaterlevelhadbeenlowforalongtime(nosensorsasserted,andallfo
Andy_ICer
·
2020-08-23 04:59
HDLBits_Verilog
Verilog
专题(五)细说for与generate-for
Verilog
HDL是一种硬件描述语言,如果期望在代码中实现,则需要EDA工具将其翻译成基本的门逻辑,而在硬件电路中并没有循环电路的原型,因此在使用循环语句时要十分小心,必须时刻注意其可综合性。
Andy_ICer
·
2020-08-23 04:59
HDLBits_Verilog
Verilog
专题(四)组合逻辑中的for循环与generate-for
前言对于
verilog
的学习,这里推荐一个比较好的实践网站HDLBits:https://hdlbits.01xz.net/wiki/Main_Page本专题记录一些我觉得有价值的题目,希望通过这些题目可以对
Andy_ICer
·
2020-08-23 04:59
HDLBits_Verilog
Verilog
专题(十二)Counter Design
HDLBits网址:https://hdlbits.01xz.net/wiki/Main_Page1、十进制计数器(decadecounter)题目:Buildadecadecounterthatcountsfrom0through9,inclusive,withaperiodof10.Theresetinputissynchronous,andshouldresetthecounterto0.我
Andy_ICer
·
2020-08-23 04:59
HDLBits_Verilog
Verilog
刷题-4-Wire
题目描述输入:in输出:out令输出信号和输入信号一致。代码moduletop_module(inputin,outputout);assignout=in;endmodule结果
醉翁得乐
·
2020-08-23 04:26
Verilog刷题
Verilog
刷题-2-Build a circuit with no inputs and one output. That output should always drive 1
代码moduletop_module(outputone);//Insertyourcodehereassignone=1'b1;endmodule结果这里的warning没啥问题,因为就是题目的要求。
醉翁得乐
·
2020-08-23 04:26
Verilog刷题
Verilog
刷题-17-Vector3
题目描述文字描述Givenseveralinputvectors,concatenatethemtogetherthensplitthemupintoseveraloutputvectors.Therearesix5-bitinputvectors:a,b,c,d,e,andf,foratotalof30bitsofinput.Therearefour8-bitoutputvectors:w,x,
醉翁得乐
·
2020-08-23 04:26
Verilog刷题
Verilog
刷题-3-Zero
代码moduletop_module(outputzero);//Modulebodystartsaftersemicolonassignzero=1'b0;endmodule结果同样,这里的Warning也是题目要求。话说这有点太简单
醉翁得乐
·
2020-08-23 04:26
Verilog刷题
Verilog
刷题-5-Wire4
题目描述文字描述图示:代码moduletop_module(inputa,b,c,outputw,x,y,z);assignw=a;assignx=b;assigny=b;assignz=c;//assign{w,x,y,z}={a,b,b,c};//参考答案endmodule结果
醉翁得乐
·
2020-08-23 04:26
Verilog刷题
HDLbits代码答案(2.4 Procedures & 2.5 More
Verilog
Features)持更
2.
Verilog
Language2.3ProceduresProceduresincludealways,initial,task,andfunctionblocks.Proceduresallowsequentialstatements
Ingrid_学习博
·
2020-08-23 04:27
Verilog
语言之其他功能:组合逻辑for循环和generate生成块for循环
例1:给一个100位的输入向量,颠倒它的位顺序输出只需要将in[0]赋值给out[99]、in[1]赋值给out[98]......也可以直接用for循环,其规范格式如下:for(循环变量赋初值;循环执行条件;循环变量增值)循环体语句块;通过for循环赋值很方便:moduletop_module(input[99:0]in,outputreg[99:0]out);always@(*)beginfo
早睡身体好~
·
2020-08-23 04:53
HDLBits
HDLbits答案更新系列目录(直达答案链接)
HDLbits网站题目链接1GettingStarted1.1GettingStarted(Stepone)1.2OutputZero(Zero)2
Verilog
Language2.1Basics2.1.1Simplewire
wangkai_2019
·
2020-08-23 04:09
HDLbits答案更新系列4(2
Verilog
Language 2.5 More
Verilog
Features)
目录2.5More
Verilog
Features2.5.1Conditionalternaryoperator(Conditional)2.5.2Reductionoperators(Reduction
wangkai_2019
·
2020-08-23 04:38
HDLbits答案更新系列1(1 Getting Started 2
Verilog
Language 2.1 Basics 2.2 Vectors)
目录前言1GettingStarted1.1GettingStarted(Stepone)1.2OutputZero(Zero)2
Verilog
Language2.1Basics2.1.1Simplewire
wangkai_2019
·
2020-08-23 04:37
HDLbits答案更新系列2(2
Verilog
Language 2.3 Module: Hierarchy)
目录前言2.3Module:Hierarchy2.3.1Modules(Module)2.3.2Connectingportsbyposition(Modulepos)2.3.3Connectingportsbyname(Modulename)2.3.4Threemodules(Moduleshift)2.3.5Modulesandvectors(Moduleshift8)2.3.6Adder1(
wangkai_2019
·
2020-08-23 04:37
HDLbits答案更新系列3(2
Verilog
Language 2.4 Procedures)
目录前言2.4Procedure2.4.1Alwaysblocks(combination)(Alwaysblock1)2.4.2Alwaysblocks(clocked)(Alwaysblock2)2.4.3Ifstatement(Alwaysif)2.4.4Ifstatementlatches(Alwaysif2)2.4.5Casestatement(Alwayscase)2.4.6Prior
wangkai_2019
·
2020-08-23 04:37
FPGA UART发送与接收
背景最近刚开始接触FPGA,在大概看了基本教材学习了
Verilog
后就买了一块黑金的开发板,开始正儿八经的撸代码。
萧长生
·
2020-08-23 04:54
HDLBits 系列(19) 12小时时钟的
Verilog
设计
目录背景原题复现审题我的设计设计解释欢迎加入背景这篇博客设计一个12小时的时钟,通过例化4bitBCD码计数器来设计,如果你给予的时钟周期是1s,则能够当做时钟来用哦。原题复现原题如下:Createasetofcounterssuitableforuseasa12-hourclock(witham/pmindicator).Yourcountersareclockedbyafast-running
李锐博恩
·
2020-08-23 04:10
#
HDLBits
HDLBits
Verilog
编程题128-131 Lemmings系列游戏状态机
HDLBitsLemmings系列游戏状态机Lemmings1Lemmings2Lemmings3Lemmings4为直观易于理解,状态机采用三段式写法,每个转移条件单独给出。输出需使用逻辑电路,使用时序电路会比参考波形晚一个时钟周期。注意:在设计状态机时需要充分考虑转换条件和优先级问题。链接:https://hdlbits.01xz.net/wiki/Lemmings1Lemmings1当前进方
Utopia_sy
·
2020-08-23 04:08
Verilog
数字电路设计自动化作业—1
数字电路设计自动化作业—11、七人投票表决电路
Verilog
代码如下:modulevote_7(input[6:0]Vote,inputReset,outputPass);integeri;reg[2:
GitHDL
·
2020-08-23 04:04
HDLBits刷题合集—1 入门篇
刚开始接触数字逻辑设计时,你可能会感到不知所措,因为你需要同时学习新的概念、新的硬件描述语言(例如
Verilog
)、几个新的软件包,通常还有一个FPGA板。
GitHDL
·
2020-08-23 04:32
HDLBits
Verilog
刷题-12-Vector0
题目描述文字描述Buildacircuitthathasone3-bitinput,thenoutputsthesamevector,andalsosplitsitintothreeseparate1-bitoutputs.Connectoutputo0totheinputvector’sposition0,o1toposition1,etc.一句话,就是看下面图示。图示代码moduletop_m
醉翁得乐
·
2020-08-23 04:31
Verilog刷题
HDLbits代码答案(2.2Vectors & 2.3Modules: Hierarchy)持更
附HDLBits官网:https://hdlbits.01xz.net/wiki/Problem_sets#
Verilog
_Language
Verilog
LanguageVectors①Vectors/
Ingrid_学习博
·
2020-08-23 04:52
HDLBits——Vectors
本人持续更新HDLBits其他题目,详细讲解我们使用
Verilog
编程时会遇到的各种错误,若有兴趣可以移步我的博客中心浏览本人的其他文章,感谢赏光!
hdubiggod
·
2020-08-23 04:01
FPGA/Verilog
verilog
fpga
嵌入式
12.
verilog
SV 加减乘除四舍五入问题总结
对于int型的数据正常打印时就会进行四舍五入。对于加减乘除:只要有小数(等式左边有小数出现)就会对结果进行四舍五入。如果等式左边是表达式那么除以1.0不会对结果进行四舍五入。而是直接将小数部分舍弃。而乘以1.0可以正常进行四舍五入计算。对于除法如果除数和被除数都是整数则结果舍弃小数部分。所以要想对数据进行四舍五入,就在等式左边乘以1.0即可。2019.06.12更新发现在乘以1.0的时候最好把1.
zyn1347806
·
2020-08-23 00:44
verilog
Verilog
有符号数 signed
在
Verilog
里面,可以使用有符号数据进行运算,定义时使用signed,例如regsigned[7:0]adder;//定义了一个reg型有符号8位变量adder在
Verilog
中,数据是以补码形式存储的
阿宝max
·
2020-08-23 00:52
计算机基础
Verilog
Verilog
RTL
signed
有符号数
数值运算
Verilog
实现整数与小数部分的二进制转化为十进制
最近在做进制转化的FPGA实现,用到了FPGA的串口通信功能,首先将二进制数值(32定点数,末16位代表小数)由PC写入串口小助手,传给FPGA,再将转化后的结果由串口传到PC端显示,整体的过程比较简单,这部分以后再讲,今天主要来讲讲小数部分的二进制转十进制。首先关于整数部分的进制转化最常用的是移位加3算法,具体的实现过程如下:1.将二进制码左移一位(或者乘2)2.找到左移后的码所对应的个,十,百
xuanwo11
·
2020-08-23 00:33
System
Verilog
----关于foreach
foreach结构指定在数组元素上的迭代。它的自变量是一个指明任意类型数组(固定尺寸的、动态的、及联合数组)的标识符,然后紧跟着一个包围在方括号内的循环变量的列表。每一个循环变量对应于数组的某一维。foreach结构类似于一个使用数组范围替代一个表达式来指定重复次数的repeat循环。例子:CopyCodestringwords[2]={"hello","world"};intprod[1:8][
xavi_siege
·
2020-08-22 23:44
SystemVerilog
System
Verilog
--关于force用法
逻辑在具体实现上是通过2个计数器来控制100ms的计时控制,具体如下:定义计数器A(取值范围在0~9),计数器B(取值范围0~38399),且计数器B的启动是在计数器A取值为9时才开始,而计数器A的计数条件为模块端口输入的10ms同步信号。在Netlist仿真中验证这个100ms能量统计时,如果基于Netlist仿真真实的100ms需要很长的时间(以周为时间单位了),为了达到测试的目的,直接将逻辑
xavi_siege
·
2020-08-22 23:14
SystemVerilog
system
verilog
学习笔记---coding style
1.定义一个系统级的config类,如syscfg.在类中集中了所有的控制变量(总开关),这些变量决定了是否允许randomize,errorinjection,delayinjection,产生包的个数,等等这样可以有效的消除一些不必要的callback。一般callback只是用于将某段代码开放给后面的维护人员以便进行一些复杂的修改之用。Callbackmethodsareatransacto
xavi_siege
·
2020-08-22 23:14
SystemVerilog
扩展
interface
命令提示符
callback
Verilog
中 wire 和 reg 数据类型区别
在
Verilog
中,wire永远是wire,就是相当于一条连线,用来连接电路,不能存储数据,无驱动能力,是组合逻辑,只能在assign左侧赋值,不能在always@中赋值;但reg可以综合成register
长弓的坚持
·
2020-08-22 23:28
verilog
中参数传递与参数定义中#的作用
[转]
verilog
中参数传递与参数定义中#的作用https://www.cnblogs.com/uiojhi/p/7844879.html一、module内部有效的定义用parameter来定义一个标志符代表一个常量
岁月传奇
·
2020-08-22 23:26
FPGA
verilog
语法实例学习(2)
Verilog
中的信号类型线网类型线网类型表示一个或多个门或者其它类型的信号源驱动的硬件连线。如果没有驱动源,则线网的默认值为z。
weixin_34360651
·
2020-08-22 23:22
上一页
80
81
82
83
84
85
86
87
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他