Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > fsm state encodings

Reply
Thread Tools

fsm state encodings

 
 
Caterpillar
Guest
Posts: n/a
 
      02-10-2006
Dear all,
I want to optimize the state encoding of a FSM. I've typed this
declarations

type STATETYPE is std_logic_vector(1 downto 0); -- state declaration
constant IDLE : STATETYPE := "00";
constant EN_MUX1_DEMUX : STATETYPE := "01";
constant EN_MUX2 : STATETYPE := "11";
constant RST_FF : STATETYPE := "10";
signal CURRENT_STATE : STATETYPE;
signal NEXT_STATE : STATETYPE; -- signals
declaration

then I've used the usually 3-process coding style, with case
statements.
Modelsim gives me this error

near "std_logic_vector": expecting: '(' ACCESS ARRAY FILE RANGE RECORD
PROTECTED

What's wrong?

Thank you

Cat

 
Reply With Quote
 
 
 
 
charles.elias@wpafb.af.mil
Guest
Posts: n/a
 
      02-10-2006
Cat,
try subtype STATETYPE ...

std_logic_vector is a type so STATETYPE is a subtype.

Charles

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FSM with more than 1 input at each state swiss student VHDL 2 05-26-2005 10:49 AM
Which FSM State? Jake VHDL 0 10-25-2004 09:52 PM
FSM in illegal state Jerker Hammarberg \(DST\) VHDL 48 07-21-2004 06:05 PM
FSM (Finite State Machine) Generator - Open Source Roberto Nunnari Java 2 02-04-2004 07:16 AM
FSM (Finite State Machine) Generator - Open Source Roberto Nunnari C++ 1 02-03-2004 11:08 PM



Advertisments