summaryrefslogtreecommitdiffstats
path: root/timing
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2009-12-09 21:08:49 -0800
committerMatt Ettus <matt@ettus.com>2009-12-09 21:08:49 -0800
commit03ecbc575d4aac0986fbf081f5d27a4ec877437b (patch)
tree0a3ae357dbed8cb74df1c6496f028481e7b4102e /timing
parent7adc781f0dd8b21826ce1be1f14f3dd05f1a9c57 (diff)
downloaduhd-03ecbc575d4aac0986fbf081f5d27a4ec877437b.tar.gz
uhd-03ecbc575d4aac0986fbf081f5d27a4ec877437b.tar.bz2
uhd-03ecbc575d4aac0986fbf081f5d27a4ec877437b.zip
flag packets which arrive way too early so the device doesn't sit there forever.
Diffstat (limited to 'timing')
-rw-r--r--timing/time_compare.v6
1 files changed, 4 insertions, 2 deletions
diff --git a/timing/time_compare.v b/timing/time_compare.v
index edfa7375a..a21c9f8e0 100644
--- a/timing/time_compare.v
+++ b/timing/time_compare.v
@@ -6,7 +6,8 @@ module time_compare
input [63:0] trigger_time,
output now,
output early,
- output late);
+ output late,
+ output too_early);
wire sec_match = (time_now[63:32] == trigger_time[63:32]);
wire sec_late = (time_now[63:32] > trigger_time[63:32]);
@@ -17,5 +18,6 @@ module time_compare
assign now = sec_match & tick_match;
assign late = sec_late | (sec_match & tick_late);
assign early = ~now & ~late;
-
+ assign too_early = (trigger_time[63:32] > (time_now[63:32] + 4)); // Don't wait too long
+
endmodule // time_compare