How to integrate existing HDL code with Simulink model?

3 views (last 30 days)
I want to integrate legacy HDL code with a Simulink model, without using any xilinx and altera toolblocksets(black boxes from these or any other specific company)(using 2013a version). How to go about this?

Answers (1)

Tim McBrayer
Tim McBrayer on 11 Jul 2014
HDL Coder natively supports integrating external HDL code into HDL Coder designs via its BlackBox architecture, available on both Subsystem and Model Reference blocks. To choose the BlackBox architecture:
  1. Select the block you wish to use your own HDL code for
  2. Right-click on it: choose HDL Code>HDL Block Properties
  3. Change the Architecture to 'BlackBox'
  4. Configure the block and its interface as desired
This is just a bare sketch of the process. Much more detail is available in the published documentation. Search for 'Black Box' and 'BlackBox' in the HDL Coder documentation for more detail.
  3 Comments
Tim McBrayer
Tim McBrayer on 22 Jul 2014
HDL Coder will create a component instance in the generated code that expects an entity/architecture or module, language depending. How you manage the location and scripting of this additional file is up to you. The simplest way is to place a copy of your legacy HDL into the HDL Coder output directory. Then, you have all your source code in one location, and can create your project for your 3rd party tool will the full contents of your design. How exactly you do this is up to the particular EDA tool you are using.
This is only one way to do it. You can compile the legacy code into a separately, in a different library. You can use the same library as the generated code but without copying the legacy code in place. It is all up to what will work best for you.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!