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 | |
boolean | is_test_active ( constant pltbv: in in pltbv_t ) |
std_logic_vector | to_ascending ( constant s: in std_logic_vector ) |
to_ascending | |
unsigned | to_ascending ( constant s: in unsigned ) |
signed | to_ascending ( constant s: in signed ) |
std_logic_vector | to_descending ( constant s: in std_logic_vector ) |
to_descending | |
unsigned | to_descending ( constant s: in unsigned ) |
signed | to_descending ( constant s: in signed ) |
string | hxstr ( constant s: in std_logic_vector constant prefix: in string "" constant postfix: in string "" ) |
string | hxstr ( constant s: in unsigned constant prefix: in string "" constant postfix: in string "" ) |
TODO: handle vectors where nibble_aligned_s'length > a'length and the highest nibble are all equal characters such as "XXX". | |
string | hxstr ( constant s: in signed constant prefix: in string "" constant postfix: in string "" ) |
string | str ( constant n: in integer constant len: in integer constant fillchar: in character ' ' ) |
str | |
boolean | str_equal ( constant s1: in STRING , constant s2: in STRING ) |
str_equal |
Procedures | |
starttest_msg( constant test_num: in integer constant test_name: in string constant timestamp: in time ) | |
skiptest_msg( constant test_num: in integer constant test_name: in string constant timestamp: in time ) | |
endtest_msg( constant test_num: in integer constant test_name: in string constant timestamp: in time constant test_active: in boolean constant num_checks_in_test: in integer constant num_errors_in_test: in integer ) | |
check_msg( constant rpt: in string constant timestamp: in time constant expr: in boolean constant actual: in string constant expected: in string constant mask: in string constant test_num: in integer constant test_name: in string constant check_num: in integer constant err_cnt_in_test: in integer ) | |
error_msg( constant rpt: in string constant timestamp: in time constant test_num: in integer constant test_name: in string constant err_cnt_in_test: in integer ) | |
stopsim( constant timestamp: in time ) | |
startsim_msg( constant testcase_name: in string ,constant timestamp: in time ) | |
endsim_msg( constant testcase_name: in string constant timestamp: in time constant num_tests: in integer constant num_skiptests: in integer constant num_checks: in integer constant num_errors: in integer constant show_success_fail: in boolean ) | |
get_file_item( variable l: inout line variable item: out string variable item_len: out integer variable line_num: inout integer variable item_num: inout integer ) | |
pltbutils_error( constant rpt: in string variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
startsim( constant testcase_name: in string constant skiptests: in std_logic_vector variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
endsim( variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant show_success_fail: in boolean false constant force_stop: in boolean false ) | |
endsim | |
starttest( constant num: in integer - 1 constant name: in string variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
starttest( constant name: in string variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
endtest( variable pltbv: inout pltbv_t ,signal pltbs: out pltbs_t ) | |
endtest | |
print( constant active: in boolean signal s: out string constant txt: in string ) | |
print( signal s: out string ,constant txt: in string ) | |
printv( constant active: in boolean variable s: out string constant txt: in string ) | |
printv( variable s: out string ,constant txt: in string ) | |
print( constant active: in boolean variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant txt: in string ) | |
Print to info element in pltbv/pltbs, which shows up in waveform window. | |
print( variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant txt: in string ) | |
print2( constant active: in boolean signal s: out string constant txt: in string ) | |
print2( signal s: out string ,constant txt: in string ) | |
print2( constant active: in boolean variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant txt: in string ) | |
print2( variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant txt: in string ) | |
waitclks( constant n: in natural signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitclks | |
waitsig( signal s: in integer constant value: in integer signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig integer, clocked | |
waitsig( signal s: in std_logic constant value: in std_logic signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig std_logic, clocked | |
waitsig( signal s: in std_logic constant value: in integer signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig std_logic against integer, clocked | |
waitsig( signal s: in std_logic_vector constant value: in std_logic_vector signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig std_logic_vector, clocked | |
waitsig( signal s: in std_logic_vector constant value: in integer signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig std_logic_vector against integer, clocked | |
waitsig( signal s: in unsigned constant value: in unsigned signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig unsigned, clocked | |
waitsig( signal s: in unsigned constant value: in integer signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig unsigned against integer, clocked | |
waitsig( signal s: in signed constant value: in signed signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig signed, clocked | |
waitsig( signal s: in signed constant value: in integer signal clk: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig signed against integer, clocked | |
waitsig( signal s: in std_logic constant value: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig std_logic, unclocked | |
waitsig( signal s: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant falling: in boolean false constant timeout: in time C_PLTBUTILS_TIMEOUT ) | |
waitsig std_logic edge, unclocked | |
check( constant rpt: in string constant actual: in integer constant expected: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check integer | |
check( constant rpt: in string constant actual: in std_logic constant expected: in std_logic variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check std_logic | |
check( constant rpt: in string constant actual: in std_logic constant expected: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check std_logic against integer | |
check( constant rpt: in string constant actual: in std_logic_vector constant expected: in std_logic_vector variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check std_logic_vector | |
check( constant rpt: in string constant actual: in std_logic_vector constant expected: in std_logic_vector constant mask: in std_logic_vector variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check std_logic_vector with mask | |
check( constant rpt: in string constant actual: in std_logic_vector constant expected: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check std_logic_vector against integer | |
check( constant rpt: in string constant actual: in std_logic_vector constant expected: in integer constant mask: in std_logic_vector variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check std_logic_vector with mask against integer | |
check( constant rpt: in string constant actual: in unsigned constant expected: in unsigned variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check unsigned | |
check( constant rpt: in string constant actual: in unsigned constant expected: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check unsigned against integer | |
check( constant rpt: in string constant actual: in signed constant expected: in signed variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check signed | |
check( constant rpt: in string constant actual: in signed constant expected: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check( constant rpt: in string constant actual: in boolean constant expected: in boolean variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check boolean | |
check( constant rpt: in string constant actual: in boolean constant expected: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check boolean against integer | |
check( constant rpt: in string constant actual: in time constant expected: in time variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check time | |
check( constant rpt: in string constant actual: in time constant expected: in time constant tolerance: in time variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check time with tolerance | |
check( constant rpt: in string constant actual: in string constant expected: in string variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check string | |
check( constant rpt: in string constant expr: in boolean variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check_binfile( constant rpt: in string constant filename1: in string constant filename2: in string constant verbosity: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
check binary file | |
file of character | check_txtfile( constant rpt: in string constant filename1: in string constant filename2: in string constant verbosity: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) |
check text file | |
check_datfile( constant rpt: in string constant filename1: in string constant filename2: in string constant verbosity: in integer variable pltbv: inout pltbv_t signal pltbs: out pltbs_t constant skip_init_items: in integer 0 ) | |
check data file | |
check( constant rpt: in string constant expr: in boolean constant actual: in string constant expected: in string constant mask: in string variable pltbv: inout pltbv_t signal pltbs: out pltbs_t ) | |
pltbs_update( variable pltbv: inout pltbv_t ,signal pltbs: out pltbs_t ) |
Definition at line 1159 of file pltbutils_func_pkg.vhd.
|
Procedure |
check std_logic_vector with mask
Definition at line 2045 of file pltbutils_func_pkg.vhd.
|
Procedure |
check std_logic_vector with mask against integer
Definition at line 2071 of file pltbutils_func_pkg.vhd.
|
Procedure |
check integer
Definition at line 1996 of file pltbutils_func_pkg.vhd.
|
Procedure |
check std_logic
Definition at line 2008 of file pltbutils_func_pkg.vhd.
|
Procedure |
check std_logic against integer
Definition at line 2020 of file pltbutils_func_pkg.vhd.
|
Procedure |
check std_logic_vector
Definition at line 2033 of file pltbutils_func_pkg.vhd.
|
Procedure |
check std_logic_vector against integer
Definition at line 2059 of file pltbutils_func_pkg.vhd.
|
Procedure |
check unsigned
Definition at line 2084 of file pltbutils_func_pkg.vhd.
|
Procedure |
check unsigned against integer
Definition at line 2096 of file pltbutils_func_pkg.vhd.
|
Procedure |
check signed
Definition at line 2108 of file pltbutils_func_pkg.vhd.
|
Procedure |
check signed against integer TODO: find the bug reported by tb_pltbutils when expected is negative (-1): ** Error: (vsim-86) numstd_conv_unsigned_nu: NATURAL arg value is negative (-1)
Definition at line 2122 of file pltbutils_func_pkg.vhd.
|
Procedure |
check boolean
Definition at line 2134 of file pltbutils_func_pkg.vhd.
|
Procedure |
check boolean against integer
Definition at line 2146 of file pltbutils_func_pkg.vhd.
|
Procedure |
check time
Definition at line 2159 of file pltbutils_func_pkg.vhd.
|
Procedure |
check string
Definition at line 2192 of file pltbutils_func_pkg.vhd.
|
Procedure |
check time with tolerance
Definition at line 2171 of file pltbutils_func_pkg.vhd.
|
Procedure |
check base procedure All other check procedures perform the check, and calls this procedure with the check result in the expr argument. This procedure can also be called directly. It allow any kind of check, including less than, greater than, ranges, etc. Your calling code must convert actual, expected and mask to strings.
Definition at line 2502 of file pltbutils_func_pkg.vhd.
|
Procedure |
check with boolean expression Check signal or variable with a boolean expression as argument expr. This allowes any kind of check, including less than, greater than, ranges, etc. But there are no clear messages in case of mismatch.
Definition at line 2220 of file pltbutils_func_pkg.vhd.
|
Procedure |
check binary file
Definition at line 2232 of file pltbutils_func_pkg.vhd.
|
Procedure |
check data file
Definition at line 2404 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1193 of file pltbutils_func_pkg.vhd.
|
Procedure |
check text file
Definition at line 2319 of file pltbutils_func_pkg.vhd.
|
Procedure |
endsim
Definition at line 1466 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1290 of file pltbutils_func_pkg.vhd.
|
Procedure |
endtest
Definition at line 1574 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1179 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1257 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1332 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 2619 of file pltbutils_func_pkg.vhd.
|
Function |
TODO: handle vectors where nibble_aligned_s'length > a'length and the highest nibble are all equal characters such as "XXX".
Definition at line 2690 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 2699 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 1566 of file pltbutils_func_pkg.vhd.
|
Procedure |
pltbutils internal procedures, called from other pltbutils procedures. Do not to call these from user's code. These procedures are undocumented in the specification on purpose.
Definition at line 2711 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1388 of file pltbutils_func_pkg.vhd.
|
Procedure |
Print to info element in pltbv/pltbs, which shows up in waveform window.
Definition at line 1657 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1598 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1674 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1619 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1705 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1683 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1716 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1697 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1627 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1648 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1170 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1417 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1280 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1557 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1507 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1161 of file pltbutils_func_pkg.vhd.
|
Procedure |
Definition at line 1270 of file pltbutils_func_pkg.vhd.
|
Function |
str
Definition at line 2725 of file pltbutils_func_pkg.vhd.
|
Function |
str_equal
Definition at line 2748 of file pltbutils_func_pkg.vhd.
|
Function |
to_ascending
Definition at line 2551 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 2562 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 2573 of file pltbutils_func_pkg.vhd.
|
Function |
to_descending
Definition at line 2586 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 2597 of file pltbutils_func_pkg.vhd.
|
Function |
Definition at line 2608 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitclks
Definition at line 1726 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig std_logic edge, unclocked
Definition at line 1976 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig integer, clocked
Definition at line 1756 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig std_logic, clocked
Definition at line 1780 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig std_logic against integer, clocked
Definition at line 1804 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig std_logic_vector, clocked
Definition at line 1837 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig std_logic_vector against integer, clocked
Definition at line 1861 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig unsigned, clocked
Definition at line 1877 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig unsigned against integer, clocked
Definition at line 1901 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig signed, clocked
Definition at line 1917 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig signed against integer, clocked
Definition at line 1941 of file pltbutils_func_pkg.vhd.
|
Procedure |
waitsig std_logic, unclocked
Definition at line 1957 of file pltbutils_func_pkg.vhd.