Vhdl Coding Style for Digital Design

Only available on StudyMode
  • Download(s) : 161
  • Published : February 12, 2013
Open Document
Text Preview
1 Application Notes

Infineon
technologies

Chapter

1

VHDL Coding Guidelines

SC Highway Release 2.1, June 26, 2000

Application Notes

1

VHDL Coding Guidelines

Infineon
technologies

1.1

Introduction
Coding of design behaviour and architecture is one of the most important steps in the whole chip design project. It has major impact on logic synthesis and routing results, timing robustness, verifiability, testability and even product support. The VHDL Coding Guidelines help chip and macro development teams to rapidly understand each other's code. Macro based designs integrate easier, if these common coding styles are followed. This also applies to externally developed softcores. Codes will not need modification if simulator, synthesis tool or technology is exchanged. Code invariance wrt. Synthesis tool is given in case of a similar VHDL synthesis subset. Code invariance wrt. technology is given in case of similar performance and cell set. In addition the given guidelines enable high synthesis quality and simulation performance. The VHDL Coding Guidelines need continuous adaptation according to new tool properties and new upcoming methodologies. Please participate in this process with your design know-how. Direct your contributions and related questions to the SC Highway Frontend Hotline (hwfe@hl.siemens.de, tel.: 24666). Contribute rules for VHDL coding, that turned out to prevent errors in the downstream flow, or recommendations, that alleviate further design, re-use or maintenance. The VHDL Coding Guidelines may be passed to sub-contractors or cooperation partners. Ideally their coding works should comply to these guidelines, enabling rapid and safe integration with internally developed modules. Reading of the VHDL Coding Guidelines is most efficient at the beginning of a chip-design-project. Furthermore "Early Code Review" should be considered in a very early phase of VHDL coding as a training measure. Up to now every designer is responsible to follow relevant rules. Automated checks are not yet available. However, it is planned, to integrate such a tool into SC Highway, which will then use the rules that are given here.

2

Application Notes

SC Highway Release 2.1, June 26, 2000

Infineon
technologies

1.2 Rules by Topics

1 Application Notes

1.2

Rules by Topics
Each item is marked according to the categories t mandatory (m) t strongly recommended (r) t advisable (a) t explanatory (e)

1.2.1

Compilation
1. Configuration must be in a separated file (m) 2. A configuration declaration is needed for each architecture (m). 3. Testbench and DUT should be compiled into the same library (a). 4. Design-internal references must use library work (m). 5. Edit env-files to extend the resource-library list (e). 6. Avoid more package references than needed (a). 7. Use expanded names in binding indications and use clauses only (r).

1.2.2

Partitioning VHDL Code
1. Use standard top-levels xmpl, xmpl_top, and xmpl_chip (r). 2. Keep all objects and subprograms in the nearest possible scope (a). 3. Keep local objects invisible outside a package (a). 4. Transfer stable component declarations into component packages (a). 5. Re-use functionality of standard packages as much as possible (a). 6. A VHDL unit should not exceed 200 lines of code (a) 7. A process or subprogram should not exceed 50 lines of code (a) 8. Component instantiations should not exceed 4 levels of hierarchy (a) 9. An architecture should not contain more than 5 processes (a) 10. Size of VHDL Units(a). 11. VHDL units should take into account later floorplanning (a). 12. Asynchronous parts should be placed into separate entities (a). 13. Structural and behavioural code should not be mixed (r). 14. Define project packages early in the project (a).

SC Highway Release 2.1, June 26, 2000

Application Notes

3

VHDL Coding Guidelines

Infineon
technologies

1.2.3

Storing VHDL Code
1. Only verified VHDL code...
tracking img