1 / 71

Our First Real System

Our First Real System. Review. On our way to building a computer…. Represent Info with 0’s & 1’s (aka bits). Logic Circuits: Universal Method. 0’s & 1’s. Memory Circuits. Computers. We are here. The System Clock. “500 Mhz Pentium III computer…” What does “500 Mhz” mean?

emiko
Download Presentation

Our First Real System

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. Our First Real System

  2. Review On our way to building a computer… Represent Info with 0’s & 1’s (aka bits) Logic Circuits: Universal Method 0’s & 1’s Memory Circuits Computers We are here

  3. The System Clock • “500 Mhz Pentium III computer…” • What does “500 Mhz” mean? • It refers to the speed of theSystem Clock.(actually this is only one of the clocks…) • All digital systems have such “Clocks,” even traffic lights and elevator control systems.

  4. Clocks: Some Terminology • Think of System Clock as a heart. • How fast it beats is measured in Hertz (Hz) which means “cycles per second” • Prefixes: • Kilo = 1,000 • Mega = 1,000,000 • Giga = 1,000,000,000

  5. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 0

  6. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 1

  7. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 0

  8. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 1

  9. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 0

  10. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 1

  11. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 0

  12. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 1

  13. The System Clock (cont.) • Rough idea: System takes a “step” every time the System Clock beats. • We’ll see how this works in an example. • In real life, Clock is a Quartz crystal,which sends out 0’s and 1’s on a wire. • In every cycle, it changes from 0 to 1 and back to 0 0

  14. Our System: A Traffic Light

  15. A Traffic Light • Intersection of two one-way roads

  16. A Traffic Light • Intersection of two one-way roads A B Car Sensors

  17. Traffic Light System Clock • Traffic Lights don’t have to act very fast. • Let’s say the System Clock only beatsonce every 4 seconds. • This is 0.25 Hz.(a few Billion times slower than your PC)

  18. Traffic Light Design • How do we go about designing the Traffic Light? • First, let’s think about all the possible States of the traffic light.

  19. Traffic Light • Intersection of two one-way roads A B Car Sensors

  20. Light A Light B

  21. Possible States Light A Light B

  22. Possible States Light A Light B

  23. Possible States Light A Light B

  24. Possible States Light A Light B

  25. Actually Only 4 Possibilities Light A Light B

  26. Traffic Light Design • We figured out some possible States of the Traffic Light. • Next, we should think logically about how the Traffic Light should behave. • For now, we will try to keep it simple. • (Suppose these are infrequently used country roads.)

  27. How should the Light behave? A Light A B Car Sensors Light B

  28. Traffic Light Behavior IF A=1 AND B=0 Light A Light B

  29. Traffic Light Behavior Otherwise IF A=1 AND B=0 Light A Light B

  30. Traffic Light Behavior Otherwise IF A=1 AND B=0 Light A Always Light B

  31. Traffic Light Behavior Otherwise IF A=1 AND B=0 Light A Always IF A=0 AND B=1 Otherwise Light B

  32. Traffic Light Behavior Otherwise IF A=1 AND B=0 Light A Always Always IF A=0 AND B=1 Otherwise Light B

  33. Traffic Light Behavior Otherwise Note:Clock beats every 4 sec.So Light is Yellow for 4 sec. IF A=1 AND B=0 Light A Always Always IF A=0 AND B=1 Otherwise Light B

  34. Traffic Light State Machine Otherwise Note:Clock beats every 4 sec.So Light is Yellow for 4 sec. IF A=1 AND B=0 Light A Always Always IF A=0 AND B=1 Otherwise Light B

  35. Traffic Light Design • We’ve figured out the logical behavior of the Traffic Light in terms of a State Machine: • We know what the states are. • For each state, given any input,we know which state to go to next. • How do we build it?

  36. Traffic Light Design • Thinking this through: • Our machine needs to:

  37. Traffic Light Design • Thinking this through: • Our machine needs to: • Remember which state it is in (Memory)

  38. Traffic Light Design • Thinking this through: • Our machine needs to: • Remember which state it is in (Memory) • Given the state it is in and input values, it must determine which state to go tonext (Logic)

  39. Traffic Light Design • Thinking this through: • Our machine needs to: • Remember which state it is in (Memory) • Given the state it is in and input values, it must determine which state to go tonext (Logic) • And that’s all !

  40. Traffic Light Design • Problem 1: • Remember which state it is in (Memory) • How do represent the states? • We could keep one bit of memory for whether Light A is Green or not, whether it is Yellow or not, … • This would take 6 bits of memory. • There is a much simpler way!

  41. Traffic Light Design • Problem 1: • Remember which state it is in (Memory) • How do represent the states? • Answer: • Just number them (using binary numbers). • We have 4 states. • Call them 00, 01, 10, 11. • We (human designers) will keep track of what these names mean.

  42. Traffic Light States Otherwise IF A=1 AND B=0 Light A Always Always IF A=0 AND B=1 Otherwise Light B

  43. Traffic Light States Otherwise IF A=1 AND B=0 01 00 Light A Always Always IF A=0 AND B=1 11 10 Otherwise Light B

  44. Traffic Light Design • Problem 2: • Given the state it is in and input values, it must determine which state to go tonext (Logic) • Answer:

  45. Traffic Light Design • Problem 2: • Given the state it is in and input values, it must determine which state to go tonext (Logic) • Answer: • Build a Truth Table • Use Universal Method!

  46. M1 M2 ABD1 D2Light A Red Light B Red … Traffic Light Behavior Build A Truth Table for next state / Output

  47. Traffic Light Behavior Otherwise IF A=1 AND B=0 01 00 Light A Always Always IF A=0 AND B=1 11 10 Otherwise Light B

  48. M1 M2 ABD1 D2Light A Red Light B Red … 0 0 1 0 0 1 1 0 Traffic Light Behavior Build A Truth Table for next state / Output

  49. Traffic Light Behavior Otherwise IF A=1 AND B=0 01 00 Light A Always Always IF A=0 AND B=1 11 10 Otherwise Light B

  50. M1 M2 ABD1 D2Light A Red Light B Red … 0 0 1 0 0 1 1 0 0 1 * * 1 0 1 0 Traffic Light Behavior Build A Truth Table for next state / Output

More Related