SD stuff working for PAM6 and MLSE is also calibrated

This commit is contained in:
silas (home)
2025-08-11 16:31:09 +02:00
parent 5dbc48abc0
commit f4a22d23a2
5 changed files with 490 additions and 352 deletions

View File

@@ -29,7 +29,7 @@ classdef PAMmapper
obj.levels = obj.get_levels();
obj.scaling = rms(obj.get_levels());
obj.scaling = obj.get_scaling;%rms(obj.get_levels());
obj.eth_style = options.eth_style;
@@ -283,6 +283,21 @@ classdef PAMmapper
end
end
function scaling = get_scaling(obj)
switch obj.M
case 2
scaling = 1;
case 4
scaling = sqrt(5);
case 6
scaling = sqrt(10);
case 8
scaling = sqrt(21);
case 16
scaling = 1;
end
end
function [data_out] = demap_(obj,data_in)
data_in= data_in';
@@ -450,7 +465,7 @@ classdef PAMmapper
function [Signal_out] = quantize(obj,Signal_in)
constellation = obj.get_levels();
constellation = constellation ./ rms(constellation);
constellation = constellation ./ obj.scaling;
issignalclass = 0;
if isa(Signal_in,'Signal')
@@ -481,7 +496,9 @@ classdef PAMmapper
end
function bitmap = showBitMapping(obj)
bitmap = obj.demap([obj.levels ./ obj.scaling]');
bitmap = obj.demap((obj.levels ./ obj.scaling)');
end
end