Using VHDL package files in Simulink

17 ビュー (過去 30 日間)
Cort
Cort 2024 年 4 月 23 日
回答済み: AKennedy 2025 年 2 月 13 日 3:21
I would like to use a VHDL package file in my simulink model. I would like to read the variables from the VHDL package file and not import the constants to the workspace
Is there a way to use the constants established in the package file easily? Or should I just read them into the workspace?
I would like to avoid using the workspace if possible.

回答 (1 件)

AKennedy
AKennedy 2025 年 2 月 13 日 3:21
To use VHDL package constants directly in a Simulink model without importing them into the MATLAB workspace, you can
  • Use HDL Verifier: If you have access to the HDL Verifier toolbox, you can co-simulate your VHDL code with Simulink. This allows you to use VHDL code directly in your Simulink model.
  • HDL Coder: If you're generating HDL code from Simulink, you can use HDL Coder to include VHDL packages. This involves Custom Code Integration (Use the Custom Code tab in the HDL Coder configuration to specify VHDL packages or files that should be included during code generation).
  • If these options are unavailable, reading constants into the MATLAB workspace might be necessary as a workaround.

カテゴリ

Help Center および File ExchangeHDL Coder についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by