Using Reference Model for HDL code Generation

조회 수: 2 (최근 30일)
Kamyar Khosravi
Kamyar Khosravi 2018년 4월 10일
댓글: Kamyar Khosravi 2018년 4월 11일
Hi,
Is there anyway to generate HDL code for a reference model . For example, let's say I have a subsystem that I would like to use across my design. There are currently two problems with repeating the same subsystem across the model. One is that the generated code outputs different Verilog files for each of the called subsystem. Second is that if I want to make a change to the subsystem, the change will not happen across the other subsystems. Is there a way to create a subsystem, that can be modified globally and at the same time generate only one Verilog file?
Many thanks, Kamyar

채택된 답변

Kiran Kintali
Kiran Kintali 2018년 4월 10일
Yes, you can use model reference block with HDLCoder to generate HDL code without creating duplicate copies.
  댓글 수: 2
Kiran Kintali
Kiran Kintali 2018년 4월 10일
hdlcoder_audiofiltering
Generate HDL from shipping example of an audio filter with left and right channels. It uses two atomic subsystems with identical content. HDLCoder recognizes this pattern and generates only one module and instantiates it twice.
Kamyar Khosravi
Kamyar Khosravi 2018년 4월 11일
Thank you for the feedback I managed to do it successfully.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Tim McBrayer
Tim McBrayer 2018년 4월 10일
Mark each instance of the subsystem as atomic. When marked atomic, it will generate only one output file for all instances.
Secondly, you can place your subsystem in a library. When you use a library block, each copy refers back to the original library block. Changing the library block will cause every instance to have the same change.
  댓글 수: 1
Kamyar Khosravi
Kamyar Khosravi 2018년 4월 11일
Thank you for the feedback I managed to do it successfully. Creating a library is indeed very interesting feature. Thank you for the response

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Code Generation and Deployment에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by