TerosTechnology / vscode-terosHDL

VHDL and Verilog/SV IDE: state machine viewer, linter, documentation, snippets... and more!
https://terostechnology.github.io/terosHDLdoc/
524 stars 42 forks source link

Documentation for VHDL record types #596

Open james-ziegler opened 3 months ago

james-ziegler commented 3 months ago

Is your feature request related to a problem? Please describe. Looking to automatically generate documentation for my code, I would like record types to have information about their elements extracted to the generated documentation.

Describe the solution you'd like Many elements of VHDL code support adding comments to create a description of that element, such as signals, constants, processes, functions, etc. Currently there is no way to generate the same types of documentation for the elements in a record, only one for the record itself. Being able to describe the purpose of each element could be helpful in explaining the parts of a complex record type.

{
--! @title sample package
--! @author James Ziegler
--! @date 4/1/2024
--! @brief Sample package to demonstrate issues
--!
--! This is just a sample

library ieee;
  use ieee.std_logic_1164.all;
 package sample_package is

  --! Sample record type
  type sample_record is record
    single_bit : std_logic;                      --! Can this be used for a description of the element?
    byte_data  : std_logic_vector (7 downto 0);  --! this element is a single byte of data
  end record sample_record;

end package sample_package;
}

I would like to see the comments after each element included in the table in a more readable fashion. I'd suggest adding an extra column for records and listing each record element in a separate row along with the description for that element.

Describe alternatives you've considered Using descriptive names, but sometimes additional information is still helpful. Adding comments will give the needed information, but the type column in the Types documentation becomes difficult to read, the formatting can be very hard to read with comments included.

Additional context package This screenshot shows poor formatting when comments are added.

gmartina commented 3 weeks ago

@qarlosalberto I believe this was fixed in #599. This issue can be closed.