summaryrefslogtreecommitdiff
path: root/usrp2
diff options
context:
space:
mode:
authormatt2009-04-02 23:35:12 +0000
committermatt2009-04-02 23:35:12 +0000
commit04343ec5447d59bbcda0aa26dbf47fa9bbc5c5cb (patch)
tree22b761af500d14aa49b43a0f060855c863b040c6 /usrp2
parenta7280105415a5fa61dffab3f32dc431c30be59f9 (diff)
downloadgnuradio-04343ec5447d59bbcda0aa26dbf47fa9bbc5c5cb.tar.gz
gnuradio-04343ec5447d59bbcda0aa26dbf47fa9bbc5c5cb.tar.bz2
gnuradio-04343ec5447d59bbcda0aa26dbf47fa9bbc5c5cb.zip
Properly signals an error and drops the remainder of the packet if there is an overrun. ERROR_2 changed to ERROR2.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10751 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2')
-rw-r--r--usrp2/fpga/simple_gemac/rxmac_to_ll8.v18
1 files changed, 12 insertions, 6 deletions
diff --git a/usrp2/fpga/simple_gemac/rxmac_to_ll8.v b/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
index 80a489914..d4015716e 100644
--- a/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
+++ b/usrp2/fpga/simple_gemac/rxmac_to_ll8.v
@@ -7,16 +7,19 @@ module rxmac_to_ll8
reg [2:0] xfer_state;
assign ll_data = rx_data;
- assign ll_src_rdy = rx_valid | (xfer_state == XFER_ERROR);
+ assign ll_src_rdy = ((rx_valid & (xfer_state != XFER_OVERRUN2) )
+ | (xfer_state == XFER_ERROR)
+ | (xfer_state == XFER_OVERRUN));
assign ll_sof = ((xfer_state==XFER_IDLE)|(xfer_state==XFER_ERROR)|(xfer_state==XFER_OVERRUN));
assign ll_eof = (rx_ack | (xfer_state==XFER_ERROR) | (xfer_state==XFER_OVERRUN));
- assign ll_error = (xfer_state == XFER_ERROR);
+ assign ll_error = (xfer_state == XFER_ERROR)|(xfer_state==XFER_OVERRUN);
localparam XFER_IDLE = 0;
localparam XFER_ACTIVE = 1;
localparam XFER_ERROR = 2;
- localparam XFER_ERROR_2 = 3;
+ localparam XFER_ERROR2 = 3;
localparam XFER_OVERRUN = 4;
+ localparam XFER_OVERRUN2 = 5;
always @(posedge clk)
if(reset | clear)
@@ -35,12 +38,15 @@ module rxmac_to_ll8
xfer_state <= XFER_OVERRUN;
XFER_ERROR :
if(ll_dst_rdy)
- xfer_state <= XFER_ERROR_2;
- XFER_ERROR_2 :
+ xfer_state <= XFER_ERROR2;
+ XFER_ERROR2 :
if(~rx_error)
xfer_state <= XFER_IDLE;
XFER_OVERRUN :
- if(ll_dst_rdy & ~rx_valid)
+ if(ll_dst_rdy)
+ xfer_state <= XFER_OVERRUN2;
+ XFER_OVERRUN2 :
+ if(~rx_valid)
xfer_state <= XFER_IDLE;
endcase // case (xfer_state)