mormathis Posted April 18, 2016 Report Share Posted April 18, 2016 Hi, i'm currently working on a Battery Model in SystemC AMS. I have a working model in Simulink and now i try to adopt this system in SystemC AMS. If i connect the current sinks TDF output with the model i get the following error: Error: SystemC-AMS: System is not scheduable - last scheduable element: impuls Do someone know what this error means and how i can solve my problem? Thanks for you help Mathias Quote Link to comment Share on other sites More sharing options...
Martin Barnasconi Posted April 18, 2016 Report Share Posted April 18, 2016 I expect you have a loop (feedback path) in your design topology. This results in a circular dependency which cannot be resolved by the scheduler. To resolve this, add one time step delay, for example by specifying this delay in one of the output ports in the feedback path. Bruno and mormathis 2 Quote Link to comment Share on other sites More sharing options...
mormathis Posted April 19, 2016 Author Report Share Posted April 19, 2016 Thank you very much for your hint. I added a delay of a time step and it worked out. Quote Link to comment Share on other sites More sharing options...
Bruno Posted August 3, 2018 Report Share Posted August 3, 2018 Hi, I got the same problem with the scheduling whilst modeling a PID controller with PWM and DC motor. However, adding the 1 step delay in the output port of the feedback path, caused another error: SystemC-AMS: Access to sample >= rate not allowed for port: motor.in I don't understand why I need to change the input rate. Any tips? Quote Link to comment Share on other sites More sharing options...
Martin Barnasconi Posted August 3, 2018 Report Share Posted August 3, 2018 It looks like you have a multi-rate system, i.e. somewhere you defined a <port>.set_rate(..) in a set_attributes callback. Now you try to access the n-th sample at this port, like <port>.read(<sample>), but the nth sample is higher than the rate specified. This means you have either the wrong rate, or reading a sample outside the range defined by the rate. maehne 1 Quote Link to comment Share on other sites More sharing options...
Bruno Posted August 3, 2018 Report Share Posted August 3, 2018 Thank you @Martin Barnasconi, That was exactly what it was happening. I had a <port>.read(<sample>) with a specific sample. 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.