The function of generating HDL code has an error with the names of blocks in the same Subsystem
2 ビュー (過去 30 日間)
古いコメントを表示
Anyone know how to fix this please help me.
I'm currently working on this example: https://www.mathworks.com/help/wireless-hdl/ug/hdlofdmtransmitter.html
and in the subsystem "OFDM Transmitter" will contain the subsystem "whdlOFDMTx Model". When I do generate HDL code, the name of the subsystem "whdlOFDMTx Model" is "whdlOFDMTx_whdlOFDMTx" but in the HDL code of the top file its name is "whdlOFDMTx"; Similar to the blocks "frame_controller_and_input_sampler", "frame_generator", "multiplexer", "Discrete_FIr_filter", its name in the command line called "Whdlofdmtx_Frame_controller_and_input_sampler", "whdlOFDMTx_Frame Fdmtx_multyxer "," whdlOFDMTx_DISCRETE_FIR_FILTER "
This is in the code that calls the "whdlOFDMTx" subsystem block in the TOP vhdl
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1434008/image.png)
And here is the declared name of the "whdlOFDMTx" subsystem in the file vhdl
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1434013/image.png)
Therefore, it cannot recognize sub-blocks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1434018/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1434023/image.png)
Someone know please help me
回答 (3 件)
Bharath Venkataraman
2023 年 7 月 14 日
There is a configuration statement in line 101 which maps whdlOFDMTx to use the entity work_whdlOFDMTx.whdlOFDMTx_whdlOFDMTx(rtl). This tells the tool to map whdlOFDMTx to whdlOFDMTx_whdlOFDMTx.
If that is not working, you can rename all uses of whdlOFDMTx to whdlOFDMTx_whdlOFDMTx.
0 件のコメント
Kiran Kintali
2023 年 7 月 15 日
編集済み: Kiran Kintali
2023 年 7 月 15 日
" ... in the subsystem "OFDM Transmitter" will contain the subsystem "whdlOFDMTx Model". When I do generate HDL code, the name of the subsystem "whdlOFDMTx Model" is "whdlOFDMTx_whdlOFDMTx" ..."
If you are looking to control the default name of the file generated from a model reference block you can set the reference block parameter to empty (to remove the modelname prefix) or use your desired prefix string.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1435003/image.png)
hdlset_param('topmodel/bottom_model_ref', 'ReferenceModelPrefix', '');
Refer to documentation for additional info on this topic.
3 件のコメント
Kiran Kintali
2023 年 7 月 16 日
Please reach out to tech support for additional followup on the topic related to HDL code customization.
参考
カテゴリ
Help Center および File Exchange で HDL Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!