[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r6362 - gnuradio/branches/developers/matt/u2f/control_
From: |
matt |
Subject: |
[Commit-gnuradio] r6362 - gnuradio/branches/developers/matt/u2f/control_lib |
Date: |
Sat, 8 Sep 2007 00:21:24 -0600 (MDT) |
Author: matt
Date: 2007-09-08 00:21:24 -0600 (Sat, 08 Sep 2007)
New Revision: 6362
Modified:
gnuradio/branches/developers/matt/u2f/control_lib/shortfifo.v
Log:
all outputs now registered
Modified: gnuradio/branches/developers/matt/u2f/control_lib/shortfifo.v
===================================================================
--- gnuradio/branches/developers/matt/u2f/control_lib/shortfifo.v
2007-09-08 05:47:35 UTC (rev 6361)
+++ gnuradio/branches/developers/matt/u2f/control_lib/shortfifo.v
2007-09-08 06:21:24 UTC (rev 6362)
@@ -6,7 +6,7 @@
output [WIDTH-1:0] dataout,
input read,
input write,
- output full,
+ output reg full,
output reg empty);
reg [3:0] a;
@@ -27,18 +27,27 @@
begin
a <= 0;
empty <= 1;
+ full <= 0;
end
else if(read & ~write)
- if(a==0)
- empty <= 1;
- else
- a <= a - 1;
+ begin
+ full <= 0;
+ if(a==0)
+ empty <= 1;
+ else
+ a <= a - 1;
+ end
else if(write & ~read)
- if(empty)
- empty <= 0;
- else
- a <= a + 1;
-
- assign full = (a == 15);
- // FIXME will wrap if you write into a full fifo
+ begin
+ empty <= 0;
+ if(~empty)
+ a <= a + 1;
+ if(a == 14)
+ full <= 1;
+ end
+
+ // assign full = (a == 15);
+
+ // NOTE will fail if you write into a full fifo or read from an empty one
+
endmodule // shortfifo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r6362 - gnuradio/branches/developers/matt/u2f/control_lib,
matt <=