diff options
author | matt <matt@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-04-02 08:16:11 +0000 |
---|---|---|
committer | matt <matt@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-04-02 08:16:11 +0000 |
commit | 4a6e7fbd17d7e4fe4b6c8f03bb3e51d336ed2686 (patch) | |
tree | 75b606ae0754f2b5c175e3a92259db2816b6a491 | |
parent | 2a77dc7d152b98bde536e4b419f6a0474d4933aa (diff) | |
download | uhd-4a6e7fbd17d7e4fe4b6c8f03bb3e51d336ed2686.tar.gz uhd-4a6e7fbd17d7e4fe4b6c8f03bb3e51d336ed2686.tar.bz2 uhd-4a6e7fbd17d7e4fe4b6c8f03bb3e51d336ed2686.zip |
added a state to ensure the error signal propagates, and now we assert src_rdy if we have an error to propagate
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10743 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r-- | simple_gemac/rxmac_to_ll8.v | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/simple_gemac/rxmac_to_ll8.v b/simple_gemac/rxmac_to_ll8.v index cb5814ce3..80a489914 100644 --- a/simple_gemac/rxmac_to_ll8.v +++ b/simple_gemac/rxmac_to_ll8.v @@ -4,19 +4,20 @@ module rxmac_to_ll8 input [7:0] rx_data, input rx_valid, input rx_error, input rx_ack, output [7:0] ll_data, output ll_sof, output ll_eof, output ll_error, output ll_src_rdy, input ll_dst_rdy ); - reg [1:0] xfer_state; + reg [2:0] xfer_state; - assign ll_data = rx_data; - assign ll_src_rdy = rx_valid; - 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_data = rx_data; + assign ll_src_rdy = rx_valid | (xfer_state == XFER_ERROR); + 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); localparam XFER_IDLE = 0; localparam XFER_ACTIVE = 1; localparam XFER_ERROR = 2; - localparam XFER_OVERRUN = 3; - + localparam XFER_ERROR_2 = 3; + localparam XFER_OVERRUN = 4; + always @(posedge clk) if(reset | clear) xfer_state <= XFER_IDLE; @@ -33,7 +34,10 @@ module rxmac_to_ll8 else if(~ll_dst_rdy) xfer_state <= XFER_OVERRUN; XFER_ERROR : - if(~rx_valid) + if(ll_dst_rdy) + xfer_state <= XFER_ERROR_2; + XFER_ERROR_2 : + if(~rx_error) xfer_state <= XFER_IDLE; XFER_OVERRUN : if(ll_dst_rdy & ~rx_valid) |