FSMs-Vol.4 Ch.11 5

Discussion in 'Feedback and Suggestions' started by tshuck, Feb 4, 2013.

  1. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    Hey guys, so, for the finite-state machine section, it describes the states for generating a FSM for creating a single pulse, lasting one clock cycle, for a push button input.
    [​IMG]
    Nothing wrong with that, that's just fine, but the problem arises in the description of the states:
    this should say
    Also, a little further down:
    should be
    Unfortunately, pressed and depressed mean the exact same thing with respect to a push button, but I'm not blaming the author, English isn't his first language.;)


    Edit:
    Also, there is a spelling mistake on the next line, or so:
    should be
    The statements should be combined for proper grammar...
     
    Last edited: Feb 4, 2013
  2. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    I 'm actually quite proud: So far no-one of the 3-4 reviewers has found a logic error on my guide. You are the first to point out some language and spelling errors, which are welcome and acknowledged.

    Bill Marsden had made the same remark about the word depress. Maybe it was for another text of mine, but if was for this one, then it's not updated in a long time.

    I was trying very hard not to make the sentences too long. I overdid it in that last part.
    So, the spelling error you mention is actually the grammatical one, right?

    What did you think of the tutorial, in all?
     
  3. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    In that case, I have more...:(

    This is more of a grammar/lost train of thought...
    should be either
    or
    take your pick.
     
    Georacer likes this.
  4. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    Actually, it was both. "Otherwise" is spelled "Ohterwise" and the last part isn't a full sentence, so I wrote teh combined solution...

    Still working through it... There is a point I want to make, but I must finish before I do...:)
     
  5. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    About half way down:
    should be
    Looks like Geo had too many 1s and 0s to deal with!;)
     
  6. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    I feel like I'm nit-picking:(
    But I want Geo's work to be it's best, so....
    should say:
     
  7. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    It is evident that you put a lot of effort into making this entry. Overall, I think it is good. I think it is a good introduction to state-machines.

    That said, I think there are two places that you may want to address:
    1.) Moore vs. Mealy State Machines

    It is important to note that there are different type of state machines and their trade-offs.

    2.) It isn't always advantageous to make state labels 00->01->10->11, it can greatly increase the speed/reliability of a system to make states different from the next 'numerically logical' number.

    This isn't really a problem, so to speak, but it is useful in making a system less error-prone. It is, however, a fairly complex task and, probably, shouldn't be a topic for an introduction to FSMs:).

    I have a problem with stating that the initial state is always 0. In making state transitions more reliable(and minimize input-forming logic), it may be the case that 0 isn't the best initial state. All state-machines will come up in a random state, the trick is getting the state to the initial state, the logic doesn't care if that initial is 10010101, or 0.

    3.) State machine initialization sequencing. Figuring out what to do to initialize a state machine...
     
  8. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    I realized relatively recently that which is written with an 'h' after the 'w', like all interrogative pronouns.

    About 1): So far, I have not found a case where I needed the extra functionality of the Mealy machine badly. If you have a good example of the opposite, please show it. Thus, I chose to pick the most robust and easy to understand one, which is the Moore in my opinion. I didn't want to make the tutorial too complicated.

    2) Again, it was about simplicity of the guide. Plus, I don't know any well described techniques to do this, other than "go with your gut".

    A plus of calling the initial state 0, is that when you want to reset the machine, you can pull low the RESET pins of the FFs, which sounds right to the uninitiated. Pulling low a combination of RESET and SET pins would require a bit more explaining.

    3) What kind of initialization? Care to elaborate?

    Depending of where this conversation goes, we might add some final notes on the end of the chapter, or write another, "Advanced Course".

    Thanks for your time!
     
  9. tshuck

    Thread Starter Well-Known Member

    Oct 18, 2012
    3,531
    675
    ...news to me:p

    I agree with making it easy for beginners, in fact, I think you have the approach I would have taken and even took it a bit farther. I feel like there should be more sections on FSMs.

    I think that, while Moore is easier to understand, it is important to understand that there are other ways of doing it, sometimes more efficient ways. A Moore machine, typically, has more hardware than a Mealy machine. I don't mean to say your entry should be modified, I mean to say that we should add more entries to take the concept further.

    Here is a rather nice comparison of the two machines:
    Mealy vs. Moore
    and an overall comparison:
    Overview: Mealy vs. Moore


    I agree. I'm simply wary of the absolute description that initial is always 0.

    Hmmm.. I had written more, I guess it was accidentally deleted...:p

    Since a state machine can come up in any state, it may be necessary to get the state machine into the initial state, but it isn't that important if implemented in a FPGA, or similar, as the synthesizer takes care of this...

    Here are some good references:
    Powerpoint on Initialization
    FSM Optimizations
    Good overall on FSMs(beginning at page 13, section 10.4, discusses the tradeoffs of Mealy vs. Moore for the same example you gave in your entry, a very good read!)

    I think your current one is good, I think "Advanced Course" is the way to go.
     
    Georacer likes this.
  10. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    Okay, that odd "always" will leave too.

    As of now, I don't have the material or the motivation to write a new article. The first one was my reply to a large number of students asking about FSMs on AAC during exams period.

    But, I can see myself solving a nice puzzle, employing all the aforementioned advanced techniques if you can provide it.
     
  11. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    Let me add your correction about always here, so that it's easy to find by the editor:

    Remove the word alwyas.
     
  12. Dcrunkilton

    E-book Co-ordinator

    Jul 31, 2004
    416
    11
    Applied the corrections made in posts 1,3,5,6,11 as requested.

    Thanks,

    Dennis
     
    tshuck and Georacer like this.
Loading...