Download - Dklopfenstein Designcon08
How to quickly create complicated
message sequence charts
automatically without spending automatically without spending
money on software.
Debra Klopfenstein, SGI
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
A Simple Story
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Gets Complicated Quickly…
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Event Order is Added…
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Hundreds of Thousands of Stories!
• Goal is Speed, Accuracy (Cheap):
–Understand
–Explain–Explain
–Document
–Debug
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
A Picture is…
• A Picture is Helpful:
– Can Not Forget Important Events
– Less Confusing than Words Alone
– More Concise 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.
Agenda
• How you can implement
Automatic Picture Generation
• Real-Life Limitations
• Other Approaches
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
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.
Event Flow among Logic Blocks
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Message Sequence Chart Format
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
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 =P1M0 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.
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 OMSGExclSpec+D A=0x420500 dst =P0 req =P1M0 OMSGExclSpec+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.
Message Sequence Chart Coordinates
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
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 =P1M0 IMSG ReadExcl A=0x420500 dst =M0 req =P1
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
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.
Log File with Coordinates
Y=0 P1( X=1) OMSG ReadExclY=1 M0(X=2) IMSG ReadExclY=2 M0(X=2) DirState: E{P0}->BUSY{P1}Y=3 M0(X=2) OMSG InterExclY=4 M0(X=2) OMSG ExclSpec+DY=4 M0(X=2) OMSG ExclSpec+DY=5 P0( X=0) IMSG InterExclY=6 P0( X=0) CchState: E->IY=7 P0( X=0) OMSG PurgeY=8 P0( X=0) OMSG ExclAck+DY=9 P1( X=1) IMSG ExclSpec+D
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Message Sequence Chart Format
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
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.
Contains Rectangles
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Contains Straight Lines
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Contains Bent Lines
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Contains Text
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Image Object Placement
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Message Arrow Placement
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
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.
Diagram Comparison
Logic Diagram
• Many Object Types
– Straight Lines
– Text
– Rectangles of different sizes
Message Sequence Chart
• Two Object Types
– Straight Lines
– Text
– Rectangles of different sizes
– Bent Lines
• Placement
– Complex
– Has Dependencies
– Hard-to-Follow
• Placement
– Simple
– Predictable
– Easy-to-Follow
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Script Overview
1. Inputs and Outputs
2. Innards
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Log2img Inputs and Outputs
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Multiple Graphics Outputs. How?
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Input to convert
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Graphic Format Requirements
• Easy for an ASIC Engineer to write:
–Origin in upper left
–Easy to create lines–Easy to create lines
–Easy to create text
–Graphics file contains text, not binary
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Input to convert: FIG Format
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
FIG Format: Text Log(X,Y)
# ReadExcl Text# ReadExcl Text
# etc.. X Y Text
# ----- ---- ---- --------
4 (...) 1 0 ReadExcl
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
FIG Format: Text Fig(X,Y)
# ReadExcl Text# ReadExcl Text
# etc.. X Y Text
# ----- ---- ---- --------
4 (...) 1000 1800 ReadExcl
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
FIG Format: Text Angle
# ReadExcl Text# ReadExcl Text
# .. AngleRadians X Y Text
# -- -------- -- ---- ---- --------
4 .. -0.16514 .. 1000 1800 ReadExcl
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
FIG Format: Text Angle
# .. AngleRadians X Y Text
# -- -------- -- ---- ---- --------
4 .. -0.16514 .. 1000 1800 ReadExcl
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
SOH-CAH-TOA
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
SOH-CAH-TOA
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
FIG Format for Lines
# ReadExcl Arrow# 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.
1st Script Section
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Grouping Image Objects
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Two kinds of Image Objects
• Message Image Objects
• Text Image Objects• Text Image Objects
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Msg Image Object 0 (1st Section)
P1 OMSGReadExcl A=0x420500 dst =M0 req =P1P1 OMSGReadExcl 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.
Msg Image Object 0 (2nd Section)
P1 OMSG ReadExcl A=0x420500 dst =M0 req =P1P1 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.
How to Match Msg Image Sections
P1 OMSG ReadExcl A=0x420500 dst =M0 req =P1P1 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.
Text Image Object 1
P1 OMSG ReadExcl A=0x420500 dst =M0 req =P1P1 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.
Image Object 2 (1st section)
P1 OMSG ReadExcl A=0x420500 dst =M0 req =P1P1 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.
How to Match Msg Image Sections
P1 OMSG ReadExcl A=0x420500 dst =M0 req =P1P1 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.
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.
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.
Print Obj[0]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[1]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[2]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[3]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[4]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[5]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[6]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[7]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Print Obj[8]
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
1st Script Section
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
From Text to Diagrams:
FAST ACCURATE CHEAP
Texto Verbose
Diagrams
ü Simpleo VerboseP1 OMSG ReadExcl A=0x420500 dst=M0 req=P1M0 IMSG ReadExcl A=0x420500 dst=M0 req=P1
o Birds-Eye View:
– S L O W
o Hard-to-Read
ü Simple
ü Birds-Eye-View:Ø FAST
ü Easy-to-read
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Limitations
• When Message Sequence Charts become:
TOO BIGTOO BIG• Alternate Visualization Techniques
– PacketViz
– Colored Message Log sub-sections
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
When MSCs Become Too Big
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
PacketViz
From Wikipedia…
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Script Flow for PacketViz Option
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Script Flow for Only PacketViz
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Another Visualization Technique
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Conclusion
• Introduction to creating your own
log2img script
• Real-Life Limitations• Real-Life Limitations
• Other Approaches
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
Thank You
• Ramesh Satyanarayana
• Trevor Williams
• Christine Macneil
• Karen Wilk
• Marla Robinson
• Rex Klopfenstein
• Maryann Klopfenstein
• Alan Klopfenstein• Karen Wilk
• Beth Brooks
• Mike Woodacre
• Gerry Epstein
• Alan Klopfenstein
• Fred Eisner
• Paul Adams
• Alan Sneider
2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.