PlTbUtils
1.3
PlTbUtils is a collection of functions, procedures and components for easily creating stimuli and checking response in automatic self-checking testbenches.
|
Defines useful functions an procedures for text handling text in VHDL. More...
Package Body >> txt_utilFunctions | |
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 single character (can also be used for hex conversion and other bases) | |
string | str ( int: in integer , base: in integer ) |
converts integer into string using specified base | |
string | str ( int: in integer ) |
converts integer to string, using base 10 | |
string | hstr ( slv: in std_logic_vector ) |
convert std_logic_vector into a string in hex format | |
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 nonwhitespace substring (JFF) | |
std_logic | to_std_logic ( c: in character ) |
converts a character into std_logic | |
std_logic_vector | chr_to_slv ( c: in character ) |
converts a hex 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( active: boolean , text: string ) | |
prints the message when active | |
print( text: string ) | |
prints a message to the screen | |
chomp( variable s: inout string ,variable shead: out string ) | |
finds the first non-whitespace substring in a string and (JFF) | |
str_read( res_string: out string ) | |
read variable length string from input file | |
print( new_string: in string ) | |
print string to a file and start new line | |
print( char: in character ) | |
print character to a file and start new line |
Defines useful functions an procedures for text handling text in VHDL.
Definition at line 31 of file txt_util.vhd.
|
Procedure |
finds the first non-whitespace substring in a string and (JFF)
Definition at line 98 of file txt_util.vhd.
|
Function |
converts an integer into a single character (can also be used for hex conversion and other bases)
Definition at line 62 of file txt_util.vhd.
|
Function |
converts std_logic into a character
Definition at line 49 of file txt_util.vhd.
|
Function |
converts a character into int (JFF)
Definition at line 109 of file txt_util.vhd.
|
Function |
converts a hex character into std_logic_vector(JFF)
Definition at line 106 of file txt_util.vhd.
|
Function |
return first nonwhitespace substring (JFF)
Definition at line 94 of file txt_util.vhd.
|
Function |
convert std_logic_vector into a string in hex format
Definition at line 71 of file txt_util.vhd.
|
Function |
converts a hex string into std_logic_vector(JFF)
Definition at line 115 of file txt_util.vhd.
|
Function |
checks if whitespace (JFF)
Definition at line 88 of file txt_util.vhd.
|
Procedure |
prints the message when active
useful for debug switches
text | text to print to screen |
active | condition for printing |
Definition at line 39 of file txt_util.vhd.
|
Procedure |
print character to a file and start new line
out_file | File to print to. |
char | Char to print. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 145 of file txt_util.vhd.
|
Procedure |
print string to a file and start new line
out_file | File to print to. |
new_string | String to print. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 134 of file txt_util.vhd.
|
Procedure |
prints a message to the screen
text | text to print to screen |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 46 of file txt_util.vhd.
|
Function |
converts boolean into a string
Definition at line 58 of file txt_util.vhd.
|
Function |
converts integer to string, using base 10
Definition at line 68 of file txt_util.vhd.
|
Function |
converts integer into string using specified base
Definition at line 65 of file txt_util.vhd.
|
Function |
converts std_logic into a string (1 to 1)
Definition at line 52 of file txt_util.vhd.
|
Function |
converts std_logic_vector into a string (binary base)
Definition at line 55 of file txt_util.vhd.
|
Procedure |
read variable length string from input file
Definition at line 123 of file txt_util.vhd.
|
Function |
converts a decimal string into an integer (JFF)
Definition at line 118 of file txt_util.vhd.
|
Function |
remove leading whitespace (JFF)
Definition at line 91 of file txt_util.vhd.
|
Function |
convert a character to lower case
Definition at line 79 of file txt_util.vhd.
|
Function |
convert a string to lower case
Definition at line 85 of file txt_util.vhd.
|
Function |
converts a character into std_logic
Definition at line 103 of file txt_util.vhd.
|
Function |
converts a binary string into std_logic_vector
Definition at line 112 of file txt_util.vhd.
|
Function |
convert a character to upper case
Definition at line 76 of file txt_util.vhd.
|
Function |
convert a string to upper case
Definition at line 82 of file txt_util.vhd.