在 verilog 和 VHDL 中,工具的 RTL 命令可以作为 pragma 指令作为伪注释给出。我想避免在我的真实评论中使用任何这些 pragma 指令,所以我想要一个 pragma 指令触发器的完整列表。我知道的有:
-- pragma
// synthesis
-- synopsys
You can find a comprehensive list here:
http://www.sigasi.com/content/list-known-vhdl-metacomment-pragmas
As long as you don't have a comment starting with the trigger, i.e., -- <trigger> ...
, you should be safe.
For example, when using Altera Quartus, avoid comments such as
-- altera code below
,
while
-- The following is for altera.
would be fine.
您可能会找到几个这样的列表,但我怀疑它们中的任何一个都是完整的。(其中一个 zennehoy 发布的内容丢失-- psl
了。)即使某处有完整的列表,您也永远不知道供应商将来会添加哪些编译指示,因此您永远无法确定。
如果您希望您的代码尽可能可移植,您可能应该避免使用常见的供应商/工具名称开始注释,例如 zennehoy 建议的(例如 synopsys、altera、xilinx、lattice、modelsim 等)。除此之外,我会说你只需要抓住机会。