1 / 96

Some examples

Lecture 7.3. Paolo PRINETTO Politecnico di Torino (Italy) University of Illinois at Chicago, IL (USA) Paolo.Prinetto@polito.it Prinetto@uic.edu www.testgroup.polito.it. Some examples. Goal.

Download Presentation

Some examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 7.3 Paolo PRINETTO Politecnico di Torino (Italy)University of Illinois at Chicago, IL (USA) Paolo.Prinetto@polito.it Prinetto@uic.edu www.testgroup.polito.it Some examples

  2. Goal • This lecture guides the students through the solution of some simple examples of manual synthesis of sequential networks.

  3. Prerequisites • Lectures 7.1 and 7.2

  4. Homework • Students are recommended to try to solve the exercise by themselves, before looking at the proposed solutions.

  5. Further readings • No particular suggestion

  6. Outline • Example #7.3.1: rising edge detector • Example #7.3.2: palindrome string detector • Example #7.3.3: BCD big endian • Example #7.3.4: BCD little endian • Example #7.3.5: parity checker • Example #7.3.6: Ford Thunderbird light controller • Example #7.3.7: code checker • Example #7.3.8: sequence checker

  7. Example #7.3.1: rising edge detector • A circuit is to be designed, having: • An input X • A clock signal CLK, which acts as a proper sampling signal of X, i.e., the frequency of CLK is such that it never happens that two transitions of X occur within a same CLK cycle • An output U, asserted for a clock cycle whenever a rising edge on the input X is detected.

  8. Waveforms CLK X

  9. Waveforms CLK X Z

  10. STG reset H0,0

  11. STG reset 1 H0,0

  12. STG reset 1 L,0 H0,0 0

  13. STG reset 1 0 L,0 H0,0 0

  14. STG reset 1 0 L,0 H0,0 0 1 H1,1

  15. STG reset 1 0 L,0 H0,0 0 1 0 H1,1

  16. STG reset 1 0 L,0 H0,0 0 1 0 H1,1 1

  17. State encoding state encoding H0 00 L 11 H1 10

  18. STT reset 1 0 L,0 H0,0 0 1 0 H1,1 1 state encoding H0 00 L 11 H1 10

  19. STT reset 1 0 x L,0 H0,0 0 y[1:0] • 0 1 • H0  00 11 00 0 • 01 - - 0 • L  11 11 10 0 • H1  10 11 00 1 1 0 H1,1 1 Y[1:0] Z state encoding H0 00 L 11 H1 10

  20. STT x y[1:0] • 0 1 • H0  00 11 00 0 • 01 - - 0 • L  11 11 10 0 • H1  10 11 00 1 Y[1] = x’ + y[0] Y[0] = x’ Z = y[1]y[0]’ Y[1:0] Z

  21. Solution x D[0] y[0] • D[1] = x’ + y[0] • D[0] = x’ • Z = y[1]y[0]’ D Z D[1] y[1] D

  22. Outline • Example #7.3.1: rising edge detector • Example #7.3.2: palindrome string detector • Example #7.3.3: BCD big endian • Example #7.3.4: BCD little endian • Example #7.3.5: parity checker • Example #7.3.6: Ford Thunderbird light controller • Example #7.3.7: code checker • Example #7.3.8: sequence checker

  23. Example #7.3.2: palindrome string detector • On a serial transmission line X, bits are transmitted synchronously w.r.t. a clock signal CLK, one bit per clock cycle. • A circuit to be connected to the serial line is to be designed. It has an output U which is asserted whenever the last 4 values got in input forms a palindrome string.

  24. Example #7.3.2: palindrome string detector • On a serial transmission line X, bits are transmitted synchronously w.r.t. a clock signal CLK, one bit per clock cycle. • A circuit to be connected to the serial line is to be designed. It has an output U which is asserted whenever the last 4 values got in input forms a palindrome string. Examples: ANNA – 3993 – 0110

  25. reset - 1 0

  26. reset - 1 0 1 0 1 0 1 0

  27. reset - 1 0 1 0 1 0 1 0 0 0 1 10 11 00 01 1 0 0 1 1

  28. reset - 1 0 1 0 1 0 1 0 0 0 1 10 11 00 01 1 0 0 1 1 1 100 111 000 011 0 0 1 1 0 0 1

  29. reset - 1 0 1 0 1 0 1 0 U=0 0 0 1 10 11 00 01 1 0 0 1 1 1 100 111 000 011 0 0 1 1 0 0 1 0 1 1 0 1001 1111 0000 0110 U=1 1 0 0 1

  30. reset - 1 0 1 0 1 0 1 0 U=0 0 0 1 10 11 00 01 1 0 0 1 1 1 100 111 000 011 0 0 1 1 0 0 1 0 1 1 0 1001 1111 0000 0110 U=1 1 0 0 1

  31. Outline • Example #7.3.1: rising edge detector • Example #7.3.2: palindrome string detector • Example #7.3.3: BCD big endian • Example #7.3.4: BCD little endian • Example #7.3.5: parity checker • Example #7.3.6: Ford Thunderbird light controller • Example #7.3.7: code checker • Example #7.3.8: sequence checker

  32. BCD Example #7.3.3: BCD big endian • On a serial transmission line X, bits are transmitted synchronously w.r.t. a clock signal CLK, one bit per clock cycle. The line is used to transmit groups of 4 bits: each group corresponding to a BCD digit, transmitted MSB first (big endian) • A circuit to be connected to the serial line is to be designed. • It has an output U which is asserted, for 1 clock cycle, in correspondence of the 4th bit of each group, if the group itself is a correct BCD digit.

  33. BCD Solution • When dealing with circuits that must consider groups of bits, it may be convenient to start from a set of states, one for each possible combination of the PO values.

  34. BCD Solution reset A,0 E,1 0 1 1 0

  35. BCD Solution reset A,0 E,1 0 1 1 0 B,0 -

  36. BCD Solution reset A,0 E,1 0 1 1 0 B,0 - C,0 -

  37. BCD Solution reset A,0 E,1 0 1 1 0 B,0 - C,0 - D,0 -

  38. BCD Solution reset A,0 E,1 0 1 1 0 B,0 F,0 - C,0 - D,0 -

  39. BCD Solution reset A,0 E,1 0 1 1 0 B,0 F,0 1 - C,0 H,0 - D,0 -

  40. BCD Solution reset A,0 E,1 0 1 1 0 B,0 F,0 1 - C,0 H,0 - - D,0 I,0 - -

  41. BCD Solution reset A,0 E,1 0 1 1 0 B,0 F,0 1 0 - C,0 G,0 H,0 0 - 1 - D,0 I,0 - -

  42. Outline • Example #7.3.1: rising edge detector • Example #7.3.2: palindrome string detector • Example #7.3.3: BCD big endian • Example #7.3.4: BCD little endian • Example #7.3.5: parity checker • Example #7.3.6: Ford Thunderbird light controller • Example #7.3.7: code checker • Example #7.3.8: sequence checker

  43. BCD Example #7.3.4: BCD little endian • Similar to the previous exercise, with the only difference that BCD digits are transmitted LSB first.

  44. BCD Valid Sequences • 0000 0 Y • 0001 8 Y • 0010 4 Y • 0011 12 N • 0100 2 Y • 0101 10 N • 0110 6 Y • 0111 14 N 1000 1 Y 1001 9 Y 1010 5 Y 1011 13 N 1100 3 Y 1101 11 N 1110 7 Y 1111 15 N

  45. BCD reset A,0 E,1   B,0 0 1 F,0 C,0 1  0 D,0 G,0 0 1  E E A

  46. Outline • Example #7.3.1: rising edge detector • Example #7.3.2: palindrome string detector • Example #7.3.3: BCD big endian • Example #7.3.4: BCD little endian • Example #7.3.5: parity checker • Example #7.3.6: Ford Thunderbird light controller • Example #7.3.7: code checker • Example #7.3.8: sequence checker

  47. P4 Example #7.3.5: parity checker • On a serial transmission line X, bits are transmitted synchronously w.r.t. a clock signal CLK, one bit per clock cycle. The line is used to transmit strings of 4 bits • A circuit to be connected to the serial line is to be designed. • It has an output Z which is asserted, for 1 clock cycle, in correspondence of the 4th bit of each string, if the string itself contains an odd # of 1’s.

  48. P4 Example • X 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 0 • Z - - - 1 - - - 0 - - - 1 - -  0

  49. P4 reset B,- C,- even odd

  50. P4 reset B,- C,- 1 1 0 0 even odd D,- E,-

More Related