Skip to content

Sine Wave

Generates a sine wave using the block’s own simulation time base.

Generic over the float width: T is f64 unless the instance binds it, and every parameter and the output take that width.

With t(n) = n*dt, y(n) = amplitude * sin(2*pi*frequency*t(n) + phase) + bias.

Direction Name Type
Output y T
Name Type Default Meaning
amplitude T 1.0 Peak deviation from bias
frequency T (Hz) 1.0 Cycles per second
phase T (rad) 0.0 Phase offset at t = 0
bias T 0.0 DC offset

With dt = 0.25, amplitude = 2, frequency = 1, phase = 0, and bias = 1, outputs at t = 0, 0.25, 0.5 are 1, 3, 1.