sin_src_tdf
Project Library Model Name Kind
sca_basic_libraries sources_tdf sin_src_tdf TDF Module

Parameters

Name Type Default Description
ampl double 1.0 amplitude
freq double 1.0 frequency in Hz
offset {T} {T}(0) offset
phase double 0.0 phase in degree
delay sca_core::sca_time sc_core::SC_ZERO_TIME delay
delta double 0.0 damping factor
ac_ampl double 1.0 ac amplitude
ac_phase double 0.0 ac phase in degree
sampling_time sca_core::sca_time sc_core::SC_ZERO_TIME sampling time

Ports

Name Interface Type Description
tdf_o sca_tdf::sca_out T sinusoidal output

Description

sinusoidal source

Long Description

Timed dataflow (TDF) module of a sinusoidal source of an arbitrary type. The type is specified by the template parameter T. The sinus value is calculated as double number, multiplied with the amplitude (parameter ampl), than converted to the outport type and afterwards added with the offset (parameter offset). Thus for the type of the source the cast operator to double and the addition operator (+) must be exist.

The parameter ampl (default: 1.0) specifies the amplitude of the generated wave, the parameter freq (default: 1.0) the frequency in Hz, the parameter offset (default: T(0)) the offset value, the parameter phase (default: 0.0) the phase in degree, the parameter delay (default: sc_core::SC_ZERO_TIME) the delay before the start of the wave (before the output is equal to the offset) and the parameter delta (default: 0.0) specifies the damping factor (multiplication with e-delta*(time-delay)).

For AC simulation the parameter ac_ampl (default: 1.0) specifies the amplitude and ac_phase (default: 0.0) the phase in degree. Only this two parameters are used for the AC simulation and applied for all simulated frequencies.

The parameter sampling_time (default: sc_core::SC_ZERO_TIME) specifies the timestep of the source (used by set_timestep in set_attributes). If the parameter sampling_time equals sc_core::SC_ZERO_TIME, no timestep is set by the module - in this case the timestep will be derived from the connected modules (see SystemC AMS LRM / Users Guide).

This module contains an AC implementation and accepts dynamic timesteps (accept_attribute_changes() is called in set_attributes).