FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2005, 10:04 AM
Marco
Guest
 
Posts: n/a
Default State Machine Trouble

I'm developing a state machine to read and write data into block ram.

When I make reading operation, the state is always the same, s0, and it is reassigned every time ram address changes.

The processes to detemine next_state and state operations are state sensitive. If state does not change, that processes are executed in any case?

Thanks Marco
Reply With Quote
  #2 (permalink)  
Old 03-06-2005, 10:49 AM
Charles Gardiner
Guest
 
Posts: n/a
Default Re: State Machine Trouble

Hi Marco,

if I understand you correctly your next_state generation process is of
the form
process (this_state)
begin
....
next_state <= ...

....

or the equivalent always @(this_state) in Verilog.

This is an implicit wait for an event on the signal this_state, i.e.
your process is only triggered if 'this_state' changes. If you want the
process to execute on every change to ram_address you must add
ram_address to the sensitivity list.
A possible alternative which is often used is to trigger the process on
each clock. Here the sensitivity list would look like

process (clk)
.. . . .
or even
process (clk, reset)

You can then recalculate your next_state on every clock tick in your system

Hope this helps,
Charles
Reply With Quote
  #3 (permalink)  
Old 03-06-2005, 11:01 AM
Moti
Guest
 
Posts: n/a
Default Re: State Machine Trouble

Your state machine should reacte to any transition in the clock (rising
or falling) making it sensitive to clock change. However the reaction
nature (FSM functionality) should be according to the present state.

the clock sensitive process is usually the one that is responsible for
the state transitions (state <= next_state). if your outputs are state
dependent only (mealy machine) then you don't want them to change as
long as you stay in a specific state.

If your outputs are state and input dependent (moore machine) then you
can change your outputs (using the inputs) and still stay in the same
state. You just have to choose what kind of machine will do the trick..

Regards, Moti

Reply With Quote
  #4 (permalink)  
Old 03-06-2005, 03:05 PM
Marco
Guest
 
Posts: n/a
Default Re: State Machine Trouble

Many Thanks to everyone!

Your help is very useful!

Marco
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is wrong with this state machine? Verictor Verilog 4 03-28-2007 06:32 PM
Monolithic state machine or structured state machine? vax,3900 FPGA 6 05-12-2004 02:06 AM
please help! state machine Simone Winkler FPGA 4 01-05-2004 10:33 AM


All times are GMT +1. The time now is 11:39 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved