网站首页 > 基础教程 正文
本文介绍状态机和使用verilog实现的三种方式,若有错误之处,欢迎指出,感谢。
主要内容|
状态机简介
Introduction to State Machines
三种方式和编码
Three ways and coding
状态机的置位和复位
Set and reset the state machine
壹
状态机简介
状态机分为moore和mealy型,二者不同在于输出仅由前一个状态影响还是由前一个状态和输入信号影响,画出状态转移图然后再写出状态机。
The state machine is divided into moore and mealy types. The difference between the two is that the output is only affected by the previous state or by the previous state and the input signal. Draw the state transition diagram and then write the state machine.
贰
三种方式和编码
编码常用二进制码,格雷码(相邻两个状态的编码只有一位不同),独热码(仅仅检测单独的一位就可以确定当前的状态):
Commonly used binary code for encoding, Gray code (only one bit is different in the encoding of two adjacent states), one-hot code (only one single bit can be detected to determine the current state):
方式分为一,二,三段式:
一段式:仅用一个always,将状态寄存器,组合逻辑,以及输出得到。
The method is divided into one, two and three sections:
One-segment: use only one always, get the status register, combinational logic, and output.
二段式:一个always用作状态寄存器,另一个得到每个状态的组合逻辑和输出。
Two-stage: one is always used as a state register, and the other gets the combinatorial logic and output of each state.
三段式:则用三个always将三个功能的分开。
Three-stage: use three always to separate the three functions.
叁
状态机的置位和复位
同步:与时钟有关,当置位或复位信号到来时需要等待时钟信号到来才可以进行操作。
Synchronization: It is related to the clock. When the set or reset signal arrives, it needs to wait for the arrival of the clock signal before the operation can be performed.
异步:与时钟无关,当置位或复位信号到来理解进行对应操作。
Asynchronous: independent of the clock, when the set or reset signal arrives, the corresponding operation is performed.
参考资料:
《Verilog数字系统设计教程》作者:夏宇闻
百度
翻译:谷歌翻译
猜你喜欢
- 2024-10-31 硬件描述语言 硬件描述语言verilog
- 2024-10-31 verilog快速入门之例五 verilog从入门到精通
- 2024-10-31 verilog实例(五) verilog技巧
- 2024-10-31 大规模数模混合电路建模验证分析:理论,方法,工具
- 2024-10-31 国内芯片人才培养问题凸显,IC修真院到底在教什么?
- 2024-10-31 Hello FPGA! Verilog的语法1 fpga hello world
- 2024-10-31 终于讲清楚了,看完这篇你也可以设计CPU了
- 2024-10-31 verilog实例(四) verilog程序实例
- 2024-10-31 你真的理解Verilog 中的module吗?
- 2024-10-31 「课程上新5.9折」Verilog基础与典型数字电路的设计
- 最近发表
- 标签列表
-
- jsp (69)
- gitpush (78)
- gitreset (66)
- python字典 (67)
- dockercp (63)
- gitclone命令 (63)
- dockersave (62)
- linux命令大全 (65)
- pythonif (86)
- location.href (69)
- dockerexec (65)
- tail-f (79)
- queryselectorall (63)
- location.search (79)
- bootstrap教程 (74)
- 单例 (62)
- linuxgzip (68)
- 字符串连接 (73)
- html标签 (69)
- c++初始化列表 (64)
- mysqlinnodbmyisam区别 (63)
- arraylistadd (66)
- mysqldatesub函数 (63)
- window10java环境变量设置 (66)
- c++虚函数和纯虚函数的区别 (66)