Hello,
how can I create cloack using floating numbers? For example a 0.5Hz clock.
clock clk with period 0.5
throws an error.
Faking a clock using a binary signal in the preprocessor is not working either as %string(...) can convert integers or strings to string form — but it cannot evaluate or stringify a non‑integer expression.
See the code below.
@startuml
binary "CLK" as CLK
!$t = 0
!$state = 0
!$max = 8
!while $t <= $max
@%string($t)
!if $state == 0
CLK is low
!$state = 1
!else
CLK is high
!$state = 0
!endif
!$t = $t + 1
!endwhile
@enduml