Advertisement
Madotsuki

State Assignment v2

Apr 4th, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Present NS Output
  2. --- x=0 x=1 x=0 x=1
  3. S0 S1 S2 0 0
  4. S1 S3 S2 0 0
  5. S2 S1 S4 0 0
  6. S3 S5 S2 0 0
  7. S4 S1 S6 0 0
  8. S5 S5 S2 1 0
  9. S6 S1 S6 0 1
  10.  
  11. GUIDELINES:
  12. 1) States which have the same next state for a given input should be given adjacent assignments.
  13. 2) States which are the next states of the same state should be given adjacent assignments.
  14. OUTPUT TABLE ONLY:
  15. 3) States which have the same output for a given input should be given adjacent assignments.
  16.  
  17. ----
  18.  
  19. Check for all pairs that match Guideline 1:
  20. G1: (S0,S1,S3,S5) [all share S2 for NSx=1]
  21. (S3,S5) [all share S5 for NSx=0]
  22. (S4,S6) [they share everything]
  23. (S0,S2,S4,S6) [all share S1 for NSx=0]
  24.  
  25. Check for all pairs that match Guideline 2:
  26. G2: (S1,S2) [they both are next states of S0]
  27. (S2,S3) [they both are next states of S1]
  28. (S1,S4) [they both are next states of S2]
  29. (S2,S5) [they both are next states of S3,S5]
  30. (S1,S6) [they both are next states of S4,S6]
  31.  
  32. Create a K-map...
  33.  
  34. \A 0 | 1
  35. BC\__|___
  36. 00|S0| |
  37. 01|S2|S5|
  38. 11|S4|S3|
  39. 10|S6|S1|
  40.  
  41. \A 0 | 1
  42. BC\__|___
  43. 00|S0| |
  44. 01|S1|S6|
  45. 11|S3|S4|
  46. 10|S5|S2|
  47.  
  48. These are two possible ways of filling in the assignment and are based on trial and error (that's what the book says, geez). Guideline 1 > Guideline 2 in preference.
  49.  
  50. K-map filling steps:
  51. 1) Assign the starting state to the 0 square on the map (i.e. 000).
  52. 2) Adjacency conditions from G1 and adjacency conditions from G2 which are called more than once have priority and should be satisfied first. This is why for both K-maps the next set of states filled are S2,S5 or S1,S6 -- they were called twice in G2.
  53. 3) When guidelines require that 3 or 4 states be adjacent, these states should be placed within a group of four adjacent squares on the assignment map. Notice that in the first K-map, (S4,S6) were from a G1 state, as per (S1,S3) and for that matter, S5. In fact if you look at the entire vertical row, it's (S0,S2,S4,S6), satisfying another whole state! The same goes for (S1,S3,S5,S0) too.
  54. 4) If output table is considered, then include G3 in your state assignment table filling.
  55.  
  56. Essentially, you want to satisfy as many fo those adjacent states as possible by creating a table that matches them up. The priority would be if it matches in G1, then if it gets called at least twice in G2 when filling in order.
  57.  
  58. === WHAT DO FROM THERE ??? ===
  59. All the S-states are now able to be expressed in BCD form due to the ABC given in the K-map.
  60.  
  61. Present NS Output ABC
  62. --- x=0 x=1 x=0 x=1 ---
  63. S0 S1 S2 0 0 000
  64. S1 S3 S2 0 0 110
  65. S2 S1 S4 0 0 001
  66. S3 S5 S2 0 0 111
  67. S4 S1 S6 0 0 011
  68. S5 S5 S2 1 0 101
  69. S6 S1 S6 0 1 010
  70.  
  71. We can make a K-map from there to create a function for flipping and flopping using XABC. (X like X=0, X=1)
  72.  
  73. \ XA | | | |
  74. --- 00 | 01 | 11 | 10 |
  75. BC \ | | | |
  76. 00 S1 X X S2
  77. -------------------------
  78. 01 S1 S5 S2 S4
  79. -------------------------
  80. 11 S1 S5 S2 S6
  81. -------------------------
  82. 10 S1 S3 S2 S6
  83.  
  84.  
  85. From there, you have to separate the K-map into three different K-maps, an A-map, a B-map, and a C-map. For example, S1 = 110, right? That means for A-map, all S1 will be 1, for B-map all S1 will be 1, and for C-map all S1 will be 0. You do this for the rest of the S's -- this will create the opportunity to make simplified Next-state functions for your flip-flops.
  86.  
  87. A+ = D_A = X'
  88. B+ = D_B = X'C' + A'C + A'B
  89. C+ = D_C = A + XB'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement