From 2e37dd87234e5beddd6f76fcda714916f761f812 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 17 Feb 2012 16:52:41 -0800 Subject: dsp rework: fix dspengine_8to16 to handle padded packets --- usrp2/sdr_lib/dspengine_8to16.v | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usrp2/sdr_lib/dspengine_8to16.v b/usrp2/sdr_lib/dspengine_8to16.v index bc0aa0352..85187d78d 100644 --- a/usrp2/sdr_lib/dspengine_8to16.v +++ b/usrp2/sdr_lib/dspengine_8to16.v @@ -102,8 +102,7 @@ module dspengine_8to16 DSP_PARSE_HEADER : begin has_trailer_reg <= has_trailer; - new_header[31:16] <= access_dat_i[31:16]; - new_header[15:0] <= access_len-HEADER_OFFSET; + new_header[31:0] <= access_dat_i[31:0]; hdr_length_reg <= hdr_length; if(~is_if_data | ~convert | ~has_trailer) // ~convert is valid (16 bit mode) but both ~trailer and ~is_if_data are both @@ -111,10 +110,10 @@ module dspengine_8to16 dsp_state <= DSP_WRITE_HEADER; else begin - read_adr <= access_len - 1; // point to trailer + read_adr <= access_dat_i[15:0] + HEADER_OFFSET - 1; // point to trailer dsp_state <= DSP_READ_TRAILER; wait_for_trailer <= 0; - data_in_len <= access_len - hdr_length - HEADER_OFFSET - 1 /*trailer*/; + data_in_len <= access_dat_i[15:0] - hdr_length - 1 /*trailer*/; end end -- cgit v1.2.3