Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

May I use state machine as following:

Status
Not open for further replies.

EDA_hg81

Advanced Member level 2
Joined
Nov 25, 2005
Messages
507
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,808
May I use state machine as following:

Code:
SEQ1: process ( CLK_IN, F_RESET )
	     begin
		      if ( F_RESET = '0' ) then
					CURRENT_STATE <= INITWAIT;
	                  elsif ( CLK_IN'EVENT and CLK_IN = '1' )then
				   CURRENT_STATE <= NEXT_STATE;
	                  end if;
       end process;
	
  SEQ2:  process ( CLK_IN, F_RESET )
         begin
			
         if ( CLK_IN'EVENT and CLK_IN = '1' )then			
			case CURRENT_STATE is
			   when INITWAIT =>
				   if ( INIT_CON2 = 1023 ) then
				           NEXT_STATE <= CONMOD;
				else 
                                                         NEXT_STATE <= INITWAIT;	
                                                end if;
                                        when  CONMOD  =>
Since I have to generate some control signals in the second process and I don't want to get any latchs.

Thanks
 

first, according to the upon code, there is no need to use FSM.
It is so clear that FSM is uneeded.

Genraly, in FSM implementaion the CASE statement should be declared in async process. In order to avoid any LATCHs you cover all the case posibilties and ALYAWS use in CASE the OTHER...
 

Thank you very much all.

I used this way and realized what I want.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top