2 ms·
I've used state machines in the context of hardware design, particularly fpgas and asics. In hardware land, you use a state machine to implement something like
by emrah 4y ago
I've used state machines in the context of hardware design, particularly fpgas and asics. In hardware land, you use a state machine to implement something like software, where your circuit is able to remember what happened earlier so it can behave differently accordingly. It's very crude relative to their software counterparts.
They are not as common in software because software is one giant state machine already. Variables hold state, there is state within state (classes, composition etc). Sometimes entities in game design have explicit state machines for their behavior but that's to minimize complexity rather than due to absolute necessity
- gaudat 4y agoSpeaking of CompSci people who cannot into state machines there was one time a contractor wrote some HDL that is a huge number of processes linked to each other with handshaking signals. There are zero state machines in their design. It was a pain to debug it and needless to say it was quite buggy.