Logical circuit design
Inquiry Sitemap Link Tips
Regarding State Machine

Structuring of State Machine

Design of condition shift

Design Example(AHB Bridge)

Code example(AHB bridge)

resource sharing of State Machine

Logical Circuit Design > Technic > State Machine    Next page(Gated Clock)    TOP of this page ▲

[1]
Interpretation is vague due to specifications. For example the action taken against an error.

For convenience resetting, insertion of sequence for restart, keep pending and shift control to software are various examples.

Actually will affect system design also, there isnt anything more inconvenient then sequence determined by specification.
[2]
There is theory of combination, but cannot research what is best for circuit design.

When combining, number of conditions upper limit would be 32. From experience, when mutually conditions overlap, then complexity will increase by a factor of 2 to number of conditions. Based on this reasoning, condition on the right side of the diagram is simple.(72 > 22+32+42)。

State machine for analyzing header of JPEG and MPEG will have no problems even with 100 states. There is less mutual shifts also, and as it is specified, can be stable (will doubt it though)

Incidentally, when composing 100 states, circuit and logical steps are smaller than expected.
[3]
Small scale state machine is mapped locally, so even when logical stapes are morem can be smaller.

Actually have designed a state machine with restricted timing, One hot improvement was small. First must tidy the value of state before retrying.
[4]
Simply an example. Having a base for thinking, thought process will be smoother. In this case it is output signal but, can be centered around input signal or defined state.

The former is an extreme example but is an example of program counter of processor.

Further the latter isDDR control which can be seen in example of memory condition of DDR.
[5]
Asynchronous here does not mean difference in clock frequency. It means state is independent, and operates without mutual relation. Same as asynchronous used in software control.
[6]
Even as safety measures are taken, it is easy to overlook bugs. Unmeasured states to check using assertion,(sufficient to embed display command)and try to resolve bugs.
[7]
Details are edgy but, due to special characteristics of AHB, combining will make control simpler. Actually is usual to divide into master and slave when using so take care.

Further, AHB is a synchronized protocol for Request control and Data control, can be thought that it is already connected by input signal. Hoever because of this performance cannot be achieved, here AXI is defined like bus.
[8]
Here when the omitted HBRUST signal is seen, Can determine the specified burst length. However, AHB specifications allow for abort while access. Burst length needs to check this abort. Abort can be seen when HTRANS="SEQ" is "IDLE", "NONSEQ".
[9]
Wise person may realize a shortcoming. When access is aborted with "IDLE" or "NONSEQ" after HTRANS="BUSY", flus signal will not output together with strb signal. Want to assert flush signal at the time of "BUSY", but cannot determine whather access has been aborted with "BUSY"

When properly implemented, HREADY is Stalled so that dummy strb + flush signal asserted condition can be added, and will be complex

Do not think that HTRANS = "BUSY" immediately before aborting access by master of AHB...
[10]
It is not One hot, if each bit is orthogonal, then can realize reduction of logical steps and circuit size between FF.

Although when referencing state, when creating logic depending on specific bits, wil not be able to adjust when later increasing states or changing. Would be better to code using state names as much as possible(Synthesis tool will automatically compress circuit.)
[11]
This coding method will have less condition omissions. However, depending on the RTL checker may get message "no default for case()!" causing confusion. If worried, then code a default statement for case() or a full condition code.
[12]
If direct map type or set associative type, can determine state only with address, multiplexer is not required.