summaryrefslogtreecommitdiffstats
path: root/usrp2/control_lib/newfifo
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2010-05-20 00:30:49 -0700
committerMatt Ettus <matt@ettus.com>2010-05-20 00:30:49 -0700
commitc94256034819feb26d739e57e8cf7d3f60539e9c (patch)
tree3a816fab644bdfad55ab2f3e43dc9d43f97ebfef /usrp2/control_lib/newfifo
parentb04a1beaab300000ce2d8a5814bd2e37af48286c (diff)
downloaduhd-c94256034819feb26d739e57e8cf7d3f60539e9c.tar.gz
uhd-c94256034819feb26d739e57e8cf7d3f60539e9c.tar.bz2
uhd-c94256034819feb26d739e57e8cf7d3f60539e9c.zip
combined timed and crc cases. fifo pacer produces/consumes at a fixed rate
Diffstat (limited to 'usrp2/control_lib/newfifo')
-rw-r--r--usrp2/control_lib/newfifo/fifo_pacer.v24
1 files changed, 24 insertions, 0 deletions
diff --git a/usrp2/control_lib/newfifo/fifo_pacer.v b/usrp2/control_lib/newfifo/fifo_pacer.v
new file mode 100644
index 000000000..1bf03ab6e
--- /dev/null
+++ b/usrp2/control_lib/newfifo/fifo_pacer.v
@@ -0,0 +1,24 @@
+
+
+module fifo_pacer
+ (input clk,
+ input reset,
+ input [7:0] rate,
+ input enable,
+ input src1_rdy_i, output dst1_rdy_o,
+ output src2_rdy_o, input dst2_rdy_i,
+ output underrun, overrun);
+
+ wire strobe;
+
+ cic_strober strober (.clock(clk), .reset(reset), .enable(enable),
+ .rate(rate), .strobe_fast(1), .strobe_slow(strobe));
+
+ wire all_ready = src1_rdy_i & dst2_rdy_i;
+ assign dst1_rdy_o = all_ready & strobe;
+ assign src2_rdy_o = dst1_rdy_o;
+
+ assign underrun = strobe & ~src1_rdy_i;
+ assign overrun = strobe & ~dst2_rdy_i;
+
+endmodule // fifo_pacer