Repository navigation
0.14.0
pip install maiman==0.14.0
The W-Port's DPO path, which the last release wrote off as unreachable and which turned out not to be.
Probabilistic constellation shaping
maiman.pcs is clause 9: the transcoder that makes FlexO-6(e), FlexO-8e and FlexO-8 DPO
different from their DO namesakes. It does not change the constellation — the line is DP-16QAM
either way — it changes which of its points come up. Each 16QAM amplitude is one bit of a pair,
and shaping makes that bit the inner amplitude more often than the outer one:
mode b shaping rate P(inner) net bits/symbol
FlexO-6(e) 72 33.7 % 0.8265 2.594
FlexO-8e 106 11.0 % 0.681 3.125
FlexO-8 116 5.71 % 0.623 3.281
Those probabilities are written nowhere in the code. The two lookup tables are bijections on
their words ordered by falling weight, so a field of nine bits reaches only the heavy half of a
ten-bit table — fewer indices, all of them low-energy words — and the measured probability falls
out of how far in a field can reach. The tests read it back off the shaper's output and compare
with the specification's Table 4.
The chain: the scrambled stream is split a bit at a time between the four encoders, each share is
cut into 84 coder blocks, and each block alternates chunks of shaping bits with runs of sign bits.
Every chunk feeds four lookup arrays round robin; each array cuts its b bits into twelve fields
that index the tables least significant bit first; each 128-bit result is rewired — a different
permutation per polarization, quadrature and encoder — and the four are bit-interleaved into a
512-bit column. Test points TP3 and TP4 come out bit for bit, for all three modes, and the shaping
inverts exactly.
The adaptation and the scrambler needed only a mode table: the DPO modes read the FlexO structure
in 2,056-bit columns instead of 10,280-bit ones, and twenty narrow rows are four wide ones, so the
CRC32 covers the same 41,120 bits either way. 433 rows and 22 CRC32s for FlexO-6(e), 522 and 27 for
FlexO-8e, 548 and 28 for FlexO-8. Verified against TP0, TP1 and TP2 for each.
Why it was reachable after all
0.13.0 said the shaping lookup tables were published only inside the document and could not be had.
That was true of the PDF. The MSA wiki also carries the specification as a .docx, and the .docx
still has the OLE attachments the PDF dropped — SCS_LUT10, SCS_LUT11 and the rewiring table. The
same wiki's test vector archive has b72, b106 and b116 members beside the qpsk and 16qam
ones this project already used, so every DPO test point is checkable.
The tables are not in this repository. They are normative data, and their within-weight ordering
is not an enumeration anything here could reproduce — colex, lexicographic and numeric were all
tried and none of them is it. So they are handled the way the OFEC vectors are: point
MAIMAN_WPORT_TABLES at a directory holding them and the shaper runs; without it, it raises and
says what is missing. What does ship is the block order — 3,552 numbers saying where each bit of an
encoder's block comes from — because that is a fact about the block's own bit classes rather than a
table quoted from the document, and it is the same permutation for every mode and every encoder.
Where the DPO path stops
At the encoder's door. That path's encoder output ordering is not the DO path's, and clause 9.2.4
permutes the last 35 bits of each codeword back through the code, so TP4 to TP5 is not modelled and
a DPO transmitter cannot yet be run to TP7. That is the one thing left on the Open list, and it is
smaller than what it replaced.
65 components, 1891 tests, every physics block checked against a closed-form or independently
computed result in CI.
🤖 Generated with Claude Code