Last commit after 400G Lab Measurement

This commit is contained in:
Silas Labor Zizou
2024-11-04 08:57:53 +01:00
parent cf4e0f2b12
commit 492f889dce
9 changed files with 669 additions and 266 deletions

View File

@@ -12,9 +12,9 @@ classdef Duobinary_test < matlab.unittest.TestCase
properties (MethodSetupParameter)
% Define method-level parameters for PRBS and bit pattern
% i.e.: useprbs = {0,1};
useprbs = struct('true', 1,'false', 0); % variations: {0, 1}
useprbs = struct('true', 1); % variations: {0, 1}
M = struct('M2', 2, 'M4', 4, 'M6', 6, 'M8', 8); % variations: {2, 4, 6, 8}
O = struct('O10', 10,'O11', 11,'O12', 12,'O13', 13, 'O15', 15, 'O17', 17); % variations: {10, 15, 17}
O = struct('O10', 10,'O11', 11,'O12', 12,'O13', 13, 'O15', 15, 'O17', 17, 'O18', 18, 'O19', 19); % variations: {10, 15, 17}
end
properties (TestParameter)
@@ -31,14 +31,42 @@ classdef Duobinary_test < matlab.unittest.TestCase
fsym = round(datarate / log2(M)) ;
%%%%% PRBS Generation in correct shape for Modulation Format %%%%%%
N = 2^O; %length of prbs
N = 2^(O-1); %length of prbs
[~,seed] = prbs(O,1); %initialize first seed of prbs
bitpattern=[];
if useprbs
for i = 1:log2(M)
[bitpattern(:,i),seed] = prbs(O,N,seed);
%%%%% MOVE-IT PRMS %%%%
state = struct();
para = struct();
if M == 6
para.bl = 2^(O-2);
para.dimension = 5;
else
para.bl = 2^(O-1);
para.dimension = log2(M); %2.5bits/sym -> 2 bit/sym
end
para.rand = 0;
para.order = floor(O / log2(M));
para.skip =0;
para.bruijn = 0;
para.reset_prms = 0;
para.method = 1;
data_in = [];
global loop;
loop = 0;
[data_out,state_] = prms(data_in, state, para);
loop = 1;
[data_out,state_out] = prms(data_in, state_, para);
bitpattern = data_out';
%%%%% END MOVE-IT %%%%%%%
else
s = RandStream('twister','Seed',randkey);
for i = 1:log2(M)
@@ -46,8 +74,9 @@ classdef Duobinary_test < matlab.unittest.TestCase
end
end
if M == 6
bitpattern = reshape(bitpattern,[],1);
bitpattern = reshape(bitpattern',[],1);
bitpattern = bitpattern(1:end-mod(length(bitpattern),5));
end