diff options
author | matt <matt@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-03-31 18:03:20 +0000 |
---|---|---|
committer | matt <matt@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-03-31 18:03:20 +0000 |
commit | 1d42a9f3b19b5a506bf1b16cc5079ddf6f842213 (patch) | |
tree | 6f4372579c1853f29ad493b4773f579796edebb0 /simple_gemac/simple_gemac_tx.v | |
parent | 541facc9474da424ad8e36e407a2a55301c52b77 (diff) | |
download | uhd-1d42a9f3b19b5a506bf1b16cc5079ddf6f842213.tar.gz uhd-1d42a9f3b19b5a506bf1b16cc5079ddf6f842213.tar.bz2 uhd-1d42a9f3b19b5a506bf1b16cc5079ddf6f842213.zip |
we now inhibit our own sending when a received pause frame comes. _rx.v is currently only a skeleton for testing pause
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10721 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'simple_gemac/simple_gemac_tx.v')
-rw-r--r-- | simple_gemac/simple_gemac_tx.v | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/simple_gemac/simple_gemac_tx.v b/simple_gemac/simple_gemac_tx.v index ffc8f6e99..690fd5c37 100644 --- a/simple_gemac/simple_gemac_tx.v +++ b/simple_gemac/simple_gemac_tx.v @@ -5,7 +5,7 @@ module simple_gemac_tx output tx_clk, input [7:0] tx_data, input tx_valid, input tx_error, output tx_ack, input [7:0] ifg, input [47:0] mac_addr, input pause_req, input [15:0] pause_time, - input pause_apply, output pause_applied + input pause_apply, output reg paused ); reg tx_en_pre, tx_er_pre; @@ -72,7 +72,7 @@ module simple_gemac_tx if(~in_ifg) if(send_pause) tx_state <= TX_PAUSE; - else if(tx_valid) + else if(tx_valid & ~pause_apply) tx_state <= TX_PREAMBLE; TX_FIRSTBYTE : if(tx_error) @@ -223,6 +223,15 @@ module simple_gemac_tx GMII_TXD <= txd_pre; endcase // case (tx_state) end + + // report that we are paused only when we get back to IDLE + always @(posedge tx_clk) + if(reset) + paused <= 0; + else if(~pause_apply) + paused <= 0; + else if(tx_state == TX_IDLE) + paused <= 1; endmodule // simple_gemac_tx |