commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r7340 - usrp2/trunk/fpga/timing


From: matt
Subject: [Commit-gnuradio] r7340 - usrp2/trunk/fpga/timing
Date: Fri, 4 Jan 2008 10:59:48 -0700 (MST)

Author: matt
Date: 2008-01-04 10:59:47 -0700 (Fri, 04 Jan 2008)
New Revision: 7340

Modified:
   usrp2/trunk/fpga/timing/time_sync.v
Log:
fixed time_sync interrupt


Modified: usrp2/trunk/fpga/timing/time_sync.v
===================================================================
--- usrp2/trunk/fpga/timing/time_sync.v 2008-01-04 07:28:00 UTC (rev 7339)
+++ usrp2/trunk/fpga/timing/time_sync.v 2008-01-04 17:59:47 UTC (rev 7340)
@@ -6,7 +6,7 @@
    input we_i, input [31:0] dat_i, output [31:0] dat_o, output ack_o,
    input sys_clk_i, output [31:0] master_time_o,
    input pps_in, input exp_pps_in, output exp_pps_out,
-   output int_o );
+   output reg int_o );
    
    wire [31:0] master_time_rcvd;
    reg [31:0]  master_time;
@@ -94,6 +94,15 @@
    assign pps_ext = pps_in_d1 & ~pps_in_d2;
 
    // Need to register this?
-   assign int_o = tick_int_enable & internal_tick;
+   reg           internal_tick_d1;
+   always @(posedge sys_clk_i) internal_tick_d1 <= internal_tick;
    
+   always @(posedge wb_clk_i)
+     if(rst_i)
+       int_o <= 0;
+     else if(tick_int_enable & (internal_tick | internal_tick_d1))
+       int_o <= 1;
+     else
+       int_o <= 0;
+   
 endmodule // time_sync





reply via email to

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