title: How do I compare two signals whose edges are almost in the same place?
body: <p>I am verifying part of a design which generates pulses with precisely timed edges.  I have a basic behavioral model which produces an output which is similar, but not exactly the same as the design.  The differences between the two are smaller than the precision needed for the design, so my model is good enough.  The problem is: how do I do a comparison between these two signals?</p>
  
  <p>I tried:</p>
  
  <pre><code>assert(out1 == out1_behav);
  </code></pre>
  
  <p>But that fails since the two signals have edges which happen 1ps apart.  The design only requires that the edges be placed with 100ps precision, so I want a pass in this situation.</p>
  
  <p>I thought about using a specify block with <code>$delay()</code> timing checks, however this causes me other problems since I need to run with <code>+no_timing_checks</code> to keep my ram models from failing in this RTL sim.</p>
  
  <p>Is there a simple way to check that these edges are "almost" the same?</p>