AlexSax Posted November 17, 2014 Report Share Posted November 17, 2014 Hi all, I have a doubt about the sca_sampling tracing mode. I have implemented a TDF module that performs an approximate integral of an input signal with the rectangle method and another TDF module that generates the input signal values with a timestep of 1US. I tried to trace the integrated signal using a tabular format and the function sca_sampling with a sampling time of 50NS(smaller than the TDF timestep), and I was expecting the samples having the same values between each US. On the contrary, I obtained the signal behavior as it has been sampled each 50NS. Does it mean that the TDF modules are activated every 50NS rather than every 1US? Does it happen like that because the time resolution is 1PS, smaller than both TDF and trace sampling timesteps? Thank you very much. Alessandro Quote Link to comment Share on other sites More sharing options...
maehne Posted November 17, 2014 Report Share Posted November 17, 2014 No, the TDF modules don't get activated every 50 ns, but every 1 us as you specified with set_timestep. However, Fraunhofer SystemC-AMS interpolates by default between floating point samples. You can control this behaviour by passing an object of type sca_util::sca_multirate to set_mode of the trace file object. The sca_multirate object can take any of three values SCA_INTERPOLATE, SCA_DONT_INTERPOLATE, or SCA_HOLD_SAMPLE. For details, cf. to clause 6.1.1.1.3 in the SystemC AMS 2.0 LRM. Quote Link to comment Share on other sites More sharing options...
AlexSax Posted November 18, 2014 Author Report Share Posted November 18, 2014 Very clear, thank you very much Torsten! Alessandro Quote Link to comment Share on other sites More sharing options...
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.