aboutsummaryrefslogtreecommitdiffstats
path: root/usrp2/vrt
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2010-11-21 19:04:59 -0800
committerMatt Ettus <matt@ettus.com>2010-11-21 19:04:59 -0800
commit503a69dd734be4502078b32d8aca027b0c56368f (patch)
treebee7ea6816c6dc8abe92efcb0dddaad8f4968390 /usrp2/vrt
parent5d426e98bd25381b01ef824dfeb8d5797642b096 (diff)
downloaduhd-503a69dd734be4502078b32d8aca027b0c56368f.tar.gz
uhd-503a69dd734be4502078b32d8aca027b0c56368f.tar.bz2
uhd-503a69dd734be4502078b32d8aca027b0c56368f.zip
no need for second sequence number anymore. Each dsp tx chain
generates its own flow control packets now.
Diffstat (limited to 'usrp2/vrt')
-rw-r--r--usrp2/vrt/gen_context_pkt.v15
-rw-r--r--usrp2/vrt/vita_tx_chain.v4
2 files changed, 8 insertions, 11 deletions
diff --git a/usrp2/vrt/gen_context_pkt.v b/usrp2/vrt/gen_context_pkt.v
index efc170743..bf83aeae5 100644
--- a/usrp2/vrt/gen_context_pkt.v
+++ b/usrp2/vrt/gen_context_pkt.v
@@ -7,8 +7,7 @@ module gen_context_pkt
input [31:0] streamid,
input [63:0] vita_time,
input [31:0] message,
- input [31:0] seqnum0,
- input [31:0] seqnum1,
+ input [31:0] seqnum,
output [35:0] data_o, output src_rdy_o, input dst_rdy_i);
localparam CTXT_IDLE = 0;
@@ -19,9 +18,8 @@ module gen_context_pkt
localparam CTXT_TICS = 5;
localparam CTXT_TICS2 = 6;
localparam CTXT_MESSAGE = 7;
- localparam CTXT_FLOWCTRL0 = 8;
- localparam CTXT_FLOWCTRL1 = 9;
- localparam CTXT_DONE = 10;
+ localparam CTXT_FLOWCTRL = 8;
+ localparam CTXT_DONE = 9;
reg [33:0] data_int;
wire src_rdy_int, dst_rdy_int;
@@ -36,7 +34,7 @@ module gen_context_pkt
else
if(trigger)
stored_message <= message;
- else if(ctxt_state == CTXT_FLOWCTRL1)
+ else if(ctxt_state == CTXT_DONE)
stored_message <= 0;
// Don't want to clear most of this to avoid getting stuck with a half packet in the pipe
@@ -73,14 +71,13 @@ module gen_context_pkt
always @*
case(ctxt_state)
CTXT_PROT_ENG : data_int <= { 2'b01, 16'd1, 16'd32 };
- CTXT_HEADER : data_int <= { 1'b0, (PROT_ENG_FLAGS ? 1'b0 : 1'b1), 12'b010100001101, seqno, 16'd8 };
+ CTXT_HEADER : data_int <= { 1'b0, (PROT_ENG_FLAGS ? 1'b0 : 1'b1), 12'b010100001101, seqno, 16'd7 };
CTXT_STREAMID : data_int <= { 2'b00, streamid };
CTXT_SECS : data_int <= { 2'b00, err_time[63:32] };
CTXT_TICS : data_int <= { 2'b00, 32'd0 };
CTXT_TICS2 : data_int <= { 2'b00, err_time[31:0] };
CTXT_MESSAGE : data_int <= { 2'b00, message };
- CTXT_FLOWCTRL0 : data_int <= { 2'b00, seqnum0 };
- CTXT_FLOWCTRL1 : data_int <= { 2'b10, seqnum1 };
+ CTXT_FLOWCTRL : data_int <= { 2'b10, seqnum };
default : data_int <= {2'b00, 32'b00};
endcase // case (ctxt_state)
diff --git a/usrp2/vrt/vita_tx_chain.v b/usrp2/vrt/vita_tx_chain.v
index 264b6e98a..2ec78189b 100644
--- a/usrp2/vrt/vita_tx_chain.v
+++ b/usrp2/vrt/vita_tx_chain.v
@@ -75,7 +75,7 @@ module vita_tx_chain
(.clk(clk), .reset(reset), .clear(clear_vita),
.trigger(trigger & (DO_FLOW_CONTROL==1)), .sent(),
.streamid(streamid), .vita_time(vita_time), .message(32'd0),
- .seqnum0(current_seqnum), .seqnum1(32'd0),
+ .seqnum(current_seqnum),
.data_o(flow_data), .src_rdy_o(flow_src_rdy), .dst_rdy_i(flow_dst_rdy));
trigger_context_pkt #(.BASE(BASE_CTRL)) trigger_context_pkt
(.clk(clk), .reset(reset), .clear(clear_vita),
@@ -86,7 +86,7 @@ module vita_tx_chain
(.clk(clk), .reset(reset), .clear(clear_vita),
.trigger((error|ack) & (REPORT_ERROR==1)), .sent(),
.streamid(streamid), .vita_time(vita_time), .message(message),
- .seqnum0(current_seqnum), .seqnum1(32'd0),
+ .seqnum(current_seqnum),
.data_o(err_data_int), .src_rdy_o(err_src_rdy_int), .dst_rdy_i(err_dst_rdy_int));
assign debug = debug_vtc | debug_vtd;