summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>2009-02-10 16:35:17 +0000
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>2009-02-10 16:35:17 +0000
commit0d55613e54c60ef90cbd28fc83a837f02060c19d (patch)
tree06a855d9212e435db68a307b9e930812c60907e1
parente60420c16ff1311aaec755be92c6b5aeb51883a0 (diff)
downloaduhd-0d55613e54c60ef90cbd28fc83a837f02060c19d.tar.gz
uhd-0d55613e54c60ef90cbd28fc83a837f02060c19d.tar.bz2
uhd-0d55613e54c60ef90cbd28fc83a837f02060c19d.zip
Merged r10418:10423 from jcorgan/pps into trunk. Adds usrp2::sync_every_pps
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10424 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--timing/time_sync.v5
1 files changed, 4 insertions, 1 deletions
diff --git a/timing/time_sync.v b/timing/time_sync.v
index 6b9848064..a4c021f58 100644
--- a/timing/time_sync.v
+++ b/timing/time_sync.v
@@ -22,6 +22,7 @@ module time_sync
reg tick_int_enable, tick_source, external_sync;
reg [31:0] tick_interval;
reg sync_on_next_pps;
+ reg sync_every_pps;
reg pps_edge;
// Generate master time
@@ -30,7 +31,7 @@ module time_sync
master_time <= 0;
else if(external_sync & sync_rcvd)
master_time <= master_time_rcvd + delta_time;
- else if(pps_ext & sync_on_next_pps)
+ else if(pps_ext & (sync_on_next_pps|sync_every_pps))
master_time <= 0;
else
master_time <= master_time + 1;
@@ -62,6 +63,7 @@ module time_sync
tick_interval <= 100000-1; // default to 1K times per second
delta_time <= 0;
pps_edge <= 0;
+ sync_every_pps <= 0;
end
else if(wb_write)
case(adr_i[2:0])
@@ -71,6 +73,7 @@ module time_sync
tick_int_enable <= dat_i[1];
external_sync <= dat_i[2];
pps_edge <= dat_i[3];
+ sync_every_pps <= dat_i[4];
end
3'd1 :
tick_interval <= dat_i;