Network Wizard for VHDL Test Benches
nw_prbs_pkg Package Body Reference
Package >> nw_prbs_pkg

Functions

t_slv_arr   f_gen_prbs (
poly: in std_logic_vector
data_width: in positive
length: in positive
msb_first: in boolean
init: in std_logic_vector
)
 Create PRBS sequence.
t_slv_arr   f_gen_prbs (
poly: in std_logic_vector
data_width: in positive
length: in positive
msb_first: in boolean true
)
 Create PRBS sequence.

Member Function Documentation

◆ f_gen_prbs() [1/2]

t_slv_arr f_gen_prbs (   poly in std_logic_vector ,
  data_width in positive ,
  length in positive ,
  msb_first in boolean ,
  init in std_logic_vector  
)
Function

Create PRBS sequence.

Parameters
polyPolynomial to use
data_widthData width
lengthNumber of data words
msb_firstPack bits MSB in data words first (True), or LSB (False)
initLFSR init value
Returns
PRBS sequence in data array

Generate a PRBS sequence of given length and data width. The LFSR uses Galois configuration. Example maximum length polynomials up to order 32 can be found as constants. Init value cannot be zero (would return all zero array).

Example use

array_8bit := f_gen_prbs(C_POLY_X6_X5_1, 8, 6, C_MSB_FIRST, "1111111");

◆ f_gen_prbs() [2/2]

t_slv_arr f_gen_prbs (   poly in std_logic_vector ,
  data_width in positive ,
  length in positive ,
  msb_first in boolean true  
)
Function

Create PRBS sequence.

Parameters
polyPolynomial to use
data_widthData width
lengthNumber of data words
msb_firstPack bits MSB in data words first (True, default), or LSB (False)
Returns
PRBS sequence in data array

This is an overloaded verison of f_gen_prbs with init value set to all 1's.

Example use

array_8bit := f_gen_prbs(C_POLY_X6_X5_1, 8, 6);

The documentation for this class was generated from the following file: