PlTbUtils
1.3
PlTbUtils is a collection of functions, procedures and components for easily creating stimuli and checking response in automatic self-checking testbenches.
|
Functions | |
character | chr ( sl: in std_logic ) |
converts std_logic into a character | |
string | str ( sl: in std_logic ) |
converts std_logic into a string (1 to 1) | |
string | str ( slv: in std_logic_vector ) |
converts std_logic_vector into a string (binary base) | |
string | str ( b: in boolean ) |
converts boolean into a string | |
character | chr ( int: in integer ) |
converts an integer into a character for 0 to 9 the obvious mapping is used, higher values are mapped to the characters A-Z | |
string | str ( int: in integer , base: in integer ) |
convert integer to string using specified base | |
string | str ( int: in integer ) |
return result and add sign if required convert integer to string, using base 10 | |
string | hstr ( slv: in std_logic_vector ) |
converts a std_logic_vector into a hex string. | |
character | to_upper ( c: in character ) |
convert a character to upper case | |
character | to_lower ( c: in character ) |
convert a character to lower case | |
string | to_upper ( s: in string ) |
convert a string to upper case | |
string | to_lower ( s: in string ) |
convert a string to lower case | |
boolean | is_whitespace ( c: in character ) |
checks if whitespace (JFF) | |
string | strip_whitespace ( s: in string ) |
remove leading whitespace (JFF) | |
string | first_string ( s: in string ) |
return first non-whitespacesubstring (JFF) | |
std_logic | to_std_logic ( c: in character ) |
j points to first whitespace converts a character into a std_logic | |
std_logic_vector | chr_to_slv ( c: in character ) |
converts a character into std_logic_vector(JFF) | |
integer | chr_to_int ( c: in character ) |
converts a character into int (JFF) | |
std_logic_vector | to_std_logic_vector ( s: in string ) |
converts a binary string into std_logic_vector | |
std_logic_vector | hstr_to_slv ( s: in string ) |
converts a hex string into std_logic_vector(JFF) | |
integer | str_to_int ( s: in string ) |
converts a decimal string into an integer (JFF) |
Procedures | |
print( text: string ) | |
prints text to the screen | |
print( active: boolean , text: string ) | |
prints text to the screen when active | |
chomp( variable s: inout string ,variable shead: out string ) | |
removes first non-whitespace string from a string (JFF) | |
str_read( res_string: out string ) | |
read variable length string from input file | |
print( new_string: in string ) | |
print string to a file | |
print( char: in character ) | |
print character to a file and start new line | |
str_write( new_string: in string ) |
Definition at line 152 of file txt_util.vhd.
|
Procedure |
removes first non-whitespace string from a string (JFF)
Definition at line 713 of file txt_util.vhd.
|
Function |
converts an integer into a character for 0 to 9 the obvious mapping is used, higher values are mapped to the characters A-Z
(this is useful for systems with base > 10) (adapted from Steve Vogwell's posting in comp.lang.vhdl)
Definition at line 254 of file txt_util.vhd.
|
Function |
converts std_logic into a character
Definition at line 176 of file txt_util.vhd.
|
Function |
converts a character into int (JFF)
Definition at line 838 of file txt_util.vhd.
|
Function |
converts a character into std_logic_vector(JFF)
Definition at line 790 of file txt_util.vhd.
|
Function |
return first non-whitespacesubstring (JFF)
Definition at line 682 of file txt_util.vhd.
|
Function |
converts a std_logic_vector into a hex string.
Definition at line 390 of file txt_util.vhd.
|
Function |
converts a hex string into std_logic_vector(JFF)
Definition at line 888 of file txt_util.vhd.
|
Function |
checks if whitespace (JFF)
Definition at line 631 of file txt_util.vhd.
|
Procedure |
prints text to the screen when active
Definition at line 165 of file txt_util.vhd.
|
Procedure |
print character to a file and start new line
Definition at line 969 of file txt_util.vhd.
|
Procedure |
print string to a file
Definition at line 956 of file txt_util.vhd.
|
Procedure |
prints text to the screen
Definition at line 156 of file txt_util.vhd.
|
Function |
converts boolean into a string
Definition at line 235 of file txt_util.vhd.
|
Function |
return result and add sign if required convert integer to string, using base 10
Definition at line 380 of file txt_util.vhd.
|
Function |
convert integer to string using specified base
(adapted from Steve Vogwell's posting in comp.lang.vhdl)
Definition at line 344 of file txt_util.vhd.
|
Function |
converts std_logic into a string (1 to 1)
Definition at line 208 of file txt_util.vhd.
|
Function |
converts std_logic_vector into a string (binary base)
(this also takes care of the fact that the range of a string is natural while a std_logic_vector may have an integer range)
Definition at line 221 of file txt_util.vhd.
|
Procedure |
read variable length string from input file
Definition at line 914 of file txt_util.vhd.
|
Function |
converts a decimal string into an integer (JFF)
Definition at line 900 of file txt_util.vhd.
|
Procedure |
appends contents of a string to a file until line feed occurs (LF is considered to be the end of the string)
Definition at line 984 of file txt_util.vhd.
|
Function |
remove leading whitespace (JFF)
Definition at line 645 of file txt_util.vhd.
|
Function |
convert a character to lower case
Definition at line 530 of file txt_util.vhd.
|
Function |
convert a string to lower case
Definition at line 616 of file txt_util.vhd.
|
Function |
j points to first whitespace converts a character into a std_logic
Definition at line 756 of file txt_util.vhd.
|
Function |
converts a binary string into std_logic_vector
Definition at line 874 of file txt_util.vhd.
|
Function |
convert a character to upper case
Definition at line 459 of file txt_util.vhd.
|
Function |
convert a string to upper case
Definition at line 601 of file txt_util.vhd.