From af018ded46343f7dba752b54a8600b5afcb656cb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 8 May 2012 13:45:26 -0700 Subject: fpga: xclock fix for edge case condition --- usrp2/gpmc/cross_clock_reader.v | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/usrp2/gpmc/cross_clock_reader.v b/usrp2/gpmc/cross_clock_reader.v index a30e0385f..a8366badc 100644 --- a/usrp2/gpmc/cross_clock_reader.v +++ b/usrp2/gpmc/cross_clock_reader.v @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,17 +26,19 @@ module cross_clock_reader output reg [WIDTH-1:0] out ); - reg [WIDTH-1:0] shadow; + reg [WIDTH-1:0] shadow0, shadow1; always @(posedge clk) begin if (rst) begin out <= DEFAULT; - shadow <= DEFAULT; + shadow0 <= DEFAULT; + shadow1 <= DEFAULT; end - else if (shadow == in) begin - out <= shadow; + else if (shadow0 == shadow1) begin + out <= shadow1; end - shadow <= in; + shadow0 <= in; + shadow1 <= shadow0; end endmodule //cross_clock_reader -- cgit v1.2.3 From db1d63ecaa76f4975b79499119419b5baff10a99 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 10 May 2012 20:31:20 -0700 Subject: e100: bump compat minor for xclock reader fix --- usrp2/top/E1x0/u1e_core.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usrp2/top/E1x0/u1e_core.v b/usrp2/top/E1x0/u1e_core.v index a98e1de34..e3d1656a6 100644 --- a/usrp2/top/E1x0/u1e_core.v +++ b/usrp2/top/E1x0/u1e_core.v @@ -454,7 +454,7 @@ module u1e_core // Readback mux 32 -- Slave #7 //compatibility number -> increment when the fpga has been sufficiently altered - localparam compat_num = {16'd9, 16'd1}; //major, minor + localparam compat_num = {16'd9, 16'd2}; //major, minor wire [31:0] reg_test32; -- cgit v1.2.3