Jump to content

Constant signal in LSF module


Recommended Posts

Hello everyone,

I am implementing a module using LSF primitives and I need to add a signal to a constant value (a parameter of such module).

The first solution that came to my mind was to use a sca_tdf_source element but then I would need a tdf_module only for this constant value.

Then I thought of forcing a sca_lsf::sca_source element to provide a constant source signal as follows:

Vref("Vref", Vref_, 0.0, Vref_, 0.0, M_PI/2)

where Vref_ is the constant value.

 

Could it work this way?

 

Best regards,

Alessandro

Link to comment
Share on other sites

Indeed, you can use an sca_lsf::sca_source to generate your constant reference signal. However, you have to use the initial_value and offset parameters instead of the amplitude:

sca_lsf::sca_source Vref("Vref", Vref_, Vref_);

You don't have to provide all arguments to the sca_lsf::sca_source constructor, as they are defaulted to zero. For more details, see clause 4.2.1.12.2 of the SystemC AMS 2.0 LRM.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...