summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-02-17 16:52:41 -0800
committerJosh Blum <josh@joshknows.com>2012-02-17 16:52:41 -0800
commit2e37dd87234e5beddd6f76fcda714916f761f812 (patch)
tree467a4df511b078fd2a95eb2587ed37ecc96db5e4
parent2ad9e0ad6520adda571de8b1afe9d975cc09d311 (diff)
downloaduhd-2e37dd87234e5beddd6f76fcda714916f761f812.tar.gz
uhd-2e37dd87234e5beddd6f76fcda714916f761f812.tar.bz2
uhd-2e37dd87234e5beddd6f76fcda714916f761f812.zip
dsp rework: fix dspengine_8to16 to handle padded packets
-rw-r--r--usrp2/sdr_lib/dspengine_8to16.v7
1 files 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