Top Banner
How to quickly create complicated message sequence charts automatically without spending money on software. Debra Klopfenstein, SGI [email protected] 2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.
69

Dklopfenstein Designcon08

May 21, 2015

Download

Engineering

dklopfenstein

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.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dklopfenstein Designcon08

How to quickly create complicated

message sequence charts

automatically without spending automatically without spending

money on software.

Debra Klopfenstein, SGI

[email protected]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 2: Dklopfenstein Designcon08

A Simple Story

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 3: Dklopfenstein Designcon08

Gets Complicated Quickly…

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 4: Dklopfenstein Designcon08

Event Order is Added…

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 5: Dklopfenstein Designcon08

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.

Page 6: Dklopfenstein Designcon08

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.

Page 7: Dklopfenstein Designcon08

Agenda

• How you can implement

Automatic Picture Generation

• Real-Life Limitations

• Other Approaches

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 8: Dklopfenstein Designcon08

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.

Page 9: Dklopfenstein Designcon08

Event Flow among Logic Blocks

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 10: Dklopfenstein Designcon08

Message Sequence Chart Format

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 11: Dklopfenstein Designcon08

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.

Page 12: Dklopfenstein Designcon08

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.

Page 13: Dklopfenstein Designcon08

Message Sequence Chart Coordinates

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 14: Dklopfenstein Designcon08

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.

Page 15: Dklopfenstein Designcon08

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.

Page 16: Dklopfenstein Designcon08

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.

Page 17: Dklopfenstein Designcon08

Message Sequence Chart Format

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 18: Dklopfenstein Designcon08

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.

Page 19: Dklopfenstein Designcon08

Contains Rectangles

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 20: Dklopfenstein Designcon08

Contains Straight Lines

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 21: Dklopfenstein Designcon08

Contains Bent Lines

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 22: Dklopfenstein Designcon08

Contains Text

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 23: Dklopfenstein Designcon08

Image Object Placement

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 24: Dklopfenstein Designcon08

Message Arrow Placement

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 25: Dklopfenstein Designcon08

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.

Page 26: Dklopfenstein Designcon08

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.

Page 27: Dklopfenstein Designcon08

Script Overview

1. Inputs and Outputs

2. Innards

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 28: Dklopfenstein Designcon08

Log2img Inputs and Outputs

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 29: Dklopfenstein Designcon08

Multiple Graphics Outputs. How?

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 30: Dklopfenstein Designcon08

Input to convert

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 31: Dklopfenstein Designcon08

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.

Page 32: Dklopfenstein Designcon08

Input to convert: FIG Format

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 33: Dklopfenstein Designcon08

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.

Page 34: Dklopfenstein Designcon08

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.

Page 35: Dklopfenstein Designcon08

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.

Page 36: Dklopfenstein Designcon08

FIG Format: Text Angle

# .. AngleRadians X Y Text

# -- -------- -- ---- ---- --------

4 .. -0.16514 .. 1000 1800 ReadExcl

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 37: Dklopfenstein Designcon08

SOH-CAH-TOA

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 38: Dklopfenstein Designcon08

SOH-CAH-TOA

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 39: Dklopfenstein Designcon08

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.

Page 40: Dklopfenstein Designcon08

1st Script Section

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 41: Dklopfenstein Designcon08

Grouping Image Objects

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 42: Dklopfenstein Designcon08

Two kinds of Image Objects

• Message Image Objects

• Text Image Objects• Text Image Objects

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 43: Dklopfenstein Designcon08

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.

Page 44: Dklopfenstein Designcon08

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.

Page 45: Dklopfenstein Designcon08

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.

Page 46: Dklopfenstein Designcon08

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.

Page 47: Dklopfenstein Designcon08

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.

Page 48: Dklopfenstein Designcon08

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.

Page 49: Dklopfenstein Designcon08

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.

Page 50: Dklopfenstein Designcon08

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.

Page 51: Dklopfenstein Designcon08

Print Obj[0]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 52: Dklopfenstein Designcon08

Print Obj[1]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 53: Dklopfenstein Designcon08

Print Obj[2]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 54: Dklopfenstein Designcon08

Print Obj[3]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 55: Dklopfenstein Designcon08

Print Obj[4]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 56: Dklopfenstein Designcon08

Print Obj[5]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 57: Dklopfenstein Designcon08

Print Obj[6]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 58: Dklopfenstein Designcon08

Print Obj[7]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 59: Dklopfenstein Designcon08

Print Obj[8]

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 60: Dklopfenstein Designcon08

1st Script Section

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 61: Dklopfenstein Designcon08

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.

Page 62: Dklopfenstein Designcon08

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.

Page 63: Dklopfenstein Designcon08

When MSCs Become Too Big

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 64: Dklopfenstein Designcon08

PacketViz

From Wikipedia…

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 65: Dklopfenstein Designcon08

Script Flow for PacketViz Option

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 66: Dklopfenstein Designcon08

Script Flow for Only PacketViz

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 67: Dklopfenstein Designcon08

Another Visualization Technique

2/5/2008 Debra Klopfenstein, © 2008 SGI. All rights reserved.

Page 68: Dklopfenstein Designcon08

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.

Page 69: Dklopfenstein Designcon08

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.