summaryrefslogtreecommitdiffstats
path: root/usrp2/gpif/packet_reframer.v
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2012-01-12 11:14:10 -0800
committerNick Foster <nick@nerdnetworks.org>2012-01-12 11:44:38 -0800
commit3f7ff03c098b5bdbc1134a33c1ea14953f1c2f6f (patch)
treebc9667cdfb1dfb1de3482f346fb4b96fd3c6d18a /usrp2/gpif/packet_reframer.v
parenta5a18788a7dbf230f2df396c8706d06d17c9be8b (diff)
downloaduhd-3f7ff03c098b5bdbc1134a33c1ea14953f1c2f6f.tar.gz
uhd-3f7ff03c098b5bdbc1134a33c1ea14953f1c2f6f.tar.bz2
uhd-3f7ff03c098b5bdbc1134a33c1ea14953f1c2f6f.zip
Squashed slave mode changes onto master.
Diffstat (limited to 'usrp2/gpif/packet_reframer.v')
-rw-r--r--usrp2/gpif/packet_reframer.v29
1 files changed, 14 insertions, 15 deletions
diff --git a/usrp2/gpif/packet_reframer.v b/usrp2/gpif/packet_reframer.v
index 923d499ae..0d8232653 100644
--- a/usrp2/gpif/packet_reframer.v
+++ b/usrp2/gpif/packet_reframer.v
@@ -16,7 +16,7 @@
//
-// Join vita packets longer than one GPIF frame, drop padding on short frames
+// Join vita packets longer than one GPIF frame
module packet_reframer
(input clk, input reset, input clear,
@@ -25,14 +25,16 @@ module packet_reframer
output dst_rdy_o,
output [18:0] data_o,
output src_rdy_o,
- input dst_rdy_i);
+ input dst_rdy_i,
+ output reg state,
+ output eof_out,
+ output reg [15:0] length);
- reg [1:0] state;
- reg [15:0] length;
+ //reg state;
+ //reg [15:0] length;
localparam RF_IDLE = 0;
localparam RF_PKT = 1;
- localparam RF_DUMP = 2;
always @(posedge clk)
if(reset | clear)
@@ -48,25 +50,22 @@ module packet_reframer
RF_PKT :
begin
if(length == 2)
- if(data_i[17])
- state <= RF_IDLE;
- else
- state <= RF_DUMP;
+ begin
+ state <= RF_IDLE;
+ length <= 0;
+ end
else
length <= length - 1;
end
- RF_DUMP :
- if(data_i[17])
- state <= RF_IDLE;
default :
- state<= RF_IDLE;
+ state <= RF_IDLE;
endcase // case (state)
assign dst_rdy_o = dst_rdy_i; // this is a little pessimistic but ok
- assign src_rdy_o = src_rdy_i & (state != RF_DUMP);
+ assign src_rdy_o = src_rdy_i;
wire occ_out = 0;
- wire eof_out = (state == RF_PKT) & (length == 2);
+ assign eof_out = (state == RF_PKT) & (length == 2);
wire sof_out = (state == RF_IDLE);
wire [15:0] data_out = data_i[15:0];
assign data_o = {occ_out, eof_out, sof_out, data_out};