Questions tagged [state-machines]

A finite state machine (or state machine) is a very generic term for any process (electronic or otherwise) whose output is not simply a function of its current inputs, but also depends on its past history. In other words, it has "memory", or internal state information.

Filter by
Sorted by
Tagged with
6
votes
3answers
297 views

How can I convert a 4-digit BCD number to Binary in hardware? (using 74LS ICs and GAL22V10 ICs)

As the title suggests, I need to convert a 4-digit BCD number to binary. I am aware of the doubble-dabble algorithm (https://en.wikipedia.org/wiki/Double_dabble), and that if you use it backwards you ...
1
vote
0answers
40 views

Problem with designing finite state machine

I'm learning now finite state machines and I'm stuck with this exercise from a book "Digital Design and Computer Architecture" by David and Sarah Harris: First I tried to solve it without ...
2
votes
1answer
116 views

Why should we not change inputs to a sequential circuit (Moore machine) at the clock edge?

The code included here takes a bit stream of binary digits, Least Significant Bit (LSB) first, and outputs the two's complement of the complete stream, also LSB first. A Moore State diagram is ...
0
votes
1answer
42 views

Is state machine based sequence detector easier to verify than shift register based one?

Suppose I have two versions of sequence detectors: one is based on let's say Moore machine and the other one is based on simple shift register & comparator. Which one among these is easy to verify ...
0
votes
2answers
45 views

Can FSMs be Timed and Recursive?

I am reading a textbook Circuit Design with VHDL, 3rd Edition by Volnei Pedroni. There, he claims that there exist 3 categories of finite-state machines - namely, regular, timed (where the output ...
1
vote
2answers
56 views

Designing a Combination Lock FSM: Converting State Diagram to Logic Gates

I am trying to design a Synchronous combination lock for my digital logic class. I have the state diagram, as I understand how to draw out the logic which I want to follow. However, I am struggling to ...
0
votes
2answers
69 views

Converting momentary button presses to states

The goal is to implement a circuit in hardware with 2 inputs (A, B) and 2 outputs (A On, B On). An input (button press) toggles it's respective output, but also turns off the other output. State ...
0
votes
0answers
63 views

finite state machine explanation

Could someone explain this finite state machine? Also is this type of finite state machine Moore or Mealy? According to my understanding... The initial state is S0. If the input at this state for u=0 ...
0
votes
2answers
68 views

Potential risk of state machines [closed]

What are the potential risks when implementing a 12-states ?First of all I will need then 4 flip flops to draw my circuit giving a total of 16 states machines meaning that 4 states will be unused . ...
0
votes
2answers
50 views

Systematic ways to design a finite automaton whose input-output function or relation is a given one? [closed]

Given a function or relation, are there some systematic ways to design a finite automaton whose input-output function or relation is the given function or relation, assuming there is at least one such ...
0
votes
2answers
261 views

'1011' Overlapping (Moore) Sequence Detector in Verilog

I'm designing a "1011" overlapping sequence detector, using Moore Model in Verilog . The FSM that I am trying to implement is as shown below :- Verilog Module :- ...
4
votes
1answer
1k views

'1011' Overlapping (Mealy) Sequence Detector in Verilog

I'm designing a "1011" overlapping sequence detector,using Mealy Model in Verilog. The FSM that I'm trying to implement is as shown below :- Verilog Module :- ...
0
votes
0answers
31 views

What would be the ASMD chart (or State Transistion diagram) for the UART transmitter?

Here is the diagram of the UART design. I am trying to write a SystemVerilog code from the ASMD chart of the UART transmitter. I have done the the UART receiver ASMD chart below. I know that the ...
-1
votes
1answer
50 views

Verilog state machine not as expected

I have a simple problem, but not able to debug. I am not a novice in Verilog, but this problem seems surreal and weird. I have tried all I could to debug, but still cannot figure it out, so sking for ...
-2
votes
4answers
70 views

What is a “finite-state machine” and what are its use cases?

On Wikipedia, a finite state machine is defined as "any device storing the status of something at a given time." However, I don't see how other components, such as logic gates, flip flops, or ...
-1
votes
2answers
35 views

Test Verilog FSM for state with no reset

My professor gave us several Verilog test files to write Verilog test benches for. In the test bench, we're supposed to initialize the state to 0, apply random inputs, and check to see if we have ...
0
votes
1answer
45 views

Having trouble with deriving the state diagram for an exam problem

The Problem: Derive the state diagram for a circuit that takes one input, A and gives out one output X, X is to be one, if and only if it detects a sequence "101" in A. Understanding The problem: if ...
0
votes
2answers
267 views

Designing a Moore sequence detector using three always blocks

Trying to implementing a Moore state machine using three always blocks. The Moore state machine has two inputs (ain[1:0]) and one output (yout). The output yout begins as 0 and remains a constant ...
0
votes
1answer
146 views

State Table & Karnaugh-map for Finite State Machine

I am trying to create a Finite State Machine that is able to check if a number string is valid. For example, it would accept 3, 4.65 or 8.93e-10. So far I have created a transition table for the ...
0
votes
2answers
75 views

Determining FSM states hint

I want to get the idea behind determining states of a FSM. I would appreciate a hint for the following problem as to where to look for the states. "A FSM should send out a signal to open a door. If ...
0
votes
2answers
153 views

Why does it take 2 clock cycles to move to the RESET state in my state machine?

I'm writing a finite sequence encoder in Verilog. Basically, an output Z will be activated if the input W is on for at least four clock cycles, or if its off for at least 4 clock cycles. See the ...
0
votes
1answer
75 views

Verilog code: how do I make the state transitions instantaneous?

I have the following Verilog code to implement ...
0
votes
0answers
32 views

Digital Circuits - clocked synchronous sequintal circuit ANALYSIS

i reached out to the final stage in solution . But i did not figure out what exactly wanted in homework “Assume that the machine is in state 00 and the output is also 0. Write the shortest ...
1
vote
2answers
65 views

Median Filter FSM Modelling

I'm trying to build a median filter in Verilog using a comparator to sort out the highest pixel value and erase it, then sort out the next highest etc. until I have only 5 pixels left (I'm treating ...
0
votes
1answer
109 views

What kind of FSM is it, if outputs depend on internally generated signals?

The classical definitions are that in a Moore machine the outputs depend only on the state, while in a Mealy machine they are also allowed to depend on inputs. But what if outputs and/or state ...
3
votes
1answer
91 views

Attach output to a state in Finite State Machine in VHDL

In my digital electronics class we are currently dealing with Finite-State-Machines and VHDL. I have written a VHDL-code for finite state machine and I've run into trouble. I want to attach the ...
5
votes
3answers
840 views

State Machine with D Flip Flops; how to deal with race conditions

Consider a state machine whose entire state is kept in a collection of edge-triggered D flip-flops. The outputs of these are fed into a combinatorial network which fully determines the next state, and ...
0
votes
1answer
56 views

Two questions about testing with HDL designer

I hope it's okay to ask about specific programs here. I have successfully created a test bench with HDL designer, and I use Modelsim to simulate. By pressing the Modelsim icon and selecting "through ...
0
votes
0answers
73 views

Implementing Moores or Mealys State Machine to display different numbers in 4-Digit 7-Segment Display using VHDL

Ok so i am here again, i posted this question some hours earlier and the answer was to use a state machine in order to achieve it. Now the the question is how do i implement it. I would like it to use ...
0
votes
1answer
137 views

Starting and stopping of a Mod N Counter for a FSM in Logisim

I'm working on a circuit for control logic. I'm using a 3 bit down counter. There is a control signal that when it goes high starts the counter by presetting it with a value of 5. The counter is ...
0
votes
1answer
45 views

SystemVerilog FSM not working correctly

So, I was trying to create an FSM for my module which supposed to control five sensors. I thought I did it, but when I synthesized it, I saw that the code is synthesized as bunch of buffers and ...
2
votes
2answers
259 views

Finite State Machine and Reset Signal

let's consider a certain finite state machine, for instance a Mealy Machine: I was told that it cannot work properly in absence of a reset signal (for the State Register), since we would not know the ...
0
votes
1answer
56 views

Designing a counter

I want to design a counter which doesn't increments value every rising clock pulse(assuming positive edge triggered). Say I have a FSM which has 4 states . Only after traversing of the 4 states , I ...
1
vote
1answer
195 views

Why doesn't my verilog state machine toggle state?

I have written a state machine in Verilog. However, when I try to simulate it with my testbench, it does not advance from the STATUS_IDLE state to the STATUS_READY state. Why isn't the state machine ...
0
votes
1answer
49 views

Finite state machine inputs

if a finite state machine has 5 input signals A, B, C, D, E Does this mean there must be 2⁵ inputs along with the state built into the logic?
0
votes
1answer
75 views

Implementing Bellman-Ford algorithm on finite state machine [closed]

I wanted to ask whether it is even possible to implement the Bellman-Ford algorithm on a finite state machine. How can you determine whether a machine will have a finite number of states or not? ...
0
votes
1answer
237 views

Moore machine state diagram and state table

Is it me not understanding this table and diagram or something? If in a Moore machine, the output only depends on the current state Then why does the table for states F and H say the output is ...
0
votes
0answers
38 views

Identifying Moore machine from state diagram

i am just learning about state machines. I wanted to ask, if in a moore machine the output depends only on the current state, how can i identify this from a state diagram? $$\begin{array}{ccc|ccc} S0&...
1
vote
1answer
99 views

Moore machine for LED display

I want to know if my understanding of this state machine diagram is correct. The input is connected to a toggle: 0001,1 <- This 1 represent toggling the input Initially, when the circuit powers ...
0
votes
1answer
37 views

Mealy machine state transition

I'm currently learning about mealy machines and I'm slightly confused. If I am at state 00 and transition to state 01 indicated by the arrow. On the weighting on the arrow, the top refers to an input ...
0
votes
1answer
97 views

Boolean expressions from Bubble Diagram for D-flip flop entries

I am supposed to get boolean expressions for the two D-flip flops involved in this state diagram but I am stuck. I have come up with a truth table (except for output y which I don't understand) for ...
2
votes
2answers
638 views

FSM sequence detector in Verilog

I'm designing a finite state machine (FSM) to detect the sequence "10001" in Verilog. I'm having a similar problem to that described in this question in that my FSM does not tick when the sequence ...
0
votes
1answer
146 views

SystemVerilog Code for a lock combination (Finite State Machines)

I am writing code for a door lock combination. My inputs are b0, b1, b2 and b3, which correspond to the buttons to enter the code to unlock a door. The code to unlock this particular door is b2 --> b2 ...
0
votes
1answer
81 views

Can a finite state machine represent every possible discrete deterministic system?

Consider the two following definitions: Discrete Deterministic System: a system where inputs and outputs can have only a finite number of values, and is deterministic; Finite State Machine: an ...
0
votes
1answer
214 views

Finite State Machine Reset Signal FPGA

I've already done the datapath for my system using a synchronous reset and now I have to control everything using state machines. What I'm confused about right now is whether or not the reset signal ...
1
vote
1answer
100 views

outputs from Verilog finite state machine changing very late, possible reasons?

I am working on a finite state machine that is written in Verilog and being simulated in ModelSim. This FSM is for implementation of a SISC processor. In this implementation, we are using arithmetic ...
0
votes
2answers
305 views

Help with designing falling edge detector using a state machine

Using a state machine, I designed a circuit that detects the falling edge of a signal (working with positive edge clock), but my circuit has one more not gate than the circuit shown in this document: ...
2
votes
0answers
36 views

First encounter with State Diagrams

I'm a beginner to all this and have had a little bit of trouble understanding how exactly these tables work outside their base examples. I've made an attempt at drawing a diagram from a table that ...
1
vote
4answers
157 views

Types of finites state machine in FPGA design

There are 2 types of FSM: 1- block of combinational logic + clocked block that hold only the current state 2- clocked block For example, if we take a look to how an SDRAM controller is made, most ...
0
votes
1answer
281 views

I have designed a Mealy FSM, that performs Divide by 5 operation on a binary number. How to implement control signal state for bitstream?

The FSM shown by both the table and state diagram perform Division by 5 on a binary input A. The individual states represent the remainders and the transition outputs are meant to be loaded into ...

1
2 3 4 5