RE: FSM Enhancement Goals and Thoughts


Subject: RE: FSM Enhancement Goals and Thoughts
From: Michael McNamara (mac@verisity.com)
Date: Tue Dec 11 2001 - 17:53:29 PST


Michael McNamara writes:
>
> Clifford E. Cummings writes:
> > Hi, All
> > PROPOSALS
> >
> > enum - works great as is.
> >
> > If we do want a separate state type, I suggest:
> >
> > enum_state - to at least get away from the commonly used identifier name of
> > "state."
> >
> > NEW! Add an enumeration type that would benefit onehot logic. This would be
> > a true enhancement over both Verilog and VHDL. Add either:
> >
> > enum_onehot
> > enum_state_onehot
>
> Also useful in hardware design in general (not necessarily for FSMs)
> for fault tolerant systems are gray codes -> where a change in a
> single bit always gets you to a known state; and avoids the
> transistion from state 3'b100 -> 3'b010 inadvertantly appearing to be
> appearing to be decoded as a walk through something like:
> 3'b100 -> 3'b000 -> 3'b010
>
> Instead of adding yet another keyword (enum_gray), I'd propose we use
> our attribute:
>
> enum my_state [
> IDLE, READ1, READ2, WRITE1, WRITE2, WRITE3
> ] (* enum_encoding={onehot|onecold|gray|increment|decrement}*) ;

We could even allow 'grey' for Simon and Peter...

> That why we allow more encodings than we can today imagine, and we
> don't take away anymore namespace.
>
> >
> > Waveform viewers would now treat the onehot enumeration as an index as
> > opposed to an actual encoding.
> >
> > Probably would also require:
> >
> > case_onehot(state)
> > IDLE: ... ->> S0; // treated the same as:
> > // case(1'b1)
> > // state[IDLE]: ... next[S0] = 1'b1;
> >
> > Using something like the above syntax would make the transition from
> > binary to one hot as simple as changing "enum" to "enum_onehot" and "case"
> > to "case_onehot." And the waveform viewer will now look at which index bits
> > are hot to determine which statename to display.
> >
> > Note: state machines are not the only hardware that use onehot codes. Wide
> > fast multiplexers are often coded using onehot selects wired to tristate
> > drivers that drive a common bus. Control logic is often coded as either
> > encoded or onehot, for the latter each control bit does not have to first
> > be decoded.
> >
> > Just some additional thoughts on goals and techniques.
> >
> > 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 : Tue Dec 11 2001 - 17:56:46 PST