jhshi / openofdm

Sythesizable, modular Verilog implementation of 802.11 OFDM decoder.
http://openofdm.rtfd.io
Apache License 2.0
354 stars 183 forks source link

incorrect indexing in sync_long.v #17

Closed gchampin closed 2 years ago

gchampin commented 2 years ago

I noticed in the do_mult task the first stage of the correlation has the terms (sync_long.v, lines 467-470):

stage_X0 <= cross_corr_buf[1]; stage_X1 <= cross_corr_buf[2]; stage_X2 <= cross_corr_buf[3]; stage_X3 <= cross_corr_buf[4];

I believe the indexing should start be [0:3]. This would also be consistent with the 2nd, 3rd and 4th stages of the cross correlation.

gchampin commented 2 years ago

the indexing reflects the previous clock's indexes. The way it is written makes sense.