diff options
author | Matt Ettus <matt@ettus.com> | 2010-08-19 20:25:15 -0700 |
---|---|---|
committer | Matt Ettus <matt@ettus.com> | 2010-08-19 20:25:15 -0700 |
commit | 492c5d53c31dd403817a27c6b25c30f8e089693b (patch) | |
tree | 957376b6159f3afbe97a210adbff478a9beb4784 /usrp2/extramfifo/nobl_fifo.v | |
parent | 620d22dc6ad3ca1d9343eb7535ec2e0694be36b1 (diff) | |
download | uhd-492c5d53c31dd403817a27c6b25c30f8e089693b.tar.gz uhd-492c5d53c31dd403817a27c6b25c30f8e089693b.tar.bz2 uhd-492c5d53c31dd403817a27c6b25c30f8e089693b.zip |
capacity logic fix
Diffstat (limited to 'usrp2/extramfifo/nobl_fifo.v')
-rw-r--r-- | usrp2/extramfifo/nobl_fifo.v | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usrp2/extramfifo/nobl_fifo.v b/usrp2/extramfifo/nobl_fifo.v index cec2a5c4b..62229e6c2 100644 --- a/usrp2/extramfifo/nobl_fifo.v +++ b/usrp2/extramfifo/nobl_fifo.v @@ -56,7 +56,7 @@ module nobl_fifo // Capacity is already zero; Capacity is 1 and write is asserted (lookahead); both read and write are asserted (collision) space_avail <= ~((capacity == 0) || (read&&write) || ((capacity == 1) && write) ); // Capacity has 1 cycle delay so look ahead here for corner case of read of last item in FIFO. - data_avail_int <= ~((capacity == (1 << (FIFO_DEPTH-1))) || ((capacity == ((1 << (FIFO_DEPTH-1))-1)) && read) ); + data_avail_int <= ~((capacity == ((1 << FIFO_DEPTH)-1)) || ((capacity == ((1 << FIFO_DEPTH)-2)) && read) ); wr_pointer <= wr_pointer + write; rd_pointer <= rd_pointer + (~write && read); capacity <= capacity - write + (~write && read) ; |