diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-23 13:53:14 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-23 13:53:14 -0800 |
commit | 18ce33d2286a428705bc19e5dc091f2d6a6d4d5b (patch) | |
tree | c355fbde9d8804b29ab76bef7412874fe03955a1 /fpga/usrp2/vrt/gen_context_pkt.v | |
parent | 30ce5acedd3e0dc6fc97d7597781a0a4828812f2 (diff) | |
parent | 74bb6b39d9a677e6a7a41b6e3d62488aa265f706 (diff) | |
download | uhd-18ce33d2286a428705bc19e5dc091f2d6a6d4d5b.tar.gz uhd-18ce33d2286a428705bc19e5dc091f2d6a6d4d5b.tar.bz2 uhd-18ce33d2286a428705bc19e5dc091f2d6a6d4d5b.zip |
Merge branch 'fpga_next' into next
Conflicts:
fpga/usrp2/top/u1e_passthru/.gitignore
fpga/usrp2/top/u1e_passthru/Makefile
fpga/usrp2/top/u2plus/.gitignore
fpga/usrp2/top/u2plus/Makefile
usrp2/top/u1e_passthru/.gitignore
usrp2/top/u1e_passthru/Makefile
Diffstat (limited to 'fpga/usrp2/vrt/gen_context_pkt.v')
-rw-r--r-- | fpga/usrp2/vrt/gen_context_pkt.v | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fpga/usrp2/vrt/gen_context_pkt.v b/fpga/usrp2/vrt/gen_context_pkt.v index 0eb035f3e..bf83aeae5 100644 --- a/fpga/usrp2/vrt/gen_context_pkt.v +++ b/fpga/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,11 +34,12 @@ 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 always @(posedge clk) - if(reset | clear) + if(reset) begin ctxt_state <= CTXT_IDLE; seqno <= 0; @@ -72,19 +71,18 @@ 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) fifo_short #(.WIDTH(34)) ctxt_fifo - (.clk(clk), .reset(reset), .clear(clear), + (.clk(clk), .reset(reset), .clear(0), .datain(data_int), .src_rdy_i(src_rdy_int), .dst_rdy_o(dst_rdy_int), .dataout(data_o[33:0]), .src_rdy_o(src_rdy_o), .dst_rdy_i(dst_rdy_i)); assign data_o[35:34] = 2'b00; |