In this case I had no leading or trailing zeros.
In addition to the threshold detection of the M-ary, the “Decision” component performs functions such as: Constellation rotation, Alignment and Polarization rotation … check out the help section for this component, it has lots of good information.
I didn’t bother with “Dispersion compensation” because your fiber was only 1km in length. You can add it if you wish.
It’s not surprising that BER = 0. If your system has low enough noise (and a good enough DSP) that you have a BER like 10^-10, that means for every 10^10 bits, you will encounter one error. In this system, there were only 128 bits sent, so it is highly unlikely that you would actually encounter the bit error.
To measure BER, the straight counting like the BER test set will be the most accurate method, but for very low BER systems, your sequence length will need to be impractically large. If you don’t want such a large sequence length, then you have to use estimation techniques based on statistics (like our BER analyzer).