aboutsummaryrefslogtreecommitdiffstats
path: root/usrp2/vrt/vita_tx_deframer.v
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2010-07-28 18:59:03 -0700
committerMatt Ettus <matt@ettus.com>2010-07-28 18:59:03 -0700
commit41f9748a2d856aa3d1fe7b895e38ad3c4b65e11e (patch)
treef234de6d9439f0314440941e493066ac2133e2db /usrp2/vrt/vita_tx_deframer.v
parente1591e4f6730f98d7e167d09f457f567edcdae81 (diff)
downloaduhd-41f9748a2d856aa3d1fe7b895e38ad3c4b65e11e.tar.gz
uhd-41f9748a2d856aa3d1fe7b895e38ad3c4b65e11e.tar.bz2
uhd-41f9748a2d856aa3d1fe7b895e38ad3c4b65e11e.zip
sequence number reset upon programming streamid
Diffstat (limited to 'usrp2/vrt/vita_tx_deframer.v')
-rw-r--r--usrp2/vrt/vita_tx_deframer.v11
1 files changed, 8 insertions, 3 deletions
diff --git a/usrp2/vrt/vita_tx_deframer.v b/usrp2/vrt/vita_tx_deframer.v
index 58878790d..f9cd7d00d 100644
--- a/usrp2/vrt/vita_tx_deframer.v
+++ b/usrp2/vrt/vita_tx_deframer.v
@@ -2,7 +2,7 @@
module vita_tx_deframer
#(parameter BASE=0,
parameter MAXCHAN=1)
- (input clk, input reset, input clear,
+ (input clk, input reset, input clear, input clear_seqnum,
input set_stb, input [7:0] set_addr, input [31:0] set_data,
// To FIFO interface of Buffer Pool
@@ -69,13 +69,19 @@ module vita_tx_deframer
wire fifo_space;
always @(posedge clk)
+ if(reset | clear_seqnum)
+ seqnum_reg <= 4'hF;
+ else
+ if((vita_state==VITA_HEADER) & src_rdy_i)
+ seqnum_reg <= seqnum;
+
+ always @(posedge clk)
if(reset | clear)
begin
vita_state <= VITA_HEADER;
{has_streamid_reg, has_classid_reg, has_secs_reg, has_tics_reg, has_trailer_reg, is_sob_reg, is_eob_reg}
<= 0;
seqnum_err <= 0;
- seqnum_reg <= 0;
end
else
if((vita_state == VITA_STORE) & fifo_space)
@@ -107,7 +113,6 @@ module vita_tx_deframer
vita_state <= VITA_TICS;
else
vita_state <= VITA_PAYLOAD;
- seqnum_reg <= seqnum;
seqnum_err <= ~(seqnum == next_seqnum);
end // case: VITA_HEADER
VITA_STREAMID :