summaryrefslogtreecommitdiff
path: root/usrp2/fpga/timing
diff options
context:
space:
mode:
authorjcorgan2009-02-10 16:35:17 +0000
committerjcorgan2009-02-10 16:35:17 +0000
commit776f05255fbed9d7beecf03759215641c74188c5 (patch)
treefb86fce24ebb455217c165239006c5f8fcc9da32 /usrp2/fpga/timing
parent9f6bc9d5da0e504008b7d692fd6c9cbe55753d90 (diff)
downloadgnuradio-776f05255fbed9d7beecf03759215641c74188c5.tar.gz
gnuradio-776f05255fbed9d7beecf03759215641c74188c5.tar.bz2
gnuradio-776f05255fbed9d7beecf03759215641c74188c5.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
Diffstat (limited to 'usrp2/fpga/timing')
-rw-r--r--usrp2/fpga/timing/time_sync.v5
1 files changed, 4 insertions, 1 deletions
diff --git a/usrp2/fpga/timing/time_sync.v b/usrp2/fpga/timing/time_sync.v
index 6b9848064..a4c021f58 100644
--- a/usrp2/fpga/timing/time_sync.v
+++ b/usrp2/fpga/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;