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

Functions

t_slv_arr   f_bitstuff_enc (
data: in t_slv_arr
run_length: in positive
run_type: in std_logic
get_length: in boolean false
)
t_slv_arr   f_bitstuff_enc (
data: in t_slv_arr
run_length: in positive
run_type: in std_logic '1'
)
 Encode data.
natural   f_bitstuff_enc_len (
data: in t_slv_arr
run_length: in positive
run_type: in std_logic '1'
)
 Get encoded data length.
t_slv_arr   f_bitstuff_dec (
data: in t_slv_arr
run_length: in positive
run_type: in std_logic
get_length: in boolean false
)
t_slv_arr   f_bitstuff_dec (
data: in t_slv_arr
run_length: in positive
run_type: in std_logic '1'
)
 Decode data.
natural   f_bitstuff_dec_len (
data: in t_slv_arr
run_length: in positive
run_type: in std_logic '1'
)
 Get decoded data length.

Member Function Documentation

◆ f_bitstuff_enc()

t_slv_arr f_bitstuff_enc (   data in t_slv_arr ,
  run_length in positive ,
  run_type in std_logic ' 1 '  
)
Function

Encode data.

Parameters
dataData array (1bit)
run_lengthMaximum run length before stuff bit is inserted
run_typeRun-length value (default '1')
Returns
Encoded data

Encode data with bit-stuffing. If a sequence of bits with value run_type longer than run_length is enconutered, a stuff bit of inverse value is inserted.

Example use

encoded_data := f_bitstuff_enc(data_1bit, 5);

◆ f_bitstuff_enc_len()

natural f_bitstuff_enc_len (   data in t_slv_arr ,
  run_length in positive ,
  run_type in std_logic ' 1 '  
)
Function

Get encoded data length.

Parameters
dataData array (1bit)
run_lengthMaximum run length before stuff bit is inserted
run_typeRun-length value (default '1')
Returns
Encoded data length

Get length of encoded data after applying bit stuffing.

Example use

v_len := f_bitstuff_enc_len(data_1bit, 5);

◆ f_bitstuff_dec()

t_slv_arr f_bitstuff_dec (   data in t_slv_arr ,
  run_length in positive ,
  run_type in std_logic ' 1 '  
)
Function

Decode data.

Parameters
dataData array (1bit)
run_lengthMaximum run length before stuff bit is inserted
run_typeRun-length value (default '1')
Returns
Decoded data

Decode bit-stuffed data. Remove bits inserted by the encoding process.

Example use

decoded_data := f_bitstuff_dec(data_1bit, 5);

◆ f_bitstuff_dec_len()

natural f_bitstuff_dec_len (   data in t_slv_arr ,
  run_length in positive ,
  run_type in std_logic ' 1 '  
)
Function

Get decoded data length.

Parameters
dataData array (1bit)
run_lengthMaximum run length before stuff bit is inserted
run_typeRun-length value (default '1')
Returns
Decoded data length

Get length of decoded data after bit stuffing is removed.

Example use

v_len := f_bitstuff_dec_len(data_1bit, 5);

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