* PATTERN source: a bit string with centred edges
.param vhi=1 td=10n ts=20n tr=1n tf=3n
va a 0 pattern 'vhi' 0 'td' 'tr' 'tf' 'ts' 0110
ra a 0 1k
vb b 0 pattern 'vhi' 0 'td' 1n 1n 'ts' 0110 RB=2 R
rb b 0 1k
.tran 20p 200n
.control
  run
  meas tran xr1 when v(a)=0.5 rise=1     $ 30n = td + 1*ts
  meas tran xf1 when v(a)=0.5 fall=1     $ 70n = td + 3*ts
  meas tran wf  trig v(a) val=0.9 fall=1 targ v(a) val=0.1 fall=1
  meas tran b3  when v(b)=0.5 cross=3    $ 90n: RB=2 repeats "110"
.endc
.end
