能否在Doxygen 1.8.14的VHDL描述中使用\code命令?
\code Commands in Doxygen 1.8.14 for VHDL Docs Yes, you can definitely use the \code command (including the language-specific variant like \code{.markdown}) when documenting VHDL code with Doxygen 1.8.14. Doxygen handles VHDL comment blocks (like --! for single-line or /*! ... */ for multi-line) similarly to C++ comments, so the same syntax you used in your C++ example should translate directly to VHDL.
Here's how your example would look in VHDL:
--=========================================================================== --! \defgroup markdown_vhdl VHDL markdown test --! \brief Test markdown rendering in VHDL docs --! \date 2018 March --! --! \code{.markdown} --! ______ --! | | --! x ->-| |->- y --! |______| --! \endcode --=========================================================================== entity test is port ( x : in unsigned(3 downto 0); y : out unsigned(3 downto 0) ); end entity test; architecture behavioral of test is begin y <= x * 2; end architecture behavioral;
When you run Doxygen 1.8.14 on this, it should generate the same ASCII diagram in the documentation as your C++ version. The {.markdown} tag tells Doxygen to parse the content inside the \code block as Markdown, which works regardless of whether you're documenting C++ or VHDL—you just need to make sure Doxygen is set up to process VHDL.
A quick check to ensure things work smoothly:
- In your
Doxyfile, confirmVHDL_SUPPORT = YESis enabled (this is usually off by default, so you'll need to turn it on). - If you wanted syntax highlighting for VHDL code snippets later, you'd use
\code{.vhdl}, but for your markdown-style diagram,{.markdown}is exactly what you need.
内容的提问来源于stack exchange,提问作者Daniel J. Greenhoe

