pwl_src_tdf
Project Library Model Name Kind
sca_basic_libraries sources_tdf pwl_src_tdf TDF Module

Parameters

Name Type Default Description
wave sca_vector<double> sca_util::sca_create_vector(0.0, 0.0, 1e-3, 1.0, 2e-3, 0.0) wave form
repeat bool true repeat sequence
sampling_time sca_core::sca_time sc_core::SC_ZERO_TIME sampling time

Ports

Name Interface Type Description
tdf_o sca_tdf::sca_out double pwl output

Description

piece wise linear source

Long Description

Timed dataflow (TDF) module of a piece wise linear source with a double outport.

The parameter wave contains a vector which describes a piece wise linear wave by time value pairs. The time is represented as a double value in seconds. The vector must have an even number of elements (time and value). The first time must be 0.0.

The output value will be linear interpolated on the requested time points. If the parameter repeat (default: true) is set to true the wave starts from the beginning after the last time point (if the time equals the last time, the value at time 0 is used and afterwards the last time (or multiple) will be subtracted from the current time). If the parameter repeat is set to false the value of the last time will be hold.

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 is sc_core::SC_ZERO_TIME no timestep will be 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 which sets the output to zero. The module accepts dynamic timesteps (accept_attribute_changes() is called in set_attributes).