commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10419 - in gnuradio/branches/developers/jcorgan/pps/u


From: jcorgan
Subject: [Commit-gnuradio] r10419 - in gnuradio/branches/developers/jcorgan/pps/usrp2: firmware/lib fpga/timing
Date: Tue, 10 Feb 2009 08:32:41 -0700 (MST)

Author: jcorgan
Date: 2009-02-10 08:32:41 -0700 (Tue, 10 Feb 2009)
New Revision: 10419

Modified:
   gnuradio/branches/developers/jcorgan/pps/usrp2/firmware/lib/memory_map.h
   gnuradio/branches/developers/jcorgan/pps/usrp2/fpga/timing/time_sync.v
Log:
FPGA update to add sync_every_pps

Modified: 
gnuradio/branches/developers/jcorgan/pps/usrp2/firmware/lib/memory_map.h
===================================================================
--- gnuradio/branches/developers/jcorgan/pps/usrp2/firmware/lib/memory_map.h    
2009-02-10 15:26:58 UTC (rev 10418)
+++ gnuradio/branches/developers/jcorgan/pps/usrp2/firmware/lib/memory_map.h    
2009-02-10 15:32:41 UTC (rev 10419)
@@ -629,6 +629,25 @@
 #define TIMESYNC_BASE  0xE800
 
 typedef struct {
+  /*!
+   * \brief Time sync configuration.
+   *
+   * <pre>
+   *
+   *    3                   2                   1                       
+   *  1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+   * +-----------------------------------------------------+-+-+-+-+-+
+   * |                                                     |T|G|X|I|S|
+   * +-----------------------------------------------------+-+-+-+-+-+
+   *
+   * S - Tick source (0 = free run, 1 = pps, default=0)
+   * I - Tick interrupt enable (not implemented)
+   * X - Use external sync source (default=1)
+   * G - PPS edge selection (0=negedge, 1=posedge, default=0)
+   * T - Trigger sync every pps edge (default=0)
+   *
+   * </pre>
+   */
   volatile uint32_t tick_control;
   volatile uint32_t tick_interval;
   volatile uint32_t delta_time;

Modified: gnuradio/branches/developers/jcorgan/pps/usrp2/fpga/timing/time_sync.v
===================================================================
--- gnuradio/branches/developers/jcorgan/pps/usrp2/fpga/timing/time_sync.v      
2009-02-10 15:26:58 UTC (rev 10418)
+++ gnuradio/branches/developers/jcorgan/pps/usrp2/fpga/timing/time_sync.v      
2009-02-10 15:32:41 UTC (rev 10419)
@@ -22,6 +22,7 @@
    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 @@
        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 @@
          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 @@
              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;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]