V&V in model based design

1 vue (au cours des 30 derniers jours)
Seongjoo Moon
Seongjoo Moon le 24 Oct 2014
모델링 설계 design 까지 끝내고 model Design phase 상 simulink 를 이용하여 Unit test 까지 마쳤습니다.
(MCDC Coveragy 100% 완료)
근데 다시 auto code generating 하여 코드 레벨로 다시 unit test가 필요한 겁니까?
ISO26262 스펙에 보면 MBD 시 모델 레벨에서 테스팅을 할 수 있다고 되어 있는데.....
만약 Code level 에서 다시 다른 Tool을 가지고 다시 수행한다고 한다면 MBD 수행의 이점이 많이 희석되어,
그냥 Hand coding 하는 것이 낳지 않나 하는 생각이 듭니다.
답변 부탁드리겠습니다.

Réponses (1)

Sebastian Castro
Sebastian Castro le 19 Nov 2014
Hello Seongjoo,
(Sorry if this does not fully answer your question, as I used Google Translate)
Verifying your model can significantly reduce the number of bugs you detect in the code, but it does not necessarily remove them. This is why it is important to verify the code even after verifying the model.
Some examples of why it is necessary to test the code are:
  • Your code uses different libraries, for example Math libraries on an embedded processor.
  • You combine the auto-generated code with some hand-written code.
  • You have certain "rules" in your model such that you use entirely different code depending on simulation or code.(For example, coder.target in MATLAB Function blocks)
  • You are customizing the code generation process and using your own style of code that may introduce additional bugs.
Besides the above, you can use Software-in-the-loop (SIL), Processor-in-the-loop (PIL), or Hardware-in-the-loop (HIL) modes to test your code inside Simulink. This lets you use the same test vectors for both simulation and code, so this also helps reduce work.
In general, it is good to work on the model until it is in a good state. Once this is the case, you generate code and check that the model and code behave the same (or as expected).
Best,
Sebastian

Catégories

En savoir plus sur Test Model Components dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by