Simulink Library from my own Block created using my hand-written HDL code

조회 수: 1 (최근 30일)
I would like to create a Simulink library that has my own Simulink blocks created from my hand-written HDL code. These blocks in the Simulink library can be reused to create a Simulink model.
I knew there may be two methods below to create blocks from my hand-written HDL code, but not sure which one can be used for creating my own Simulink library.
1. VHDL code as a Black Box subsystem using Simulink® HDL Coder™
2. Create a Block from existing HDL Code using EDA Simulator Link
What is the different between first method and second one? First one is not able to do the HDL level simulation, and second one is able to do the HDL simulation?
Which method created the block can be reused in a Simulink library?
Thank you in advance for any help.

채택된 답변

Tim McBrayer
Tim McBrayer 2012년 1월 24일
Both of these methods should be able to be stored as blocks in a library model. The difference between the two lies largely in the Simulink simulation behavior.
The Black Box subsystem approach will provide you with a block that uses your HDL code verbatim for HDL code generation. The Simulink simulation behavior will be whatever the configured Simulink behavior of your subsystem is. The HDL code plays no part in the Simulink simulation; it only becomes part of the HDL code output. With this approach there is the possibility that the Simulink model and the black boxed HDL have different behaviors. It is up to the user to synchronize behavior between the two domains.
If you use EDA Simulator Link, your HDL code is used to provide the Simulink simulation behavior as well as HDL Code generation content. A third-party HDL simulator is used to co-simulate your HDL directly during Simulink simulation. Since this same HDL is used along with the output from HDL Coder for HDL-only simulation and/or synthesis, its behavior will implicitly match Simulink.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 HDL Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by