yukai Posted March 25, 2020 Report Share Posted March 25, 2020 I implemented two modules in the SystemC-AMS: A and B. The time step of A module is 1s, while the time step of B is 60s. I use set_rate(60) function to read the output from A as the input of B, but I also want input of A(1s time step) can read the output of B(60s time step). Since I cannot set_rate(1/60), is there any solution? Thanks a lot. Quote Link to comment Share on other sites More sharing options...
maehne Posted March 29, 2020 Report Share Posted March 29, 2020 Yes, you'll need to add a helper module C, which upsamples your slow signal to the fast rate, i.e., which input rate is 1 and output rate is 60. In the simplest case, you can just duplicate 60 times the same value. However, you may also implement some kind of interpolation. Note: By creating a feedback loop, you will also have to specify a suitable delay and initial samples to restore causality! I suggest that you read the section 2.1 "Modeling fundamentals" of the the SystemC AMS User's Guide to gain further insight. 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.