I have been designing a few projects on different FPGA's in VHDL, and it seems my most common source of "hard to find errors" is when I forget to synchronize an async signal, or forgets to resync a signal crossing clock domains.
My best weapon so far, has been to draw block schematic of the components.
So my questions is, what is the best design practice to prevent these errors?
Best Answer
Today even FPGA designs can have extremely complex clocking architectures and many async inputs, resulting in many potential CDC issues.
I'd say that the following points constitute a minimal set of "rules of thumb" for avoiding CDC bugs:
I'm sure that the above list of practices is incomplete, and can be easily extended.
I also suggest considering CDC verification tools (like Questa CDC from Mentor) - these tools use formal techniques to automatically detect CDC issues in your design.