Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [state-machines]

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.

0
votes
0answers
26 views

Minimum number of states Moore machine

Why is the minimum number of states 17?
1
vote
1answer
30 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
0answers
17 views

How to design ping pong datapath with logisim & FSM [closed]

I am trying to design a ping pong game on logisim using state machines but i'm kinda newbie to FSM and logisim in general. I know logic(MUXes,Boolean Logic,Karnaugh map and evaluation,gates etc) ...
0
votes
0answers
50 views

Create VHDL Register [on hold]

I have a lab where we are given a 15 bit number. The 15 bit number contains 5 tuples and each tuple is an instruction for a State Machine to implement the ALU we designed previously. We need to take ...
0
votes
2answers
67 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
33 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
94 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
58 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 ...
0
votes
2answers
94 views

How would I finish out this mini project (emitting 1 whenever 101 is read)?

Design a Moore finite state machine that detects 1 0 1 in consecutive digits in the input stream of 0's and 1's received every clock cycle. The circuit should output a 1 when it detects 1 0 1 ...
1
vote
1answer
74 views

One-hot fsm in vhdl

I'd like to code a one-hot fsm in vhdl. I've done many in verilog but my current employer prefers vhdl. In verilog I'd use the "inverse case statement" (case 1'b1) to compare each bit in the state ...
0
votes
1answer
125 views

How to create a state transition table for a Mealy machine

I'm trying to design the counter shown in the diagram below with the counting sequence 123456 (i.e X1=1, X2=2, ...) as a Mealy machine. However, I'm having trouble figuring out how to create the ...
1
vote
1answer
80 views

Digital Logic: What are “hamming code” and “Binary code” state machines?

I'm asked to draw the circuit for a state machine in one hot, hamming code and binary code models. I know what is one hot state machine, but i'm not sure what are the other 2. Google also didn't help. ...
2
votes
2answers
1k views

Finite State Machine FSM

I understand how to make state diagram and make combinational logic (gates) to get a boolean equation for the next state bits and the output bit, but what is the function of ROM here ?
1
vote
0answers
52 views

How do I get the FSM table from the given diagram?

Given one is question and another solution. I cant come to this solution. can anyone help here
0
votes
1answer
142 views

Sequence Detector with multiple inputs

The question: Design an automaton that receives inputs X0, X1 and produces outputs Z0, Z1. Z0 is 1 If the last two bits of X0 are the complement of the last two received on X1. Z1 is 1 If in the ...
1
vote
0answers
37 views

Can we apply state reduction to a state table having more than 1 input?

Consider the following state diagram: I assigned states as follows: a=00 b=01 c=10 d=11 But when I attempted to reduce the table, I realized that: Some present states do have the same next state ...
-1
votes
1answer
95 views

Finite State Machine Minimization

I can't understand how to eliminate the states. I draw this automa and after I create a table of the states (I must minimize it now and after create a minimal table of the states) Is someone who can ...
0
votes
1answer
61 views

Producing a VHDL design unit from a State Diagram

I need help understanding a stateflow diagram. I'm supposed to design it in VHDL as a beginner's exercise. I've gone through the VHDL tutorials on nandland.com, and could say I understand the basics ...
0
votes
2answers
93 views

Calculate number of states in edge triggered flip flops

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops. simulate this circuit – Schematic created using CircuitLab The number ...
1
vote
2answers
283 views

State Machines - What happens to 'Don't Care's in the Output?

This is referencing the article about state machines on allaboutcircuits.com In their state table, they have a 'Don't Care' listed under the output for the state 11. However, in their k-map of the ...
0
votes
1answer
309 views

K-maps, do they completely simplify?

I've been told that K-maps produce a completely simplified boolean equation, and they can't or shouldnt be simplified anymore after that. However, on allaboutcircuits.com they were able to simplify an ...
1
vote
1answer
55 views

In practical FSM next state is function of current state and current inputs, what if next state is function of current and previous state?

A long time ago I came across an interesting FSM in which the next state was a function of current state and previous state, along with the current input values. Here previous state is not the state ...
0
votes
1answer
461 views

Warning!! Latch has unsafe behavior (vhdl)

will the warning affect the output result??? Why is this warning happen? This is my code ...
0
votes
1answer
76 views

Active high, rising edge circuits update state when, exactly?

I'm very new to electrical engineering. On a recent exam, we had a circuit with two JK flip-flops connected in series with one another. The circuit is beside the point, however. Both flip-flops were ...
0
votes
1answer
238 views

State trasnsition diagram for a mealy machine

I created a state Transition diagram for the mealy machine below but I wasn't sure if this is correct. The part that confused me was that s1 has no edges.
1
vote
1answer
53 views

What's wrong with my taillight verilog design?

I'm working on a T-bird car taillight design code, here is my design: B means brake, all lights on at break, when turn left lights on sequence: 000000 -> 001000 ->011000->111000 turn right ...
1
vote
1answer
48 views

Implementing a Mealy Machine in Verilog

I have a piece of code that I don't understand: always_ff @(posedge CLK) state <= RST || ~A[0]===1'bx || ~A[1]===1'bx ? 0 : nextstate; ...
3
votes
1answer
109 views

Deign Finite State Machine - result doesn't look like what I want -vhdl

