The Sigasi Studio documentation generator makes the documentation process easier by automatically extracting information from your HDL source files. The biggest advantage is that there is only a single source for both your design and your documentation. While this gives no guarantee for the design staying in sync with the documentation, it certainly makes it easier.
The Sigasi documentation generator has following advantages:
- No special coding requirements: the plain comments in your code are extracted for the documentation, no need for special annotations. Sigasi uses the same code/comment association as the hover provider. So to document a
port, you append a comment to a port declaration. To document an
architecture, you put the comment just on top of the architecture.
- All included. All documentation processing is done in Sigasi/Eclipse. So you do not need to install extra tools.
- Fully hyperlinked PDF. If you export the documentation, you get a fully hyperlinked PDF.
- Live preview: you can see what the documentation will look like while you type your code and comments.
You can export documentation for the entire project or a specific toplevel to pdf by clicking the save icon or via the Export… menu.
The result is saved in the
sigasi-doc folder in the root of your project.
Since Sigasi Studio 2.27 this export also saves the DocBook source code, if you have a Sigasi Studio XL Doc license. This enables you to customize the pdf generation flow to your liking. Users without a XL Doc License can also export a pdf, but it will contain a watermark.
All errors are logged to the console view.
Comments in HDL code are used to add extra information or documentation to that code. Sigasi Studio uses certain rules to determine which comment belongs to which code. This is important for documentation hovers, refactoring, formatting,... Which comment belongs to which exact code is subjective.
Sigasi Studio associates comments with HDL declarations with following rules:
- If there is a declaration before a comment and in the same line (trailing comment), the comment is associated with this declaration. This comment can span multiple single line comments if they are aligned.
- If there is no trailing comment and there is a comment with the same indentation on the line above the declaration, the comment is associated with this declaration. This comment can span multiple lines if all comments have the same indentation.
- Empty lines break comment blocks
The association rules are illustrated in the image below:
The Formatter and Structural select respect (and fix) comments according to the association rules.
Comment markup with MarkDown
VHDL and SystemVerilog comments are processed with a Markdown processor. This allows to add markup (e.g. bold, code, paragraphs, hyperlinks,...) to comments. This results in nicer hovers and documentation.
In hovers the complete Markdown syntax is supported. For PDF documentation generation following features are supported:
- paragraphs (add and empty comment line to break paragraphs)
- line breaks (by adding two trailing spaces)
- emphasis (
- strong (
- external links and email addresses (