ad_ip_jesd204_tpl_adc: Fix PN check for twos complement data format

For devices which have twos complement as data format the MSB of the raw
input must not be toggled.
main
Laszlo Nagy 2020-10-09 10:34:45 +01:00 committed by Laszlo Nagy
parent 6da4f61786
commit c3983d779c
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ module ad_ip_jesd204_tpl_adc_pnmon #(
localparam dst_lsb = (DATA_PATH_WIDTH - i - 1) * CONVERTER_RESOLUTION;
localparam dst_msb = dst_lsb + CONVERTER_RESOLUTION - 1;
assign pn_data_in_s[dst_msb] = tc ^ data[src_msb];
assign pn_data_in_s[dst_msb] = (~tc) ^ data[src_msb];
assign pn_data_in_s[dst_msb-1:dst_lsb] = data[src_msb-1:src_lsb];
end
endgenerate