![]() |
Network Wizard for VHDL Test Benches
|
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 ) | [ impure ] |
| Create PRBS sequence. | ||
| std_logic_vector | f_gen_seed ( data_width: in positive ) | [ impure ] |
| Create random seed. | ||
| integer | f_randnat ( minval: in natural 0 , maxval: in natural integer'high ) | [ impure ] |
| Return random integer (natural) | ||
| std_logic_vector | f_randslv ( data_width: in positive ) | [ impure ] |
| Return random std_logic_vector. | ||
| std_logic_vector | f_randsel ( data: in t_slv_arr ) | [ impure ] |
| Return random element. | ||
|
Function |
Create PRBS sequence.
| poly | Polynomial to use |
| data_width | Data width |
| length | Number of data words |
| msb_first | Pack bits MSB in data words first (True), or LSB (False) |
| init | LFSR init value |
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
|
Function |
Create PRBS sequence.
| poly | Polynomial to use |
| data_width | Data width |
| length | Number of data words |
| msb_first | Pack bits MSB in data words first (True, default), or LSB (False) |
This is an overloaded verison of f_gen_prbs with init value set to a random seed using f_gen_seed().
Example use
|
Function |
Create random seed.
| data_width | Seed vector length |
A random, non-zero seed is returned. The seed is based on the current simulation time.
Example use
|
Function |
Return random integer (natural)
| minval | Minimum value |
| maxval | Maximum value |
Return a random integer >= 0.
Example use
|
Function |
Return random std_logic_vector.
| data_width | Vector width |
Return a random std_logic_vector.
Example use
|
Function |
Return random element.
| data | Array |
Return a random element from std_logic_vector array.
Example use