You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否在Doxygen 1.8.14的VHDL描述中使用\code命令?

Using \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, confirm VHDL_SUPPORT = YES is 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 12:10:09