本文介绍了去抖状态图FSM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用有限状态机设计去抖滤波器。 FSM 的行为是它遵循初始输入位并且认为'真实的 输出直到它接收3个相同的位并且它改变输出 连续3位,直到收到接下来的3个连续位。 重置会将FSM设置为输出1s,直到它收到正确的输入和输出正确的。 这是输入和输出正确的测试序列。 1 0 0 1 0 1 0 0 0 1 0 1 1 1(输入) 1 1 1 1 1 1 1 1 0 0 0 0 0 1(输出) 我出现的状态图有6个状态's SEE1,SEE11, SEE111,SEE0,SEE00,SEE000。我在第11位陷入困境,输入为的0。因为它刚刚来自SEE1,而且在SEE1之前,它来自SEE000,因此在SEE1,它无法将输出更改为1,这就是我指示该状态的的输出是。 任何人都知道如何解决这个问题?或者也许还有其他更好的方法来设计状态图? 谢谢, 安森 解决方案 - 显示引用的文字 - 感谢Peter的建议。但我的问题是提出这个FSM的 状态图。我怎样才能实现你在 状态图上的建议?谢谢。 安森 我不确定我理解你的术语,但我是 假设那个状态neames意味着: SEE1 =输出= 0后连续1次输入。 SEE11 =输出= 0连续输入1次后连续2次。 SEE111 =连续3次输入1后输出= 1 (输入0后输入小于3时输入1 连续两次)。 SEE0 =连续1次输入0后输出= 1。 SEE00 =连续2次输入0后输出= 1 SEE000 =输出= 0连续3次输入后 (连续1次输入后输入0小于3 次)。 如果是这种情况,然后12个转换是: 之后输入 SEE1 1 SEE11 SEE1 0 SEE000 SEE11 1 SEE111 SEE11 0 SEE000 SEE111 1 SEE111 SEE111 0 SEE0 SEE0 1 SEE111 SEE0 0 SEE00 SEE00 1 SEE111 SEE00 0 SEE000 SEE000 1 SEE1 SEE000 0 SEE000 I''m designing a debounce filter using Finite State Machine. The FSMbehavior is it follows the inital input bit and thinks that''s realoutput until it receives 3 consecutive same bits and it changes outputto that 3 consecutive bit until next 3 consecutive bits are received.A reset will set the FSM to output 1s until it receives the correctinput and ouput.This is the test sequence with input and correct output.1 0 0 1 0 1 0 0 0 1 0 1 1 1 (input)1 1 1 1 1 1 1 1 0 0 0 0 0 1 (output)The state diagram I came up has 6 states and it''s named SEE1, SEE11,SEE111, SEE0, SEE00, SEE000. I am getting stuck at 11th bit, a 0 inthe input. Because it just came from SEE1 and before SEE1, it camefrom SEE000, so at SEE1 it can not change ouput to 1 which is what Ihave specified that state''s ouput to be.Anyone knows how to solve this problem? Or maybe there''s other betterways to design the state diagram?Thanks,Anson 解决方案- Show quoted text -Thanks Peter for the suggestion. But my problem is coming up with thestate diagram for this FSM. How can I implement what you suggested ona state diagram? Thanks.AnsonI''m not sure I understand your terminology, but I amassuming that that state neames mean:SEE1 = output = 0 after 1 has been input 1 times in a row.SEE11 = output = 0 after 1 has been input 2 times in a row.SEE111 = output = 1 after 1 has been input 3 times in a row(or a 1 is input after 0 has been input less than 3times in a row).SEE0 = output = 1 after 0 has been input 1 times in a row.SEE00 = output = 1 after 0 has been input 2 times in a row.SEE000 = output = 0 after 0 has been input 3 times in a row(or a 0 is input after 1 has been input less than 3times in a row).If this is the case, then the 12 transitions are:before input afterSEE1 1 SEE11SEE1 0 SEE000SEE11 1 SEE111SEE11 0 SEE000SEE111 1 SEE111SEE111 0 SEE0SEE0 1 SEE111SEE0 0 SEE00SEE00 1 SEE111SEE00 0 SEE000SEE000 1 SEE1SEE000 0 SEE000 这篇关于去抖状态图FSM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-09 14:19