diff options
author | Josh Blum <josh@joshknows.com> | 2010-01-22 11:56:55 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-01-22 11:56:55 -0800 |
commit | 7bf8a6df381a667134b55701993c6770d32bc76b (patch) | |
tree | 4a298fb5450f7277b5aaf5210740ae18f818c9aa /usrp2/serdes/serdes_fc_tx.v | |
parent | 8f2c33eab9396185df259639082b7d1618585973 (diff) | |
download | uhd-7bf8a6df381a667134b55701993c6770d32bc76b.tar.gz uhd-7bf8a6df381a667134b55701993c6770d32bc76b.tar.bz2 uhd-7bf8a6df381a667134b55701993c6770d32bc76b.zip |
Moved usrp2 fpga files into usrp2 subdir.
Diffstat (limited to 'usrp2/serdes/serdes_fc_tx.v')
-rw-r--r-- | usrp2/serdes/serdes_fc_tx.v | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/usrp2/serdes/serdes_fc_tx.v b/usrp2/serdes/serdes_fc_tx.v new file mode 100644 index 000000000..2fe967c8d --- /dev/null +++ b/usrp2/serdes/serdes_fc_tx.v @@ -0,0 +1,24 @@ + + +module serdes_fc_tx + (input clk, input rst, + input xon_rcvd, input xoff_rcvd, output reg inhibit_tx); + + // XOFF means stop sending, XON means start sending + // clock domain stuff happens elsewhere, everything here is on main clk + + reg [15:0] state; + always @(posedge clk) + if(rst) + state <= 0; + else if(xoff_rcvd) + state <= 255; + else if(xon_rcvd) + state <= 0; + else if(state !=0) + state <= state - 1; + + always @(posedge clk) + inhibit_tx <= (state != 0); + +endmodule // serdes_fc_tx |