Scrambler¶
A scrambler is a software or hardware device (algorithm) that performs scrambling, i.e. reversible transformation of a digital stream without changing the transmission rate in order to obtain the properties of a random sequence. In this example, scrambling is implemented with a "Pseudo Random Binary Sequence" (PRBS). This sequence is computed due to an LFSR of length 15 given by the associated polynomial 1+ x^14 + x^15 and an initial value of 100101010000000. Also below is a figure describing the formula of the pseudorandom sequence generator.
Next, let us consider the implemented scrambling and descrambling scheme. It and bitwise comparison of the operation of this algorithm are shown in the figure below.
Let's run this model using the run function we described and save the bit error results.
function run_model(name_model)
Path = string(@__DIR__) * "/" * name_model * ".engee"
if name_model in [m.name for m in engee.get_all_models()] # Проверка условия загрузки модели в ядро
model = engee.open( name_model ) # Открыть модель
model_output = engee.run( model, verbose=true ); # Запустить модель
else
model = engee.load( Path, force=true ) # Загрузить модель
model_output = engee.run( model, verbose=true ); # Запустить модель
engee.close( name_model, force=true ); # Закрыть модель
end
return model_output
end
run_model("Scrambler_descrambler")
Let's analyse the saved values. BER is equal to zero during 1001 steps.
# Считывание из simout сохранённых сигналов
BER = simout["Scrambler_descrambler/Error Rate Calculation.Out"];
BER = collect(BER)
BER[end-3:end,:]
Conclusion¶
Based on the results of this demonstration we have studied the possibilities of realisation of the scrambling method used in DVB second generation video transmission protocols.