当前位置:网站首页>序列检测器
序列检测器
2022-06-29 17:12:00 【长水曰天】
此处用“11010”序列检测器来举例。
序列检测器就是将一个指定的序列从数字码流中检测出来,当输入端出现序列11010时,输出为1,否则输出为0。在此不考虑重复序列,即出现指定序列后就重新开始序列检测,不再考虑以前的数据。
该序列检测器的状态转移图如下图所示:

代码如下:
module seqdet(D_out, D_in, rst_n, clk);
parameter IDLE = 3'b0, A = 3'b1, B = 3'b2, C = 3'b3, D = 3'b4, E = 3'b5;
output D_out;
input D_in, rst_n, clk;
reg[2:0]state, next_state;
wire D_out;
assign D_out = (state == E)?1:0;
[email protected](state or D_in)
case(state)
IDLE:if(D_in)
next_state = A;
else
next_state = IDLE;
A:if(D_in)
next_state = B;
else
next_state = IDLE;
B:if(D_in)
next_state = B;
else
next_state = C;
C:if(D_in)
next_state = D;
else
next_state = IDLE;
D:if(D_in)
next_state = B;
else
next_state = E;
E:if(D_in)
next_state = IDLE;
else
next_state = A;
default: next_state = IDLE;
endcase
[email protected](posedge clk)
state <= next_state;
endmodule
可以看到,当到达E状态时,11010序列检测完成,同时D_out输出1。接下来若检测到1则转到A状态继续进行下一个序列的检测,若检测到0则返回IDLE状态等待。
边栏推荐
- 从居家办公中感悟适配器模式 | 社区征文
- 微信小程序开发储备知识
- C comparison of the performance of dapper efcore sqlsugar FreeSQL hisql sqlserver, an ORM framework at home and abroad
- InheritableThreadLocal 在线程池中进行父子线程间消息传递出现消息丢失的解析
- After eight years of testing and opening experience and interview with 28K company, hematemesis sorted out high-frequency interview questions and answers
- How to use interrupt
- Kubernetes deployment dashboard (Web UI management interface)
- KUKA子程序/函数怎么建立和使用方法
- C language microblog user management system
- 机器学习7-支持向量机
猜你喜欢

Fluent的msh格式网格学习

SLAM中的子图

Word2vec vector model of Wiki Chinese corpus based on deep learning

【 OpenGL 】 Random Talk 1. The camera rotates around a point in the space by dragging the mouse

Real test = "half product + Half development"?

最高81.98%!超百所“双一流”高校本科深造率公布

@Difference between component and @configuration

腾讯云发布CDW ClickHouse升级版,为海量数据实时分析场景提供极速体验

Calibration of binocular camera based on OpenCV

About xampp unable to start MySQL database
随机推荐
What role does the supply chain management system play in the supply chain scenario?
「科普大佬说」AI与创造力
controller、service、dao之间的关系
ICML 2022 | transferable imitation learning method based on decoupling gradient optimization
Paper notes: e (n) equivariant graph neural networks
Viewing splitchunks code segmentation from MPX resource construction optimization
A simple but scalable feature normalization method
腾讯云发布自动化交付和运维产品Orbit,推动企业应用全面云原生化
C语言练习----指针字符串、链表
广发易淘金和东方财富哪个更好,更安全一些
Problem solving metauniverse, multi communication scheme in online games
“授权同意”落地压力大?隐私计算提供一种可能的合规“技术解”
InheritableThreadLocal 在线程池中进行父子线程间消息传递出现消息丢失的解析
元代理模型可迁移对抗攻击
A user level thread library based on C language
英联邦国家有哪些
SpingMVC请求和响应
High landing pressure of "authorization and consent"? Privacy computing provides a possible compliance "technical solution"
c# 国内外ORM 框架 dapper efcore sqlsugar freesql hisql sqlserver数据常规插入测试性能对比
[R language data science]: Text Mining (taking Trump's tweet data as an example)