diff options
author | Matt Ettus <matt@ettus.com> | 2010-07-28 18:32:55 -0700 |
---|---|---|
committer | Matt Ettus <matt@ettus.com> | 2010-07-28 18:32:55 -0700 |
commit | e1591e4f6730f98d7e167d09f457f567edcdae81 (patch) | |
tree | d7370dd3678507e7623c0c621c48f00a9471bea8 /usrp2/vrt | |
parent | 4a82c0640436e69081136cafc27194fd08ab6f1d (diff) | |
download | uhd-e1591e4f6730f98d7e167d09f457f567edcdae81.tar.gz uhd-e1591e4f6730f98d7e167d09f457f567edcdae81.tar.bz2 uhd-e1591e4f6730f98d7e167d09f457f567edcdae81.zip |
attempt at avoiding infinite error messages
Diffstat (limited to 'usrp2/vrt')
-rw-r--r-- | usrp2/vrt/vita_tx_control.v | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/usrp2/vrt/vita_tx_control.v b/usrp2/vrt/vita_tx_control.v index e02866af2..35b6de4f0 100644 --- a/usrp2/vrt/vita_tx_control.v +++ b/usrp2/vrt/vita_tx_control.v @@ -46,6 +46,7 @@ module vita_tx_control localparam IBS_CONT_BURST = 2; localparam IBS_ERROR = 3; localparam IBS_ERROR_DONE = 4; + localparam IBS_ERROR_WAIT = 5; wire [31:0] CODE_UNDERRUN = {seqnum,16'd2}; wire [31:0] CODE_SEQ_ERROR = {seqnum,16'd4}; @@ -112,7 +113,12 @@ module vita_tx_control IBS_CONT_BURST : if(strobe) begin - ibs_state <= IBS_ERROR_DONE; + if(policy_next_packet) + ibs_state <= IBS_ERROR_DONE; + else if(policy_wait) + ibs_state <= IBS_ERROR_WAIT; + else + ibs_state <= IBS_ERROR; error_code <= CODE_UNDERRUN; send_error <= 1; end @@ -132,12 +138,15 @@ module vita_tx_control if(sample_fifo_src_rdy_i & eop) if(policy_next_packet | (policy_next_burst & eob)) ibs_state <= IBS_IDLE; - else - ibs_state <= IBS_ERROR_DONE; + else if(policy_wait) + ibs_state <= IBS_ERROR_WAIT; end - IBS_ERROR_DONE : - ; + IBS_ERROR_DONE : + send_error <= 0; + + IBS_ERROR_WAIT : + send_error <= 0; endcase // case (ibs_state) assign sample_fifo_dst_rdy_o = (ibs_state == IBS_ERROR) | (strobe & (ibs_state == IBS_RUN)); // FIXME also cleanout |