cbadc.analog_signal.clock.Clock
- class cbadc.analog_signal.clock.Clock(T: float, tt: float = 1e-14, td: float = 0.0, duty_cycle: float = 0.5, max_swing: float = 2.0)[source]
Bases:
_AnalogSignalAn analog computer clock signal.
Specifically, based on a clock period T a clock represents an analog clock edge signal.
- Parameters
T (float) – the clock period
tt (float) – transition time from one clock edge to the other, defaults to 1ps.
td (float) – a global delay for the clock transition, defaults to 0.
duty_cycle (float) – a number (0, 1] representing how long the signal is high (1) relatively low (-1), defaults to 0.5.
max_swing (float) – largest permissible swing of the clock signal
- T
the clock period.
- Type
float
- tt
the transition time.
- Type
float
- td
any global time delay.
- Type
float
- duty_cycle
the duty cycle
- Type
float
- max_value
the largest value of the clock signal. Similarly, the smallest value is -max_value.
- Type
float
Methods
__init__(T[, tt, td, duty_cycle, max_swing])clock_edge(t)evaluate(t)Evaluate the signal at time \(t\).
max_step()next_tick(t)Return time of next positive clock edge relative to time t
symbolic()Returns as symbolic exression
tick()Tick the signal, i.e., update the internal state.
- evaluate(t: float) float[source]
Evaluate the signal at time \(t\).
- Parameters
t (float) – the time instance for evaluation.
- Returns
The analog signal value
- Return type
- next_tick(t)[source]
Return time of next positive clock edge relative to time t
- Parameters
t (float) – current time
- Returns
the time of next positive clock edge.
- Return type
float
- symbolic() Piecewise[source]
Returns as symbolic exression
- Returns
the resulting function
- Return type
sympy.Symbol
- tick()
Tick the signal, i.e., update the internal state.