6/13/2023 0 Comments Negedge detector verilog code![]() ![]() Just start drawing state diagrams for recognizers for the sequences individually, then look for common sub-sequences and valid end states as you try to combine them into one master state machine. It should be solvable pretty much by inspection, without requiring all of the formalism described above. Your problem is a vastly simplified version of that - only two symbols and just two fixed sequences that need to be recognized. The DFA can be described by a table of state transitions that drives a relatively simple and efficient interpreter. There's a whole process that involves writing a formal grammar for the sequences to be recognized, converting that grammar first to a NFA (nondeterministic finite automaton) and then to a DFA (deterministic finite automaton). It's actually a huge topic in software, where an input grammar needs to be broken into meaningful tokens as efficiently as possible. Recognizing a sequence of symbols is known as "lexical analysis", or more colloquially, "scanning" or "lexing". Can anyone spot the error in my FSM or code? I would really appreciate any input on what I may be doing wrong! Thanks ![]() I've attached my implementation below, but what I am seeing is that for both FSMs, z is asserted one cycle too early. The problem statement is for z to be asserted high after x has been high for 2 cycles. I wrote a program for a '11' sequence detector to be implemented by both Moore and Mealy machine.
0 Comments
Leave a Reply. |