Potential Problems to Avoid(Cont.)
Avoid using shared variables
- Debugging potential asynchronous errors very difficult
- Concept likely to change in future VHDL standards
Overloaded items cannot be resolved by return type
- Example: These overloaded functions cannot be disambiguated
The use of shared variables requires careful attention to ensure that correct values are communicated among relevant processes. For example, if one process writes a shared variable in the same simulation cycle that another process reads the variable, the VHDL standard does not define what value is read. Similarly, if two or more processes write to the same shared variable in the same simulation cycle, the standard does not define what value should be written to the variable.
Care must be taken if overloaded functions are differentiated solely by the type of their return values. The previous version of the VHDL standard, 1076-1987, did not require that differentiations on output types be supported. The current standard, 1076-1993, however, has included the requirement that differentiations based solely on output type be supported.