当前位置:网站首页>sequential detector
sequential detector
2022-06-29 17:17:00 【Long water and sky】
This is used here “11010” Sequence detector as an example .
The sequence detector is to detect a specified sequence from the digital code stream , When a sequence appears at the input 11010 when , Output is 1, Otherwise, the output is 0. Repeat sequences are not considered here , That is, the sequence detection will be restarted after the specified sequence appears , No longer consider previous data .
The state transition diagram of the sequence detector is shown in the following figure :

The code is as follows :
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
You can see , When they arrive in E In the state of ,11010 Sequence detection completed , meanwhile D_out Output 1. Next, if 1 Go to A The state continues with the next sequence of detection , If... Is detected 0 Then return to IDLE Status waiting .
边栏推荐
- c# 国内外ORM 框架 dapper efcore sqlsugar freesql hisql sqlserver数据常规插入测试性能对比
- Go语言多方式并发实现龟兔赛跑
- 6.25AtCoderABC257E - Addition and Multiplication 2题解
- @Component与@Configuration区别
- 自旋电子学笔记-张曙丰
- 如何在 PowerPoint 中向幻灯片添加 SmartArt?
- 外部自动(PLC启动机器人)
- 如何创建虚拟形象
- Inheritablethreadlocal resolves message loss during message transmission between parent and child threads in the thread pool
- Online text digit recognition list summation tool
猜你喜欢

适合中小企业的项目管理系统有哪些?

Online sql to CSV tool

深圳内推 | 深圳计算科学研究院招聘机器学习助理工程师(校招)

为什么信息化 ≠ 数字化?终于有人讲明白了

A user level thread library based on C language

垃圾收集器

PCB板框的绘制——AD19

函数计算异步任务能力介绍 - 任务触发去重

ICML 2022 | transferable imitation learning method based on decoupling gradient optimization

About xampp unable to start MySQL database
随机推荐
[R language data science]: Text Mining (taking Trump's tweet data as an example)
About Kali using xshell connection
Pancakeswap Technology: development principle of gripper robot system
Development of freedom free agreement pledge mining system
研究所的这些优势真香!上岸率还极高!
使用kalibr标定工具进行单目相机和双目相机的标定
2022 software evaluator examination outline
flink sql rownumber 报错。谁遇到过啊?怎么解决?
KUKA robot external axis configuration what you must know
Viewing splitchunks code segmentation from MPX resource construction optimization
Gradle download slow or unable to download
Mysql中锁的使用场景是什么
Summary of problems during xampp Apache installation
How to establish and use KUKA subroutines / functions
使用kalibr標定工具進行單目相機和雙目相機的標定
【Oracle】基础知识面试题
在供应链场景应用中,供应链管理系统扮演什么角色?
机器人不需要保养和出界也能拿金牌是一样一样的
535. TinyURL 的加密与解密 / 剑指 Offer II 103. 最少的硬币数目
Which is better and safer, GF e-gold or Dongfang fortune