AlexSax Posted October 9, 2014 Report Posted October 9, 2014 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 Quote
maehne Posted October 9, 2014 Report Posted October 9, 2014 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. Quote
AlexSax Posted October 9, 2014 Author Report Posted October 9, 2014 You're right Torsten, thank you very much! Best regards, Alessandro Quote
Recommended Posts
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.