1 / 62

Hierarchical Memory Systems

Hierarchical Memory Systems. Prof. Sin-Min Lee Department of Computer Science. CS147 Lecture 12. Implementing JK Flip-Flop using only a T Flip-Flop. Note how the areas marked off with a blue box behave like a T flip-flop, while the area within the purple box behave like a D flip-flop.

wylie
Télécharger la présentation

Hierarchical Memory Systems

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. Hierarchical Memory Systems Prof. Sin-Min Lee Department of Computer Science CS147 Lecture 12

  2. Implementing JK Flip-Flop using only a T Flip-Flop Note how the areas marked off with a blue box behave like a T flip-flop, while the area within the purple box behave like a D flip-flop. From this last chart, we can derive the following chart:

  3. Implementing JK Flip-Flop using only a T Flip-Flop To derive the next chart, we work in reverse, asking, “What is the input into the T (toggle) function that will result in the output shown in the previous chart?” In this case, the first column of Q is 0 and our circled value is a 0; a 0 will give this result. The input that will give us a 1, when Q is 1, is also 0. Refer back to the T flip-flop chart to see that on 0, there is no change; 1 “toggles”.

  4. Implementing JK Flip-Flop using only a T Flip-Flop This is the final Karnaugh map and the associated equation for T.

  5. Implementing T Flip-Flop using only a JK Flip-Flop This time, we are doing the reverse again, asking what values of J and K will give us the corresponding values in the T chart above. 00 or 01 will give 0, so we enter “0X”. X is our “don't care” value; it can be 0 or 1.

  6. Implementing T Flip-Flop using only a JK Flip-Flop Once we derive all the values, we have to split this into two, in order to get an equation that defines J and another than defines K.

  7. Implementing T Flip-Flop using only a JK Flip-Flop Here is the final implementation.

  8. Implementing this FSM using a T Flip-Flop Using the values from the first chart, we can get this second chart. Then, we apply the same reverse method to determine what input values we would need to arrive at the ones listed in this second chart.

  9. Implementing this FSM using a T Flip-Flop T = XQ' + X'Q

  10. Implementing this FSM using a D Flip-Flop This time we use the same FSM and same initial chart, but now derive an equation for D.

  11. Implementing this FSM using a D Flip-Flop Since this is a delay, the corresponding chart is the same.

  12. Implementing this FSM using a D Flip-Flop Finally, here is our graph.

  13. Implementing Flip-Flop

  14. How can we create a flip-flop using another flip-flop? • Say we have a flip-flop BG with the following properties: • Let’s try to implement this flip-flop using a T flip-flop

  15. Step 1:Create Table The first step is to draw a table with created flip-flop first (in this case BG), Q, Q+, and the creator flip-flop (in this case T) -Look at Q, Q+ to determine value of T

  16. Step 2:Karnaugh Map • Draw a Karnaugh Map, based on when T is a 1 Q 0 1 BG 00 01 10 11 T=B’G’+BGQ+G’Q’

  17. Step 3: Draw Diagram T=B’Q’+ BGQ+G’Q’ B G Q Q’

  18. The Root of the Problem:Economics • Fast memory is possible, but to run at full speed, it needs to be located on the same chip as the CPU • Very expensive • Limits the size of the memory • Do we choose: • A small amount of fast memory? • A large amount of slow memory?

  19. Memory Hierarchy Design (2) • It is a tradeoff between size, speed and cost and exploits the principle of locality. • Register • Fastest memory element; but small storage; very expensive • Cache • Fast and small compared to main memory; acts as a buffer between the CPU and main memory: it contains the most recent used memory locations (address and contents are recorded here) • Main memory is the RAM of the system • Disk storage - HDD

  20. Memory Hierarchy Design (3) • Comparison between different types of memory HDD Register Cache Memory size: speed: $/Mbyte: 32 - 256 B 2 ns 32KB - 4MB 4 ns $100/MB 128 MB 60 ns $1.50/MB 20 GB 8 ms $0.05/MB larger, slower, cheaper

  21. Memory Hierarchy • Can only do useful work at the top • 90-10 rule: 90% of time is spent of 10% of program • Take advantage of locality • temporal locality keep recently accessed memory locations in cache • spatial locality keep memory locations nearby accessed memory locations in cache

  22. The connection between the CPU and cache is very fast; the connection between the CPU and memory is slower

More Related