Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dklopfenstein Designcon08

624 views

Published on

Communicating complicated system scenarios can be difficult using words alone. Diagrams of scenarios can give engineers a quick and thorough understanding of system events. But hand-drawn diagrams are time-consuming to create and may be incomplete or contain erroneous information. This paper discusses how an ASIC engineer can create a short Perl script that reads a simulation log file and automatically creates an accurate, informative diagram in about a second.

Published in: Engineering
  • Login to see the comments

  • Be the first to like this

Dklopfenstein Designcon08

  1. 1. How to quickly create complicated message sequence charts automatically without spending money on software. Debra Klopfenstein, SGI dklopfenstein@alum.rpi.edu 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  2. 2. A Simple Story 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  3. 3. Gets Complicated Quickly… 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  4. 4. Event Order is Added… 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  5. 5. Hundreds of Thousands of Stories! • Goal is Speed, Accuracy (Cheap): –Understand –Explain –Document –Debug 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  6. 6. A Picture is… • A Picture is Helpful: – Can Not Forget Important Events – Less Confusing than Words Alone – More Concise than Words Alone – Good ‘Birds-Eye-View’ • But What a Pain: – Time-Consuming – Error-Prone 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  7. 7. Agenda • How you can implement Automatic Picture Generation • Real-Life Limitations • Other Approaches 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  8. 8. Three Views (same info) • Diagram of Event Flow among Logic Blocks • Diagram in Message Sequence Chart Format • Text Log file 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  9. 9. Event Flow among Logic Blocks 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  10. 10. Message Sequence Chart Format 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  11. 11. Simulation Log File P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 P0 CchState: A=0x420500 E->I P0 OMSG Purge dst=M0 req=P1 from=P0 P0 OMSG ExclAck+D dst=P1 home=M0 P1 IMSG ExclSpec+D A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  12. 12. Simulation Log File P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 P0 CchState: A=0x420500 E->I P0 OMSG Purge dst=M0 req=P1 from=P0 P0 OMSG ExclAck+D dst=P1 home=M0 P1 IMSG ExclSpec+D A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  13. 13. Message Sequence Chart Coordinates 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  14. 14. The first two events in the log file P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  15. 15. The first two events in the log file Y=1 P1(X=1) OMSG ReadExcl … Y=2 M0(X=2) IMSG ReadExcl … 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  16. 16. Log File with Coordinates Y=0 P1(X=1) OMSG ReadExcl Y=1 M0(X=2) IMSG ReadExcl Y=2 M0(X=2) DirState: E{P0}->BUSY{P1} Y=3 M0(X=2) OMSG InterExcl Y=4 M0(X=2) OMSG ExclSpec+D Y=5 P0(X=0) IMSG InterExcl Y=6 P0(X=0) CchState: E->I Y=7 P0(X=0) OMSG Purge Y=8 P0(X=0) OMSG ExclAck+D Y=9 P1(X=1) IMSG ExclSpec+D 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  17. 17. Message Sequence Chart Format 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  18. 18. Which Diagram is Easiest to Generate Automatically? • Simple Graphical Objects • Simple and predictable object placement 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  19. 19. Contains Rectangles 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  20. 20. Contains Straight Lines 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  21. 21. Contains Bent Lines 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  22. 22. Contains Text 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  23. 23. Image Object Placement 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  24. 24. Message Arrow Placement 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  25. 25. Message Sequence Chart • Two Object Types – Straight Lines – Text • Simple Placement – X is logic blocks – Y is event order 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  26. 26. Diagram Comparison Logic Diagram Message Sequence Chart • Many Object Types • Two Object Types Straight Lines – Straight Lines – Text – Text – Rectangles of different sizes – Bent Lines – • Placement • Placement – Complex – Simple – Has Dependencies – Predictable – Hard-to-Follow – Easy-to-Follow 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  27. 27. Script Overview 1. Inputs and Outputs 2. Innards 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  28. 28. Log2img Inputs and Outputs 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  29. 29. Multiple Graphics Outputs. How? 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  30. 30. Input to convert 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  31. 31. Graphic Format Requirements • Easy for an ASIC Engineer to write: –Origin in upper left –Easy to create lines –Easy to create text –Graphics file contains text, not binary 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  32. 32. Input to convert: FIG Format 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  33. 33. FIG Format: Text Log(X,Y) # ReadExcl Text # etc.. X Y Text # ----- ---- ---- -------- 4 (...) 1 0 ReadExcl 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  34. 34. FIG Format: Text Fig(X,Y) # ReadExcl Text # etc.. X Y Text # ----- ---- ---- -------- 4 (...) 1000 1800 ReadExcl 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  35. 35. FIG Format: Text Angle # ReadExcl Text # .. AngleRadians X Y Text # -- -------- -- ---- ---- -------- 4 .. -0.16514 .. 1000 1800 ReadExcl 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  36. 36. FIG Format: Text Angle # .. AngleRadians X Y Text # -- -------- -- ---- ---- -------- 4 .. -0.16514 .. 1000 1800 ReadExcl 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  37. 37. SOH-CAH-TOA 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  38. 38. SOH-CAH-TOA 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  39. 39. FIG Format for Lines # ReadExcl Arrow 2 (...) # Line Info (width, color, etc) 1 1 1.00 100.00 120.00 # Arrow Info 1000 1800 2500 2050 #(X0,Y0),(X1,Y1) 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  40. 40. 1st Script Section 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  41. 41. Grouping Image Objects 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  42. 42. Two kinds of Image Objects • Message Image Objects • Text Image Objects 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  43. 43. Msg Image Object 0 (1st Section) P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  44. 44. Msg Image Object 0 (2nd Section) P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  45. 45. How to Match Msg Image Sections P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  46. 46. Text Image Object 1 P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  47. 47. Image Object 2 (1st section) P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  48. 48. How to Match Msg Image Sections P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 DirState: A=0x420500 E{P0}->BUSY{P1} M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 P0 IMSG InterExcl A=0x420500 dst=P0 req=P1 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  49. 49. Image Object Array … M0 OMSG InterExcl A=0x420500 dst=P0 req=P1 M0 OMSG ExclSpec+D A=0x420500 dst=P0 req=P1 … 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  50. 50. ImageObj Array of Hashes idx Printed Text X0 Y0 X1 Y1 0 ReadExcl P1 0 M0 1 1 E{P0}->BUSY{P1} M0 2 2 InterExcl M0 3 P0 5 3 ExclSpec+D M0 4 P1 9 4 E->I P0 6 5 Purge P0 7 M0 12 6 ExclAck P0 8 P1 10 7 I->E P1 11 8 Busy{P1}->E{P1} M0 13 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  51. 51. Print Obj[0] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  52. 52. Print Obj[1] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  53. 53. Print Obj[2] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  54. 54. Print Obj[3] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  55. 55. Print Obj[4] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  56. 56. Print Obj[5] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  57. 57. Print Obj[6] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  58. 58. Print Obj[7] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  59. 59. Print Obj[8] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  60. 60. 1st Script Section 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  61. 61. From Text to Diagrams: FAST ACCURATE CHEAP Diagrams Text o Verbose Simple P1 OMSG ReadExcl A=0x420500 dst=M0 req=P1 M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1 o Birds-Eye View: Birds-Eye-View: –S L O W FAST o Hard-to-Read Easy-to-read 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  62. 62. Limitations • When Message Sequence Charts become: TOO BIG • Alternate Visualization Techniques – PacketViz – Colored Message Log sub-sections 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  63. 63. When MSCs Become Too Big 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  64. 64. PacketViz From Wikipedia… 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  65. 65. Script Flow for PacketViz Option 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  66. 66. Script Flow for Only PacketViz 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  67. 67. Another Visualization Technique 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  68. 68. Conclusion • Introduction to creating your own log2img script • Real-Life Limitations • Other Approaches 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
  69. 69. Thank You Ramesh Satyanarayana Marla Robinson • • Trevor Williams Rex Klopfenstein • • Christine Macneil Maryann Klopfenstein • • Karen Wilk Alan Klopfenstein • • Beth Brooks Fred Eisner • • Mike Woodacre Paul Adams • • Gerry Epstein Alan Sneider • • 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

×