everyone. I design a Finite State Machine and try to implement it using VHDL, but the result confuses me. I take too much time on this but I still cannot solve this. Could you give me some advice ? ...
2
votes
2answers
1k views

How to send a packet every n clock cycles in verilog?

I am fairly new to Verilog and in general Digital Design. I am working on a project which has a state machine. The module, in a particular state, receives a read request packet from some other module ...
0
votes
1answer
71 views

Getting overly complicated logic functions when designing a state machine, is there any way to simplify them?

I am having a bit of problem when trying to solve a state machine exercise. Basically I am supposed to design lock, when we get the right input in sequence etc it will open. The problem are the ...
0
votes
2answers
4k views

How many flip-flops are required for the implementation of this Mealy diagram?

I'm trying to create a circuit diagram that corresponds to the Mealy diagram I created for the following problem, but I'm not sure how many flip-flops I should use. Problem: A data stream receives ...
1
vote
2answers
117 views

Embedded system task scheduling for data aquisition on a CAN network

I'm struggling with the concept of how to schedule my tasks. My Setup: STM32F103 hooked up on CAN. Taking measurements with a Lidar V3 module comms via I2C, then distributing that measurement on the ...
3
votes
1answer
135 views

When and how to separate Control and Datapaths for hardware designs?

Must we always separate control and datapath during hardware programming? Are there any advantages? If yes then what is the basic methodology followed for this strategy? I am trying to interface an ...
3
votes
3answers
1k views

Moore vs mealy, why the output is delayed in the former?

I am not an engineer (software developer myself) but would like to understand why moore machine output is delayed. I know that in Moore's machine, output depends only on the state, while in Mealy's ...
24
votes
11answers
4k views

VHDL interview question - detecting if a number can be divided by 5 without remainder

I saw a nice interview question for VHDL - build a system that receives a number and detects if it can be divided by 5 without remainder. I tried to solve that with a state machine (I suppose they ...
3
votes
3answers
732 views

How do I eliminate latches in FSM Verilog implementation?

I'm trying to create an FSM that left shifts a register until the MSB is 1 while counting the number of shifts completed. However, I have an issue with latches because I don't re-assign each register ...
0
votes
0answers
41 views

Create state transition diagram of a SSM that will output a “0” until the sequence 0, 1, 0 occurs.

As the title states, I'm trying to draw the state transition diagram of a sequential state machine that will output a "0" until the sequence 0, 1, 0 occurs. After the sequence occurs, the machine ...
1
vote
1answer
332 views

From a state transition table, how do I determine if I'm dealing with a Mealy or Moore machine?

From the state transition table below, how do I know if I'm constructing circuits for a Mealy or a Moore machine? Could someone explain the difference and what I should be looking for?
1
vote
1answer
171 views

Don't Understand the Notation on this State Diagram

This like a simple question, but I can't find a clear answer anywhere. Basically, I am used to seeing and implementing state diagrams that look like this: Where the output and input are in this ...
0
votes
0answers
1k views

Critical Races in Asynchronous Sequential Circuits

I have this flow table: I want to find out all the races in this, and whether they are critical races or not. My solution so far: x1=0, x2=1 and state as c, 2 changes are needed in the secondary ...
0
votes
1answer
79 views

How do you determine what the circuit that determines the next state looks like?

This is a homework question. I've only started to learn about circuits and it's just that I'm completely lost on what the circuit to determine the next state would look like. I'm looking for the ...
0
votes
1answer
557 views

FSM implementation using single always block in Verilog?

So while looking up for material on implementing high level state machines in Verilog I came upon this: I am also trying to implement a high level FSM in Verilog that has a number of nested ...
1
vote
1answer
676 views

Finite State Machine for x/3

I was asked to design a FSM for outputting x/3 without the remainder. This should be implemented using a synchronous system defined as follows: input: on each clock cycle t, one bit x[t] output: on ...
0
votes
2answers
591 views

How can I make the state diagram from the code in Verilog?

How do I draw the state diagram of this state machine?
5
votes
2answers
412 views

Where finite-state machine code belong in µC?

When I learned about micrcontrollers, teachers taught me to always end the code with while(1); with no code inside that loop. This was to be sure that the software ...
0
votes
1answer
121 views

Determining the ROM contents of a circuit

I have a state transition table and a truth table stored in a ROM. The truth table was obtained from the state transition table but I'm not sure how. Could anyone explain how the truth table is ...
0
votes
1answer
54 views

Synchonous finite state machine from output sequence

I'm reviewing for my exam and this questing popped from questions that were previously asked in the exam. Problem is below. Question: I'm totally confused about this, how do I get started? Trial: My ...
0
votes
4answers
920 views

What is state in a sequential circuit?

I understand that the output of a flip flop is also called as the state and the output of the flip flop before the clock pulse is applied is called as present state and after the application of clock ...
-1
votes
0answers
348 views

Nested Interrupts - Design with Finite State Machine

I am developping an event-drive embedded system that will use three kind of interrupts : timer interrupt, SPI interrupt and USART interrupt. I am working with an STM32F7 MCU and the idea is to use the ...
3
votes
3answers
319 views

Designing a state machine to detect if input was high exactly 2 times in last 4 clocks

Design a Mealy machine with a one bit input, and a one bit output. The output is 1 if in the last 4 clock s, exactly 2 of 4 values on input are 1. Use D flip-flops and discrete gates. Use binary ...