Re: Cliff Cummings - FSM Proposals and models


Subject: Re: Cliff Cummings - FSM Proposals and models
From: Peter Flake (flake@co-design.com)
Date: Mon Mar 25 2002 - 04:32:07 PST


Cliff,

I have looked at your proposals and examples, and I have the following suggestions:

1.  Replace the "state" keyword and syntax with "transition  enum" and the enum syntax, including optional encodings.
The enum_onehot is a possible extension.  Then current and next state variables can be declared.

Note that an ordinary enum does not create its own name space, so the symbols must be unique within the current scope, whereas a transition enum creates its own name space, and so the state names can only be used where the state variables are known.

2. Remove the timing control as you suggest so that a separate always block can be used to clock next into current.
always @(posedge clock or negedge reset)
    if (reset) next <= current;
    else next <= S0;

3. Retain the begin-end because this is the same syntax as the case item, which eliminates syntactic ambiguity between a statement and a case expression.

4. Add a new syntax for transition blocks as you suggest so that you can write transition (current: ->> next), which then allows blocking assignments of the form:
    ->> S1; // means next = S1;

and a new syntax transition (current: ->>> next), which then allows nonblocking assignments in the transition items:
    ->>> S1; // means next <= S1;

Note that the transitions can be labeled as now:
    T0_1 ->> S1;

and can be used outside a transition statement in a hierarchical way
     ->> next.S1;

BTW indexing into a vector can already be done from an enumeration e.g myvec[int'(myenum)].

Peter

At 05:55 PM 3/1/02 -0800, you wrote:
Hi, All -

Attached is a new state diagram, my proposals for the FSM syntax, and 11 different implementations of the included example design.

Enjoy (I know I did!   ;-)

Regards - Cliff



























//*****************************************************************//
// Cliff Cummings               Phone:  503-641-8446               //
// Sunburst Design, Inc.        FAX:    503-641-8486               //
// 14314 SW Allen Blvd.         E-mail: cliffc@sunburst-design.com //
// PMB 501                      Web:    www.sunburst-design.com //
// Beaverton, OR 97005                                             //
//                                                                 //
//       Expert Verilog, Synthesis and Verification Training       //
//*****************************************************************//



This archive was generated by hypermail 2b28 : Mon Mar 25 2002 - 07:02:13 PST