mixed signal timing diagram

+2 votes
asked Apr 24, 2020 in Wanted features by matt-chv (160 points)
Would it be possible to extend timing diagrams to cover mixed signals :

voltage ramping up and down

as well as

clock start and stopping?

Something like:

@startuml
clock clk with period 1 reset is 0
binary "Enable" as EN
analog "Vcore" as VDD

@0
EN is low
clk is reset
VDD is 0
@1
VDD is 1.8
@3
EN is high
clk is active
@10
EN is low
clk is reset
@11
VDD is 1.8
@20
VDD is 0.3
@50
VDD is 0
@enduml

1 Answer

+1 vote
answered Apr 26, 2020 by plantuml (257,860 points)

Thanks for the suggestion !

Let's focus on analog first.

With last beta http://beta.plantuml.net/plantuml.jar you can now have :

@startuml
clock clk with period 1
binary "Enable" as EN
analog "Vcore" as VDD

@0
EN is low
VDD is 0
@1
VDD is 1.8
@3
EN is high
@10
EN is low
@11
VDD is 1.8
@20
VDD is 0.3
@50
VDD is 0
@enduml

This is not final yet : there are no value displayed for y-axes. I am not sure where we should display it.

So any idea is welcome :-)

commented Apr 28, 2020 by matt-chv (160 points)

Thanks for this quick beta proposal.

My feedback:

  • The "analog" signals should be continuous their value should be linearly interpolated between the given setpoints (see attached picture with thick red line for proposal)
  • the scale could be a min-max (in absence of parameters in the script)
  • the relative size could be 2x or 3x compared to a digital signal
Below an edited image from your code example (gist)
red lines for suggested alternative rendering from beta_20200428
commented Apr 28, 2020 by plantuml (257,860 points)

Ok, we have improved things in last beta http://beta.plantuml.net/plantuml.jar

Right now, the minimum is hard coded to 0

Maybe we shoud extends "analog" definition to something like :

analog "Vcore" between 1.5 and 2.5 as VDD

or :

analog "Vcore" between -2.0 and 2.5 in V as VDD

(to print the unit "V")

But we are out of inspiration about the right syntax... feedback welcome :-)

commented Apr 29, 2020 by matt-chv (160 points)

on the syntax, my proposal would be:

  • the unit should be included in the label when defined, something like "Vcore (V)"
  • the min max could be defined as you suggested: `between -2.0 and 2.5`
  • the ticks on the yaxis should be an option ticks label/num multiple so options could be:
    • `ticks label # on multiple 10` -> shows a # on the y axis for any 10 multiple between min and max 
    • `ticks num on multiple 10` -> shows the y-value on the y axis for any 10 multiple between min and max

some full definition being possibly:

  • analog "Vcore" between 0 and 1.8 as VDD
  • analog "VIO" between 0 and 3.3 as VIO ticks label # on multiple 1
  • analog "VUSB" between 0 and 5.5 as VUSB ticks num on multiple 5
commented May 1, 2020 by plantuml (257,860 points)

We've made progress in last beta http://beta.plantuml.net/plantuml.jar

You can now have :

@startuml
analog "Vcore" as VDD
analog "VCC" between -4.5 and 6.5 as VCC
VCC ticks num on multiple 3
VCC is 200 pixels height

@0
VDD is 0
VCC is 3
@2
VDD is 0
@3
VDD is 6
VCC is 6
VDD@1 -> VCC@2 : "test"
@enduml

The result is here

You can still ask for improvement :-)

commented Nov 6, 2020 by Glen R
is it possible to have a variation on "analog" which is "digital". it would follow the same rules you have done already for analog, but it would not interpolate the between the points.

One of the main value adds with analog is that it does the correct scaling of values. so while we could get the discrete values using robust type, I found it doesn't do the value scaling.
...