summaryrefslogtreecommitdiffstats
path: root/usrp2/fifo/fifo_pacer.v
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2011-03-03 18:34:45 -0800
committerMatt Ettus <matt@ettus.com>2011-03-03 18:34:45 -0800
commite38280063a673e2f12c8196c5713c7decff7764a (patch)
tree4437cd65175b15edcfc76668a211b1375f4e19af /usrp2/fifo/fifo_pacer.v
parent8e27fc0c3c1e14e23f6f66911eb2e1aaaf061484 (diff)
parent8d82fcacc459caac6b3d4ddfd3821f69cc9037ea (diff)
downloaduhd-e38280063a673e2f12c8196c5713c7decff7764a.tar.gz
uhd-e38280063a673e2f12c8196c5713c7decff7764a.tar.bz2
uhd-e38280063a673e2f12c8196c5713c7decff7764a.zip
Merge branch 'gpmc_testing' into ethfifo_reorg
* gpmc_testing: timed packet generator : Temporarily use a checksum rather than a crc to validate packet integrity. correct port names fifo36_mux now has shortfifos on the input ports as well as output timed tester : Bring out src/dst flags for rx chain for testing. u1e: hook up tester controls move declarations to before use hook up under/overruns for debug purposes e100: integrate loopback and timed testing into main image Fix endianess for packet length and sequence number for e100 timed image. put these files in the right place. newfifo is long gone.
Diffstat (limited to 'usrp2/fifo/fifo_pacer.v')
-rw-r--r--usrp2/fifo/fifo_pacer.v24
1 files changed, 24 insertions, 0 deletions
diff --git a/usrp2/fifo/fifo_pacer.v b/usrp2/fifo/fifo_pacer.v
new file mode 100644
index 000000000..1bf03ab6e
--- /dev/null
+++ b/usrp2/fifo/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