Board logo

标题: 哪位能解释一下几种状态机设计时的编码方法吗? [打印本页]

作者: 1001    时间: 2005-10-12 14:14     标题: 哪位能解释一下几种状态机设计时的编码方法吗?

请解释一下状态机的以下几种编码方式的概念和优缺点:one hot 、gray 、sequential
作者: vincent    时间: 2005-10-12 14:15

假设有S0,S1,S2三个状态。
one hot 编码:
s0=001
s1=010
s2=100
gray 码:
s0=000
s1=001
s2=011

sequential:
s0=000
s1=001
s2=010
作者: 住在水星    时间: 2005-10-12 18:06

FPGA里面ONEHOT  的效率应该最高把,
作者: newbeesile    时间: 2005-10-12 18:14

住在水里说了一半  资源占有也很多嘛
作者: jjkjjk    时间: 2005-10-13 14:13

One-Hot
One-hot encoding is the default encoding scheme. Its principle is to associate one code bit and also one flip-flop to each state. At a given clock cycle during operation, one and only one bit of the state variable is asserted. Only two bits toggle during a transition between two states. One-hot encoding is very appropriate with most FPGA targets where a large number of flip-flops are available. It is also a good alternative when trying to optimize speed or to reduce power dissipation.

Gray
Gray encoding guarantees that only one bit switches between two consecutive states. It is appropriate for controllers exhibiting long paths without branching. In addition, this coding technique minimizes hazards and glitches. Very good results can be obtained when implementing the state register with T

Compact
Compact encoding consists of minimizing the number of bits in the state variables and flip-flops. This technique is based on hypercube immersion. Compact encoding is appropriate when trying to optimize area.
                                               

Johnson
Like Gray, Johnson encoding shows benefits with state machines containing long paths with no branching.
Actual                                                       

Sequential
Sequential encoding consists of identifying long paths and applying successive radix two codes to the states on these paths. Next state equations are minimized.
Actual                                                       

Speed1
Speed1 encoding is oriented for speed optimization. The number of bits for a state register depends on the particular FSM, but generally it is greater than the number of FSM states.




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0