meas_ber :
A primitive for measuring the bit-error rate of a data stream.
The meas_ber
primitive measures the bit-error rate of a data stream in
by comparing it either with the external reference data stream in_ref
(mode=”ext” or “in”) or with an internal PRBS reference (mode=”int” or “prbs”). In case of using an internal PRBS reference, the parameter length
defines the LFSR length N, generating a pseudo-random bit sequence with a length of 2^N-1. The value range of length
is 3~128 (default: 7).
The parameter trig_mode
defines whether the inputs in
and in_ref
are sampled at the positive edge (1), negative edge (-1), or both edges (0) of the input clk
. By default, the inputs are sampled at the negative edge of clk
(-1), assuming the data transitions are aligned with the positive edges of clk
. The parameters start
and stop
define when the measurement begins and ends, respectively.
Input/Output Terminals
Name | I/O | Type | Description |
bit_err | output | reg | bit error indicator |
prb_err | output | real | bit error probability |
in | input | xbit | input signal |
in_ref | input | xbit | reference signal |
clk | input | xbit | clock signal |
Parameters
Name | Type | Default | Unit | Description |
mode | string | “ext” | None | reference source |
length | integer | 7 | None | reference LFSR length |
trig_mode | integer | -1 | None | triggering mode |
start | real | 0.0 | seconds | abs. time to start measurement |
stop | real | -1.0 | seconds | abs. time to stop measurement |