A circuit design that contains at least two clock domains is simulated
using a novel system and method for injecting the effects of
metastability. The system includes detectors for detecting, during
simulation, when a clock in a transmit clock domain and a clock in a
receive clock domain are aligned and when the input of a register
receiving a clock-domain-crossing signal is changing. The system includes
coverage monitors for measuring, during simulation, statistics related to
metastability injection. The system accurately models the effects of
metastability by, at appropriate times during simulation, pseudo-randomly
inverting outputs of registers receiving clock-domain-crossing signals.
By accurately modeling the effects of metastability, errors in the
circuit design can be detected while simulating a pre-existing simulation
test. The simulation with metastability effects injection is repeatable
and requires no modification of pre-existing RTL design files or
simulation test files.