commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10779 - gnuradio/trunk/usrp2/fpga/control_lib/newfifo


From: matt
Subject: [Commit-gnuradio] r10779 - gnuradio/trunk/usrp2/fpga/control_lib/newfifo
Date: Mon, 6 Apr 2009 00:13:09 -0600 (MDT)

Author: matt
Date: 2009-04-06 00:13:09 -0600 (Mon, 06 Apr 2009)
New Revision: 10779

Modified:
   gnuradio/trunk/usrp2/fpga/control_lib/newfifo/ll8_to_fifo36.v
Log:
now handles odd length packets


Modified: gnuradio/trunk/usrp2/fpga/control_lib/newfifo/ll8_to_fifo36.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/control_lib/newfifo/ll8_to_fifo36.v       
2009-04-06 00:39:01 UTC (rev 10778)
+++ gnuradio/trunk/usrp2/fpga/control_lib/newfifo/ll8_to_fifo36.v       
2009-04-06 06:13:09 UTC (rev 10779)
@@ -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 @@
    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 @@
 
    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 @@
             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 @@
      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);
       





reply via email to

[Prev in Thread] Current Thread [Next in Thread]