Simulink port annotations do not appear with HDL definition of wire/reg

2 次查看(过去 30 天)
Hello,
I've been using Simulink's annotation feature to comment on various elements in my system. For instance, double click background of diagram, start typing, get an annotation. Then drag from the edge of the annotation to an element in the diagram and a line will connect the two.
These annotations appear in the generated HDL (Verilog in my case), which is great, except for one thing: they don't appear where the annotated element is defined in the HDL.
For some elements, they do. For instance, I annotated an OR gate with a long paragraph explaining why it was necessary. This appears in full right above the "assign OR_out = ..." statement in the Verilog code. This is absolutely great!
However, if I annotate an inport or outport, the annotation does not appear with the signal definition in Verilog. Instead, we have the list of module inputs and outputs, then all the signals inside the subsystem, then finally we get to a list of comments - all the annotations I made in the subsystem that were not connected to a block of some kind.
There's tremendous value in having the comments next to what they're commenting (!!!). I'm handing off the HDL to an FPGA engineer, and if I can put the kind of comments he needs right in the Simulink diagram, this is a huge help. Also, for generic annotation blocks not attached to anything, perhaps a special HDL-specific flag is possible that would identify the annotation as the "title" of the subsystem - then the annotation would go to the right place in the HDL (top of the file?).
Thanks,
Charles

采纳的回答

Kiran Kintali
Kiran Kintali 2023-5-19
I have reported the issue to the development team.
As a workaround consider right-cliking on the port, choose port properties and use the Description: text box to enter the comment. It does seem to end up in the right place above the input port in the module/entity declaration.
  2 个评论
Charles
Charles 2023-5-19
Thanks for this - didn't realize the Description box was available. It does work as a work-around, but there's definitely something to be said for seeing that all ports are annotated without needing to look in the Description. I can live with this, though!
Charles
Kiran Kintali
Kiran Kintali 2023-5-19
Thanks for confirming the workaround addresses your issue.
I have captured the original request here. You can track the fix with this External Bug Report link.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by