diff options
author | Josh Blum <josh@joshknows.com> | 2011-03-10 14:57:01 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-03-10 14:57:01 -0800 |
commit | db2b80617d789484b463ab81a94605adfae39de9 (patch) | |
tree | 5f1a85be7a10d76b82ba9c300005573790d1a688 /fpga/usrp2/fifo/fifo_pacer.v | |
parent | 6d744744d88f8834f91c76742cd190e204f2ae8e (diff) | |
parent | 912a697adbfcf80cc64e9c0884f6d723e6d8f003 (diff) | |
download | uhd-db2b80617d789484b463ab81a94605adfae39de9.tar.gz uhd-db2b80617d789484b463ab81a94605adfae39de9.tar.bz2 uhd-db2b80617d789484b463ab81a94605adfae39de9.zip |
Merge branch 'packet_router_2nd_dsp' into next
Diffstat (limited to 'fpga/usrp2/fifo/fifo_pacer.v')
-rw-r--r-- | fpga/usrp2/fifo/fifo_pacer.v | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fpga/usrp2/fifo/fifo_pacer.v b/fpga/usrp2/fifo/fifo_pacer.v new file mode 100644 index 000000000..1bf03ab6e --- /dev/null +++ b/fpga/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 |