Replies: 3 comments 1 reply
-
Hi @domenic14 , Thanks for posting. This issue is a great learning experience for the nuances of safe embedded programming and compiler effects. To overcome this there are many strategies. The simplest one being replace '=' with '>=' if this suits your algorithm.
}` Let us know if this helped. Best wishes |
Beta Was this translation helpful? Give feedback.
-
Hi @domenic14 , Glad to ask more 😉
Hope this brings some clarity. BR |
Beta Was this translation helpful? Give feedback.
-
Hi @deyabhik, looks like I actually confused a constant with a characteristic. Whoops, I thought I used a constant. Kind regards, |
Beta Was this translation helpful? Give feedback.
-
I added a demo project to a public repo: https://github.com/domenic14/DHBW_Ascet_ErrorDemo
You should be able to clone the repo and directly use the cloned folder as an Ascet project, if there are any problems with that, feel free to reach out. The project also uses the SystemLib.
The project implements a car for which a cruise control should be implemented during a lecture. I implemented an automatic test, the exact test procedure is not relevant for this problem.
The relevant part is: In the file Test_Brake.bd there is a literal in the bottom right hand corner whose value is 6.9. The value is written to the driver's brake message from which it should be written to the car's brake message. The car's brake message is evaluated in order to check whether the test was successful. Running the test with the literal value 6.9, the test does not succeed even though while debugging one can see that the car's brake message contains the correct value. But when setting the literal to 10.0 or 7.0 (at least those are the values which I tested) the test succeeds. Using a local constant instead of a literal, the test succeeds even with a value of 6.9.
Running the test can be done the following way:
Looking at the problem with my lecturer (employee of ETAS), we think that there is a problem in the code generation.
If there is anything I can help with, I am happy to do so.
Beta Was this translation helpful? Give feedback.
All reactions