Best Practices
Naming conventions, prefixes, and best practices for readable and maintainable VHDL code.
Why Coding Rules?
In a real VHDL project, a file may be read by dozens of people over years. Coding rules ensure:
- Readability: understand a signal's role at first glance
- Maintainability: quickly locate a bug
- Consistency: same style throughout the team
- Code review: facilitates error detection
Naming Prefixes
Ports (external interface)
| Prefix | VHDL Mode | Meaning | Example |
|---|---|---|---|
i_ | in | Input port | i_clk, i_data, i_rst |
o_ | out | Output port | o_valid, o_data |
io_ | inout | Bidirectional port | io_bus, |