硬件描述语言(Verilog、VHDL 等)的最佳实践是什么?
问题描述:
在实施 HDL 代码时应遵守哪些最佳实践?
What best practices should be observed when implementing HDL code?
与更常见的软件开发领域相比,有哪些共同点和不同点?
What are the commonalities and differences when compared to more common software development fields?
答
关于这个主题的最好的书是 重用方法手册.它涵盖了 VHDL 和 Verilog.
The best book on this topic is Reuse Methodology Manual. It covers both VHDL and Verilog.
特别是一些在软件中没有完全匹配的问题:
And in particular some issues that don't have an exact match in software:
- 没有闩锁
- 小心重置
- 检查您的内部和外部时间
- 仅使用可合成的代码
- 注册所有模块的输出
- 注意阻塞与非阻塞赋值
- 小心组合逻辑的敏感列表(或在 Verilog 中使用 @(*))
一些相同的包括
- 使用 CM
- 进行代码审查
- 测试(模拟)您的代码
- 在适当的时候重用代码
- 制定最新的时间表
- 有规范或用例或敏捷客户