aboutsummaryrefslogtreecommitdiffstats
path: root/usrp2/gpmc/cross_clock_reader.v
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-07-02 13:17:21 -0700
committerJosh Blum <josh@joshknows.com>2012-07-16 20:36:45 -0700
commit3e87c6ba2f4de72926cefa6aa833cb0f2191f053 (patch)
tree39cdc21be970bf1e6439b455cb7e2a6918645fa7 /usrp2/gpmc/cross_clock_reader.v
parentfebc5e2a684312f9a050bcf58fd13b2b42f38047 (diff)
downloaduhd-3e87c6ba2f4de72926cefa6aa833cb0f2191f053.tar.gz
uhd-3e87c6ba2f4de72926cefa6aa833cb0f2191f053.tar.bz2
uhd-3e87c6ba2f4de72926cefa6aa833cb0f2191f053.zip
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.
Diffstat (limited to 'usrp2/gpmc/cross_clock_reader.v')
-rw-r--r--usrp2/gpmc/cross_clock_reader.v8
1 files changed, 5 insertions, 3 deletions
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