Timing Diagram
A Timing Diagram in UML is a specific type of interaction diagram that visualizes the timing constraints of a system. It focuses on the chronological order of events, showcasing how different objects interact with each other over time. Timing diagrams are especially useful in real-time systems and embedded systems to understand the behavior of objects throughout a given period. [Ref. of initial request QA-5383]
Declaring element or participant
You declare participant using the following keywords, depending on how you want them to be drawn.
| Keyword | Description |
analog
|
An analog signal is continuous, and the values are linearly interpolated between the given setpoints
|
binary
|
A binary signal restricted to only 2 states
|
clock
|
A clocked signal that repeatedly transitions from high to low, with a period, and an optional pulse and offset
|
concise
|
A simplified concise signal designed to show the movement of data (great for messages)
|
rectangle
|
A rectangle signal similar to concise but within a rectangle shape
|
robust
|
A robust complex line signal designed to show the transition from one state to another (can have many states)
|
@ notation, and the is verb.
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. QA-14631, QA-14647, QA-11288 and GH-2409]
Binary and Clock
It's also possible to have binary and clock signal, using the following keywords:
binaryclock
|
🎉 Copied!
|
|
Adding message
You can add message using the following syntax.
|
🎉 Copied!
|
|
Relative time
It is possible to use relative time with @.
|
🎉 Copied!
|
|
Anchor Points
Instead of using absolute or relative time on an absolute time you can define a time as an anchor point by using the as keyword and starting the name with a :.
@XX as :<anchor point name>
|
🎉 Copied!
|
|
Anchor Points with decimal offset
|
🎉 Copied!
|
|
[Ref. QA-17885]
Participant oriented
Rather than declare the diagram in chronological order, you can define it by participant.
|
🎉 Copied!
|
|
Setting scale
You can also set a specific scale.
|
🎉 Copied!
|
|
When using absolute Times/Dates, 1 "tick" is equivalent to 1 second.
|
🎉 Copied!
|
|
Initial state
You can also define an inital state.
|
🎉 Copied!
|
|
Intricated state
A signal could be in some undefined state.
Intricated or undefined robust state
|
🎉 Copied!
|
|
Intricated or undefined binary state
|
🎉 Copied!
|
|
[Ref. QA-11936 and QA-15933]
Hidden state
It is also possible to hide some state.
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. QA-12222]
Negative time value
|
🎉 Copied!
|
|
[Ref. QA-7698]
Hide time axis
It is possible to hide time axis.
|
🎉 Copied!
|
|
Using Time and Date
It is possible to use time or date.
|
🎉 Copied!
|
|
|
🎉 Copied!
|
|
[Ref. QA-7019]
Change Date Format
It is also possible to change date format.
|
🎉 Copied!
|
|
Manage time axis labels
You can manage the time-axis labels.
Label on each tick (by default)
|
🎉 Copied!
|
|
Manual label (only when the state changes)
|
🎉 Copied!
|
|
[Ref. GH-1020]
Adding constraint
It is possible to display time constraints on the diagrams.
|
🎉 Copied!
|
|
Highlighted period
You can highlight a part of diagram.
|
🎉 Copied!
|
|
[Ref. QA-10868]
Using notes
You can use the note top of and note bottom of
keywords to define notes related to a single object or participant (available only for concise or binary object).
|
🎉 Copied!
|
|
[Ref. QA-6877, GH-1465]
Adding texts
You can optionally add a title, a header, a footer, a legend and a caption:
|
🎉 Copied!
|
|
Complete example
Thanks to Adam Rosien for this example.
|
🎉 Copied!
|
|
Digital Example
|
🎉 Copied!
|
|
Adding color
You can add color.
|
🎉 Copied!
|
|
[Ref. QA-5776]
Using (global) style
Without style (by default)
|
🎉 Copied!
|
|
With style
You can use style to change rendering of elements.
|
🎉 Copied!
|
|
[Ref. QA-14340]
Applying Colors to specific lines
You can use the <style> tags and sterotyping to give a name to line attributes.
|
🎉 Copied!
|
|
[Ref. QA-15870]
Compact mode
You can use compact command to compact the timing layout.
By default
|
🎉 Copied!
|
|
Global mode with mode compact
|
🎉 Copied!
|
|
Local mode with only compact on element
|
🎉 Copied!
|
|
[Ref. QA-11130]
Scaling analog signal
You can scale analog signal.
Without scaling: 0-max (by default)
|
🎉 Copied!
|
|
With scaling: min-max
|
🎉 Copied!
|
|
[Ref. QA-17161]
Customise analog signal
Without any customisation (by default)
|
🎉 Copied!
|
|
With customisation (on scale, ticks and height)
|
🎉 Copied!
|
|
[Ref. QA-11288]
Order state of robust signal
Without order (by default)
|
🎉 Copied!
|
|
With order
|
🎉 Copied!
|
|
With order and label
|
🎉 Copied!
|
|
[Ref. QA-6651]
Defining a timing diagram
By Clock (@clk)
|
🎉 Copied!
|
|
By Signal (@S)
|
🎉 Copied!
|
|
By Time (@time)
|
🎉 Copied!
|
|
[Ref. QA-9053]
Annotate signal with comment
|
🎉 Copied!
|
|
[Ref. QA-15762, and QH-888]