From 3e87c6ba2f4de72926cefa6aa833cb0f2191f053 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 2 Jul 2012 13:17:21 -0700 Subject: gpmc: squashed GPMC FIFO work for E100 The control and data slaves are now both implemented as FIFOs. Requires another squash of E100 top level to use. --- usrp2/gpmc/cross_clock_reader.v | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usrp2/gpmc/cross_clock_reader.v') diff --git a/usrp2/gpmc/cross_clock_reader.v b/usrp2/gpmc/cross_clock_reader.v index a8366badc..b4cdb79c5 100644 --- a/usrp2/gpmc/cross_clock_reader.v +++ b/usrp2/gpmc/cross_clock_reader.v @@ -27,18 +27,20 @@ module cross_clock_reader ); reg [WIDTH-1:0] shadow0, shadow1; + reg [2:0] count; always @(posedge clk) begin if (rst) begin out <= DEFAULT; shadow0 <= DEFAULT; shadow1 <= DEFAULT; + count <= 0; end - else if (shadow0 == shadow1) begin - out <= shadow1; - end + else if (shadow0 == shadow1) count <= count + 1; + else count <= 0; shadow0 <= in; shadow1 <= shadow0; + if (count == 3'b111) out <= shadow1; end endmodule //cross_clock_reader -- cgit v1.2.3