aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>2009-04-06 06:13:09 +0000
committermatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>2009-04-06 06:13:09 +0000
commitdaebd9ef5e4c88e819d8872a1b5565ec98dc2991 (patch)
tree5f40fab052f5625cbe1961d9a0f2470bb99a6fb6
parentf908e4d9c310cfaf20c673c9debe8a54d129bca3 (diff)
downloaduhd-daebd9ef5e4c88e819d8872a1b5565ec98dc2991.tar.gz
uhd-daebd9ef5e4c88e819d8872a1b5565ec98dc2991.tar.bz2
uhd-daebd9ef5e4c88e819d8872a1b5565ec98dc2991.zip
now handles odd length packets
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10779 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--control_lib/newfifo/ll8_to_fifo36.v15
1 files changed, 9 insertions, 6 deletions
diff --git a/control_lib/newfifo/ll8_to_fifo36.v b/control_lib/newfifo/ll8_to_fifo36.v
index 0d772c45c..108daa903 100644
--- a/control_lib/newfifo/ll8_to_fifo36.v
+++ b/control_lib/newfifo/ll8_to_fifo36.v
@@ -1,6 +1,6 @@
module ll8_to_fifo36
- (input clk, reset,
+ (input clk, input reset, input clear,
input [7:0] ll_data,
input ll_sof_n,
input ll_eof_n,
@@ -11,7 +11,6 @@ module ll8_to_fifo36
output f36_src_rdy_o,
input f36_dst_rdy_i );
- wire f36_full = ~f36_dst_rdy_i;
wire f36_write = f36_src_rdy_o & f36_dst_rdy_i;
// Why anybody would use active low in an FPGA is beyond me...
@@ -38,7 +37,7 @@ module ll8_to_fifo36
always @(posedge clk)
if(ll_eof)
- f36_occ <= state[1:0];
+ f36_occ <= state[1:0] + 1;
else
f36_occ <= 0;
@@ -64,8 +63,12 @@ module ll8_to_fifo36
else
state <= 3;
3 : state <= 4;
- 4 : if(~f36_full)
- state <= 1;
+ 4 :
+ if(f36_dst_rdy_i)
+ if(ll_eof)
+ state <= 4;
+ else
+ state <= 1;
endcase // case(state)
else
if(f36_write)
@@ -87,7 +90,7 @@ module ll8_to_fifo36
if(ll_src_rdy & ((state==0) | f36_write))
dat0 <= ll_data;
- assign ll_dst_rdy = ~f36_full | (state != 4);
+ assign ll_dst_rdy = f36_dst_rdy_i | (state != 4);
assign f36_data = {f36_occ,f36_eof,f36_sof,dat0,dat1,dat2,dat3}; // FIXME endianess
assign f36_src_rdy_o = (state == 4);