PlTbUtils  1.3
PlTbUtils is a collection of functions, procedures and components for easily creating stimuli and checking response in automatic self-checking testbenches.
pltbutils_func_pkg Package Reference

This package defines fuctions and procedures for controlling stimuli to a DUT and checking response. More...

Package Body >> pltbutils_func_pkg

Functions

boolean   is_test_active ( constant pltbv: in in pltbv_t )
 Returns true if a test is active (not skipped), otherwise false.
std_logic_vector   to_ascending ( constant s: in std_logic_vector )
 Converts a vector to ascending range ("to-range").
unsigned   to_ascending ( constant s: in unsigned )
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
signed   to_ascending ( constant s: in signed )
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std_logic_vector   to_descending ( constant s: in std_logic_vector )
 Converts a vector to descending range ("downto-range").
unsigned   to_descending ( constant s: in unsigned )
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
signed   to_descending ( constant s: in signed )
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
string   hxstr (
constant s: in std_logic_vector
constant prefix: in string ""
constant postfix: in string ""
)
 Converts a vector to a string in hexadecimal format.
string   hxstr (
constant s: in unsigned
constant prefix: in string ""
constant postfix: in string ""
)
 Converts a vector to a string in hexadecimal format.
string   hxstr (
constant s: in signed
constant prefix: in string ""
constant postfix: in string ""
)
 Converts a vector to a string in hexadecimal format.
string   str (
constant n: in integer
constant len: in integer
constant fillchar: in character ' '
)
boolean   str_equal ( constant s1: in STRING , constant s2: in STRING )
 Function str_equal returns true if strings s1 and s2 are equal, otherwise false.

Procedures

  startsim(
constant testcase_name: in string
constant skiptests: in std_logic_vector
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 Displays a message at start of simulation message, and initializes PlTbUtils' status and control variable and -signal.
  endsim(
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
constant show_success_fail: in boolean false
constant force_stop: in boolean false
)
 Displays a message at end of simulation message, presents the simulation results, and stops the simulation.
  starttest(
constant name: in string
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 Sets a number (optional) and a name for a test. The number and name will be printed to the screen, and displayed in the simulator's waveform window.
  starttest(
constant num: in integer - 1
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 )
 Prints an end-of-test message to the screen.
  print(
constant active: in boolean
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
constant txt: in string
)
 Prints text messages to a signal for viewing in the simulator's waveform window.
  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(
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
constant txt: in string
)
  print2(
constant active: in boolean
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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  print2( signal s: out string ,constant txt: in string )
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  print2(
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
constant txt: in string
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 Waits specified amount of clock cycles of the specified clock.
  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
)
 Waits until a signal has reached a specified value after specified clock edge.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
  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
)
 Checks that the value of a signal or variable is equal to expected.
  check(
constant rpt: in string
constant actual: in integer
constant expected: in integer
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in std_logic
constant expected: in integer
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in unsigned
constant expected: in unsigned
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in unsigned
constant expected: in integer
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in signed
constant expected: in signed
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in signed
constant expected: in integer
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in boolean
constant expected: in boolean
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in boolean
constant expected: in integer
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant actual: in time
constant expected: in time
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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(
constant rpt: in string
constant actual: in string
constant expected: in string
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  check(
constant rpt: in string
constant expr: in boolean
variable pltbv: inout pltbv_t
signal pltbs: out pltbs_t
)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
  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
)
 check base procedure
  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
)
 Checks that the contents of a file is equal to expected contents, by comparing with a reference file.
  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_txtfile compares two text files.
  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_datfile compares two files with data formatted as follows. The files contain a sequence of data items separated by whitespace (spaces, tabs, newlines). The files can contain comments starting with a hash sign (#), and ending at next newline.
  pltbs_update( variable pltbv: inout pltbv_t ,signal pltbs: out pltbs_t )
 pltbutils internal procedure(s), do not call from user's code

Constants

C_PLTBUTILS_STRLEN  natural := 80
C_PLTBUTILS_SKIPTESTLEN  natural := 512
C_PLTBUTILS_TIMEOUT  time := 10 sec
C_WAIT_BEFORE_STOP_TIME  time := 1 us
EMPTY_CHR  character := ' '
C_PLTBV_INIT  pltbv_t := ( testcase_name = > ( others = > EMPTY_CHR ) , testcase_name_len = > 1 , test_num = > 0 , test_name = > ( others = > EMPTY_CHR ) , test_name_len = > 1 , skiptests = > ( others = > ' 0 ' ) , test_active = > true , info = > ( others = > EMPTY_CHR ) , info_len = > 1 , test_cnt = > 0 , skiptest_cnt = > 0 , chk_cnt = > 0 , err_cnt = > 0 , chk_cnt_in_test = > 0 , err_cnt_in_test = > 0 , stop_sim = > ' 0 ' )
C_PLTBS_INIT  pltbs_t := ( test_num = > 0 , test_name = > ( others = > EMPTY_CHR ) , info = > ( others = > EMPTY_CHR ) , chk_cnt = > 0 , err_cnt = > 0 , stop_sim = > ' 0 ' )

Records

pltbv_t 
 Type for status- and control variable.
testcase_name string ( 1 to C_PLTBUTILS_STRLEN )
testcase_name_len integer
test_num integer
test_name string ( 1 to C_PLTBUTILS_STRLEN )
test_name_len integer
skiptests std_logic_vector ( 0 to C_PLTBUTILS_SKIPTESTLEN - 1 )
test_active boolean
info string ( 1 to C_PLTBUTILS_STRLEN )
info_len integer
test_cnt integer
skiptest_cnt integer
chk_cnt integer
err_cnt integer
chk_cnt_in_test integer
err_cnt_in_test integer
stop_sim std_logic
pltbs_t 
 Status- and control signal (subset of pltbv_t)
test_num natural
test_name string ( 1 to C_PLTBUTILS_STRLEN )
info string ( 1 to C_PLTBUTILS_STRLEN )
chk_cnt natural
err_cnt natural
stop_sim std_logic

Detailed Description

This package defines fuctions and procedures for controlling stimuli to a DUT and checking response.

Definition at line 46 of file pltbutils_func_pkg.vhd.

Member Function Documentation

◆ check() [1/18]

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  
)
Procedure

Checks that the value of a signal or variable is equal to expected.

If not equal, displays an error message and increments the error counter.

Parameters
rptReport message to be displayed in case of mismatch. It is recommended that the message is unique and that it contains the name of the signal or variable being checked. The message should NOT contain the expected value, becase check() prints that automatically.
actualThe signal or variable to be checked. Supported types: integer, std_logic, std_logic_vector, unsigned, signed, boolean, time, string.
expectedExpected value. Same type as data or integer.
maskBit mask and:ed to data and expected before comparison. Optional if data is std_logic_vector. Not allowed for other types.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Examples

check("dat_o after reset", dat_o, 0, pltbv, pltbs);
-- With mask:
check("Status field in reg_o after start", reg_o, x"01", x"03", pltbv, pltbs);
-- Boolean expression:
check("Counter after data burst", cnt_o > 10, pltbv, pltbs);

Definition at line 654 of file pltbutils_func_pkg.vhd.

◆ check() [2/18]

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  
)
Procedure

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 709 of file pltbutils_func_pkg.vhd.

◆ check() [3/18]

check ( constant   rpt in string ,
constant   actual in integer ,
constant   expected in integer ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 664 of file pltbutils_func_pkg.vhd.

◆ check() [4/18]

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  
)
Procedure

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 673 of file pltbutils_func_pkg.vhd.

◆ check() [5/18]

check ( constant   rpt in string ,
constant   actual in std_logic ,
constant   expected in integer ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 682 of file pltbutils_func_pkg.vhd.

◆ check() [6/18]

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  
)
Procedure

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 691 of file pltbutils_func_pkg.vhd.

◆ check() [7/18]

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  
)
Procedure

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 700 of file pltbutils_func_pkg.vhd.

◆ check() [8/18]

check ( constant   rpt in string ,
constant   actual in unsigned ,
constant   expected in unsigned ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 719 of file pltbutils_func_pkg.vhd.

◆ check() [9/18]

check ( constant   rpt in string ,
constant   actual in unsigned ,
constant   expected in integer ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 728 of file pltbutils_func_pkg.vhd.

◆ check() [10/18]

check ( constant   rpt in string ,
constant   actual in signed ,
constant   expected in signed ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 737 of file pltbutils_func_pkg.vhd.

◆ check() [11/18]

check ( constant   rpt in string ,
constant   actual in signed ,
constant   expected in integer ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 746 of file pltbutils_func_pkg.vhd.

◆ check() [12/18]

check ( constant   rpt in string ,
constant   actual in boolean ,
constant   expected in boolean ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 755 of file pltbutils_func_pkg.vhd.

◆ check() [13/18]

check ( constant   rpt in string ,
constant   actual in boolean ,
constant   expected in integer ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 764 of file pltbutils_func_pkg.vhd.

◆ check() [14/18]

check ( constant   rpt in string ,
constant   actual in time ,
constant   expected in time ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 773 of file pltbutils_func_pkg.vhd.

◆ check() [15/18]

check ( constant   rpt in string ,
constant   actual in string ,
constant   expected in string ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 815 of file pltbutils_func_pkg.vhd.

◆ check() [16/18]

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  
)
Procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
rptReport message to be displayed in case of mismatch. It is recommended that the message is unique and that it contains the name of the signal or variable being checked. The message should NOT contain the expected value, becase check() prints that automatically.
actualThe signal or variable to be checked. Supported types: integer, std_logic, std_logic_vector, unsigned, signed, boolean, time, string.
expectedExpected value. Same type as data or integer.
toleranceAllowed tolerance. Checks that expected - tolerance <= actual <= expected + tolerance is true.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Definition at line 805 of file pltbutils_func_pkg.vhd.

◆ check() [17/18]

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  
)
Procedure

check base procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
exprboolean expression for checking. This makes it possible to check any kind of expresion, not just equality.
rptReport message to be displayed in case of mismatch. It is recommended that the message is unique and that it contains the name of the signal or variable being checked. The message should NOT contain the expected value, becase check() prints that automatically.
actualThe signal or variable to be checked. Supported types: integer, std_logic, std_logic_vector, unsigned, signed, boolean, time, string.
expectedExpected value. Same type as data or integer.
maskBit mask and:ed to data and expected before comparison. Optional if data is std_logic_vector. Not allowed for other types.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

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 869 of file pltbutils_func_pkg.vhd.

◆ check() [18/18]

check ( constant   rpt in string ,
constant   expr in boolean ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

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 824 of file pltbutils_func_pkg.vhd.

◆ check_binfile()

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  
)
Procedure

Checks that the contents of a file is equal to expected contents, by comparing with a reference file.

If not equal, displays an error message and increments the error counter. This is useful for examining different types of files generated by testbench components during a simulation against reference files. It can be different kinds of data sequences, video image data, etc.

check_binfile compares two binary files. It uses "file of character" to read bytes from the files. The VHDL LRM does not define how a "file of character" should be written or to/read from disk. In theory, there is a risk that a VHDL file of character is not compatible with a normal binary file, but practical tests done with some popular simulators have shown that they are compatible. This does not guarantee that this procedure works with ALL simulators, and with ALL future versions of the tested simulators. Use your own judgement.

Parameters
rptReport message to be displayed in case of mismatch. It is recommended that the message is unique and that it contains the name of the signal or variable being checked.
filename1Name of first file to be compared, including relative path from the simulator's working directory.
filename2Name of second file to be compared, including relative path from the simulator's working directory.
verbosityControls amount of individual error reports when differences between files are found, to make it possible to prevent flooding with error messages.
  • 0: no individual differences reported
  • 1: the first ten differences reported
  • 2: all differences reported
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Example

check_binfile("Data output file", "out_file.bin", "ref_file.bin", 0, pltbv, pltbs);

Definition at line 924 of file pltbutils_func_pkg.vhd.

◆ check_datfile()

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  
)
Procedure

check_datfile compares two files with data formatted as follows. The files contain a sequence of data items separated by whitespace (spaces, tabs, newlines). The files can contain comments starting with a hash sign (#), and ending at next newline.

If not equal, displays an error message and increments the error counter. This is useful for examining different types of files generated by testbench components during a simulation against reference files. It can be different kinds of data sequences, video image data, etc.

Only the data items are compared. The types of whitespace and comments are ignored. This is useful for different kinds of data dumps, including some image file formats such as

Parameters
rptReport message to be displayed in case of mismatch. It is recommended that the message is unique and that it contains the name of the signal or variable being checked.
filename1Name of first file to be compared, including relative path from the simulator's working directory.
filename2Name of second file to be compared, including relative path from the simulator's working directory.
verbosityControls amount of individual error reports when differences between files are found, to make it possible to prevent flooding with error messages.
  • 0: no individual differences reported
  • 1: the first ten differences reported
  • 2: all differences reported
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Example

check_datfile("Resulting image", "result_img.ppm", "ref_img.ppm", 2, pltbv, pltbs);

Definition at line 1023 of file pltbutils_func_pkg.vhd.

◆ check_txtfile()

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  
)
Procedure

check_txtfile compares two text files.

If not equal, displays an error message and increments the error counter. This is useful for examining different types of files generated by testbench components during a simulation against reference files. It can be different kinds of data sequences, video image data, etc.

Parameters
rptReport message to be displayed in case of mismatch. It is recommended that the message is unique and that it contains the name of the signal or variable being checked.
filename1Name of first file to be compared, including relative path from the simulator's working directory.
filename2Name of second file to be compared, including relative path from the simulator's working directory.
verbosityControls amount of individual error reports when differences between files are found, to make it possible to prevent flooding with error messages.
  • 0: no individual differences reported
  • 1: the first ten differences reported
  • 2: all differences reported
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Example

check_txtfile("Result file", G_RESULT_FILE, G_REF_FILE, G_CHECKFILE_VEROBOSITY, pltbv, pltbs);

Definition at line 968 of file pltbutils_func_pkg.vhd.

◆ endsim()

endsim ( variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t ,
constant   show_success_fail in boolean false ,
constant   force_stop in boolean false  
)
Procedure

Displays a message at end of simulation message, presents the simulation results, and stops the simulation.

Call endsim() only once.

Parameters
pltbv,pltbsPlTbUtils' status- and control variable and -signal.
show_success_failIf true, endsim() shows "*** SUCCESS ***", "*** FAIL ***", or "*** NO CHECKS ***". Optional, default is false.
force_stopIf true, forces the simulation to stop using an assert failure statement. Use this option only if the normal way of stopping the simulation doesn't work (see below). Optional, default is false.

The testbench should be designed so that all clocks stop when endsim() sets the signal pltbs.stop_sim to '1'. This should stop the simulator. In some cases that doesn't work, then set the force_stop argument to true, which causes a false assert failure, which should stop the simulator. Scripts searching transcript logs for errors and failures, should ignore the failure with "--- FORCE END OF SIMULATION ---" as part of the report.

Note
The end-of-simulation messages and success/fail messages are not only intended to be informative for humans. They are also intended to be searched for by scripts, e.g. for collecting results from a large number of regression tests. For this reason, the message must be consistent and unique.

DO NOT MODIFY the messages "--- END OF SIMULATION ---", "*** SUCCESS ***", "*** FAIL ***", "*** NO CHECKS ***".

DO NOT OUTPUT IDENTICAL MESSAGES anywhere else.

Examples

endsim(pltbv, pltbs);
endsim(pltbv, pltbs, true);
endsim(pltbv, pltbs, true, true);

Definition at line 229 of file pltbutils_func_pkg.vhd.

◆ endtest()

endtest ( variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

Prints an end-of-test message to the screen.

Parameters
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Example

endtest(pltbv, pltbs);

Definition at line 308 of file pltbutils_func_pkg.vhd.

◆ hxstr() [1/3]

string hxstr (   s in std_logic_vector ,
  prefix in string "" ,
  postfix in string ""  
)
Function

Converts a vector to a string in hexadecimal format.

An optional prefix can be specified, e.g. "0x", as well as a suffix.

The input argument can have ascending range ( "to-range" ) or descending range ("downto-range"). There is no vector length limitation.

Parameters
sconstant, signal or variable to convert
prefixoptional prefix
postfixoptional suffix
Return values
hexstrs represented as a hex string

Examples:

print("value=" & hxstr(s));
print("value=" & hxstr(s, "0x"));
print("value=" & hxstr(s, "16#", "#"));

Definition at line 1110 of file pltbutils_func_pkg.vhd.

◆ hxstr() [2/3]

string hxstr (   s in unsigned ,
  prefix in string "" ,
  postfix in string ""  
)
Function

Converts a vector to a string in hexadecimal format.

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 1119 of file pltbutils_func_pkg.vhd.

◆ hxstr() [3/3]

string hxstr (   s in signed ,
  prefix in string "" ,
  postfix in string ""  
)
Function

Converts a vector to a string in hexadecimal format.

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 1128 of file pltbutils_func_pkg.vhd.

◆ is_test_active()

boolean is_test_active (   pltbv in in pltbv_t  
)
Function

Returns true if a test is active (not skipped), otherwise false.

Parameters
pltbvPlTbUtils' status- and control variable
Return values
activeTrue if a test is active

Example

starttest(3, "Example test", pltbv, pltbs);
if is_test_active(pltbv) then
... test code ...
end if;
endtest(pltbv, pltbs);

Definition at line 295 of file pltbutils_func_pkg.vhd.

◆ pltbs_update()

pltbs_update ( variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

pltbutils internal procedure(s), do not call from user's code

Definition at line 1135 of file pltbutils_func_pkg.vhd.

◆ print() [1/4]

print ( constant   active in boolean ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t ,
constant   txt in string  
)
Procedure

Prints text messages to a signal for viewing in the simulator's waveform window.

Parameters
txtThe text.
activeThe text is only printed if active is true. Useful for debug switches, etc.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

If the string txt is longer than the signal s, the text will be truncated. If txt is shorter, s will be padded with spaces.

Examples

print(msg, "Hello, world"); -- Prints to signal msg
print(G_DEBUG, msg, "Hello, world"); -- Prints to signal msg if
-- generic G_DEBUG is true
print(pltbv, pltbs, "Hello, world"); -- Prints to "info" in waveform window
-- transcript windows

Definition at line 335 of file pltbutils_func_pkg.vhd.

◆ print() [2/4]

print ( constant   active in boolean ,
signal   s out string ,
constant   txt in string  
)
Procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
activeThe text is only printed if active is true. Useful for debug switches, etc.
sSignal of type string to be printed to.
txtThe text.

Definition at line 349 of file pltbutils_func_pkg.vhd.

◆ print() [3/4]

print ( variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t ,
constant   txt in string  
)
Procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
txtThe text.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Definition at line 397 of file pltbutils_func_pkg.vhd.

◆ print() [4/4]

print ( signal   s out string ,
constant   txt in string  
)
Procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
sSignal of type string to be printed to.
txtThe text.

Definition at line 360 of file pltbutils_func_pkg.vhd.

◆ print2() [1/4]

print2 ( constant   active in boolean ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t ,
constant   txt in string  
)
Procedure

Prints both to a signal and to the transcript window. see print() for more information. The type of the output can be string or pltbv_t+pltbs_t.

Examples

print2(msg, "Hello, world"); -- Prints to signal and transcript window
print2(pltbv, pltbs, "Hello, world"); -- Prints to "info" in waveform and

Definition at line 412 of file pltbutils_func_pkg.vhd.

◆ print2() [2/4]

print2 ( constant   active in boolean ,
signal   s out string ,
constant   txt in string  
)
Procedure

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 420 of file pltbutils_func_pkg.vhd.

◆ print2() [3/4]

print2 ( variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t ,
constant   txt in string  
)
Procedure

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 433 of file pltbutils_func_pkg.vhd.

◆ print2() [4/4]

print2 ( signal   s out string ,
constant   txt in string  
)
Procedure

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 427 of file pltbutils_func_pkg.vhd.

◆ printv() [1/2]

printv ( constant   active in boolean ,
variable   s out string ,
constant   txt in string  
)
Procedure

Does the same thing as print(), but to a variable instead.

Parameters
sVariable of type string to be printed to.
txtThe text.
activeThe text is only printed if active is true. Useful for debug switches, etc.

Example

printv(v_msg, "Hello, world"); -- Prints to variable msg

Definition at line 377 of file pltbutils_func_pkg.vhd.

◆ printv() [2/2]

printv ( variable   s out string ,
constant   txt in string  
)
Procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
sVariable of type string to be printed to.
txtThe text.

Definition at line 388 of file pltbutils_func_pkg.vhd.

◆ startsim()

startsim ( constant   testcase_name in string ,
constant   skiptests in std_logic_vector ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

Displays a message at start of simulation message, and initializes PlTbUtils' status and control variable and -signal.

Call startsim() only once.

Parameters
testcase_nameName of the test case, e.g. "tc1".
skiptestsstd_logic_vector for marking tests that should be skipped. The leftmost bit has position 0, and position numbers increment to the right. A '1' indicates that the test with the same number as the position should be skipped. Note that there is usually no test which has number 0, so bit zero in the vector is usually ignored. This argument is normally fed by a generic. If no tests should be skipped, a zero-length vector is allowed, ("").
pltbv,pltbsPlTbUtils' status- and control variable and -signal.
Note
The start-of-simulation message is not only intended to be informative for humans. It is also intended to be searched for by scripts, e.g. for collecting results from a large number of regression tests. For this reason, the message must be consistent and unique.

DO NOT MODIFY the message "--- START OF SIMULATION ---".

DO NOT OUTPUT AN IDENTICAL MESSAGE anywhere else.

Examples

startsim("tc1", "", pltbv, pltbs);
startsim("tc2", G_SKIPTESTS, pltbv, pltbs); -- G_SKIPTESTS is a generic

Definition at line 175 of file pltbutils_func_pkg.vhd.

◆ starttest() [1/2]

starttest ( constant   name in string ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

Sets a number (optional) and a name for a test. The number and name will be printed to the screen, and displayed in the simulator's waveform window.

The test number and name is also included if there errors reported by the check() procedure calls.

Parameters
nameTest name.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

Examples

starttest("Reset test", pltbv, pltbs);

Definition at line 252 of file pltbutils_func_pkg.vhd.

◆ starttest() [2/2]

starttest ( constant   num in integer - 1 ,
constant   name in string ,
variable   pltbv inout pltbv_t ,
signal   pltbs out pltbs_t  
)
Procedure

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
numTest number. Optional, default is to increment the current test number.
nameTest name.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.

If the test number is omitted, a new test number is automatically computed by incrementing the current test number. Manually setting the test number may make it easier to find the test code in the testbench code, though.

Examples

starttest(1, "Reset test", pltbv, pltbs);

Definition at line 276 of file pltbutils_func_pkg.vhd.

◆ str()

string str (   n in integer ,
  len in integer ,
  fillchar in character ' '  
)
Function

function str converts integer n to a string with fixed length len and leading fillchar

Definition at line 1142 of file pltbutils_func_pkg.vhd.

◆ str_equal()

boolean str_equal (   s1 in STRING ,
  s2 in STRING  
)
Function

Function str_equal returns true if strings s1 and s2 are equal, otherwise false.

The normal VHDL string comparison s1 = s2 only works correctly if the length of the strings are equal. str_equal works even if the lengths differ.

Definition at line 1152 of file pltbutils_func_pkg.vhd.

◆ to_ascending() [1/3]

std_logic_vector to_ascending (   s in std_logic_vector  
)
Function

Converts a vector to ascending range ("to-range").

The argument s can have ascending or descending range. E.g. an argument defined as a std_logic_vector(3 downto 1) will be returned as a std_logic_vector(1 to 3).

Parameters
sConstant, signal or variable to convert
Return values
rConverted value

Examples

ascending_sig <= to_ascending(descending_sig);
ascending_var := to_ascending(descending_var);

Definition at line 1048 of file pltbutils_func_pkg.vhd.

◆ to_ascending() [2/3]

unsigned to_ascending (   s in unsigned  
)
Function

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 1053 of file pltbutils_func_pkg.vhd.

◆ to_ascending() [3/3]

signed to_ascending (   s in signed  
)
Function

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 1058 of file pltbutils_func_pkg.vhd.

◆ to_descending() [1/3]

std_logic_vector to_descending (   s in std_logic_vector  
)
Function

Converts a vector to descending range ("downto-range").

The argument s can have ascending or descending range. E.g. an argument defined as a std_logic_vector(1 to 3) will be returned as a std_logic_vector(3 downto 1).

Parameters
sConstant, signal or variable to convert
Return values
rConverted value

Examples

descending_sig <= to_descending(ascending_sig);
descending_var := to_descending(ascending_var);

Definition at line 1077 of file pltbutils_func_pkg.vhd.

◆ to_descending() [2/3]

unsigned to_descending (   s in unsigned  
)
Function

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 1082 of file pltbutils_func_pkg.vhd.

◆ to_descending() [3/3]

signed to_descending (   s in signed  
)
Function

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 1087 of file pltbutils_func_pkg.vhd.

◆ waitclks()

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  
)
Procedure

Waits specified amount of clock cycles of the specified clock.

Or, to be more precise, a specified number of specified clock edges of the specified clock.

Parameters
NNumber of rising or falling clock edges to wait.
clkThe clock to wait for.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.
fallingIf true, waits for falling edges, otherwise rising edges. Optional, default is false.
timeoutTimeout time, in case the clock is not working. Optional, default is C_PLTBUTILS_TIMEOUT.

Examples

waitclks(5, sys_clk, pltbv, pltbs);
waitclks(5, sys_clk, pltbv, pltbs true);
waitclks(5, sys_clk, pltbv, pltbs, true, 1 ms);

Definition at line 463 of file pltbutils_func_pkg.vhd.

◆ waitsig() [1/11]

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  
)
Procedure

waitsig std_logic edge, unclocked

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 609 of file pltbutils_func_pkg.vhd.

◆ waitsig() [2/11]

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  
)
Procedure

Waits until a signal has reached a specified value after specified clock edge.

Parameters
sThe signal to test. Supported types: integer, std_logic, std_logic_vector, unsigned, signed.
valueValue to wait for. Same type as data or integer.
clkThe clock.
pltbv,pltbsPlTbUtils' status- and control variable and -signal.
fallingIf true, waits for falling edges, otherwise rising edges. Optional, default is false.
timeoutTimeout time, in case the clock is not working. Optional, default is C_PLTBUTILS_TIMEOUT.

Examples

waitsig(wr_en, '1', sys_clk, pltbv, pltbs);
waitsig(rd_en, 1, sys_clk, pltbv, pltbs, true);
waitsig(full, '1', sys_clk, pltbv, pltbs, true, 1 ms);

Definition at line 499 of file pltbutils_func_pkg.vhd.

◆ waitsig() [3/11]

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  
)
Procedure

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 510 of file pltbutils_func_pkg.vhd.

◆ waitsig() [4/11]

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  
)
Procedure

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 521 of file pltbutils_func_pkg.vhd.

◆ waitsig() [5/11]

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  
)
Procedure

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 532 of file pltbutils_func_pkg.vhd.

◆ waitsig() [6/11]

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  
)
Procedure

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 543 of file pltbutils_func_pkg.vhd.

◆ waitsig() [7/11]

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  
)
Procedure

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 554 of file pltbutils_func_pkg.vhd.

◆ waitsig() [8/11]

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  
)
Procedure

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 565 of file pltbutils_func_pkg.vhd.

◆ waitsig() [9/11]

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  
)
Procedure

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 576 of file pltbutils_func_pkg.vhd.

◆ waitsig() [10/11]

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  
)
Procedure

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 587 of file pltbutils_func_pkg.vhd.

◆ waitsig() [11/11]

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  
)
Procedure

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 598 of file pltbutils_func_pkg.vhd.

Member Data Documentation

◆ C_PLTBS_INIT

C_PLTBS_INIT pltbs_t := ( test_num = > 0 , test_name = > ( others = > EMPTY_CHR ) , info = > ( others = > EMPTY_CHR ) , chk_cnt = > 0 , err_cnt = > 0 , stop_sim = > ' 0 ' )
Constant

Definition at line 127 of file pltbutils_func_pkg.vhd.

◆ C_PLTBUTILS_SKIPTESTLEN

C_PLTBUTILS_SKIPTESTLEN natural := 512
Constant

Definition at line 49 of file pltbutils_func_pkg.vhd.

◆ C_PLTBUTILS_STRLEN

C_PLTBUTILS_STRLEN natural := 80
Constant

Definition at line 48 of file pltbutils_func_pkg.vhd.

◆ C_PLTBUTILS_TIMEOUT

C_PLTBUTILS_TIMEOUT time := 10 sec
Constant

Definition at line 50 of file pltbutils_func_pkg.vhd.

◆ C_PLTBV_INIT

C_PLTBV_INIT pltbv_t := ( testcase_name = > ( others = > EMPTY_CHR ) , testcase_name_len = > 1 , test_num = > 0 , test_name = > ( others = > EMPTY_CHR ) , test_name_len = > 1 , skiptests = > ( others = > ' 0 ' ) , test_active = > true , info = > ( others = > EMPTY_CHR ) , info_len = > 1 , test_cnt = > 0 , skiptest_cnt = > 0 , chk_cnt = > 0 , err_cnt = > 0 , chk_cnt_in_test = > 0 , err_cnt_in_test = > 0 , stop_sim = > ' 0 ' )
Constant

Definition at line 91 of file pltbutils_func_pkg.vhd.

◆ C_WAIT_BEFORE_STOP_TIME

C_WAIT_BEFORE_STOP_TIME time := 1 us
Constant

Definition at line 51 of file pltbutils_func_pkg.vhd.

◆ chk_cnt_in_test

chk_cnt_in_test integer
Record

Definition at line 86 of file pltbutils_func_pkg.vhd.

◆ chk_cnt [1/2]

chk_cnt integer
Record

Definition at line 84 of file pltbutils_func_pkg.vhd.

◆ chk_cnt [2/2]

chk_cnt natural
Record

Definition at line 122 of file pltbutils_func_pkg.vhd.

◆ EMPTY_CHR

EMPTY_CHR character := ' '
Constant

Definition at line 53 of file pltbutils_func_pkg.vhd.

◆ err_cnt_in_test

err_cnt_in_test integer
Record

Definition at line 87 of file pltbutils_func_pkg.vhd.

◆ err_cnt [1/2]

err_cnt integer
Record

Definition at line 85 of file pltbutils_func_pkg.vhd.

◆ err_cnt [2/2]

err_cnt natural
Record

Definition at line 123 of file pltbutils_func_pkg.vhd.

◆ info_len

info_len integer
Record

Definition at line 81 of file pltbutils_func_pkg.vhd.

◆ info [1/2]

info string ( 1 to C_PLTBUTILS_STRLEN )
Record

Definition at line 121 of file pltbutils_func_pkg.vhd.

◆ info [2/2]

info string ( 1 to C_PLTBUTILS_STRLEN )
Record

Definition at line 80 of file pltbutils_func_pkg.vhd.

◆ pltbs_t

pltbs_t
Record

Status- and control signal (subset of pltbv_t)

Parameters
test_num: natural
test_name: string(1 to C_PLTBUTILS_STRLEN)
info: string(1 to C_PLTBUTILS_STRLEN)
chk_cnt: natural
err_cnt: natural
stop_sim: std_logic

Definition at line 117 of file pltbutils_func_pkg.vhd.

◆ pltbv_t

pltbv_t
Record

Type for status- and control variable.

Parameters
testcase_name: string(1 to C_PLTBUTILS_STRLEN)
testcase_name_len: integer
test_num: integer
test_name: string(1 to C_PLTBUTILS_STRLEN)
test_name_len: integer
skiptests: std_logic_vector(0 to C_PLTBUTILS_SKIPTESTLEN-1)
test_active: boolean
info: string(1 to C_PLTBUTILS_STRLEN)
info_len: integer
test_cnt: integer
skiptest_cnt: integer
chk_cnt: integer
err_cnt: integer
chk_cnt_in_test: integer
err_cnt_in_test: integer
stop_sim: std_logic

Definition at line 72 of file pltbutils_func_pkg.vhd.

◆ skiptest_cnt

skiptest_cnt integer
Record

Definition at line 83 of file pltbutils_func_pkg.vhd.

◆ skiptests

skiptests std_logic_vector ( 0 to C_PLTBUTILS_SKIPTESTLEN - 1 )
Record

Definition at line 78 of file pltbutils_func_pkg.vhd.

◆ stop_sim [1/2]

stop_sim std_logic
Record

Definition at line 88 of file pltbutils_func_pkg.vhd.

◆ stop_sim [2/2]

stop_sim std_logic
Record

Definition at line 124 of file pltbutils_func_pkg.vhd.

◆ test_active

test_active boolean
Record

Definition at line 79 of file pltbutils_func_pkg.vhd.

◆ test_cnt

test_cnt integer
Record

Definition at line 82 of file pltbutils_func_pkg.vhd.

◆ test_name_len

test_name_len integer
Record

Definition at line 77 of file pltbutils_func_pkg.vhd.

◆ test_name [1/2]

test_name string ( 1 to C_PLTBUTILS_STRLEN )
Record

Definition at line 120 of file pltbutils_func_pkg.vhd.

◆ test_name [2/2]

test_name string ( 1 to C_PLTBUTILS_STRLEN )
Record

Definition at line 76 of file pltbutils_func_pkg.vhd.

◆ test_num [1/2]

test_num natural
Record

Definition at line 119 of file pltbutils_func_pkg.vhd.

◆ test_num [2/2]

test_num integer
Record

Definition at line 75 of file pltbutils_func_pkg.vhd.

◆ testcase_name_len

testcase_name_len integer
Record

Definition at line 74 of file pltbutils_func_pkg.vhd.

◆ testcase_name

testcase_name string ( 1 to C_PLTBUTILS_STRLEN )
Record

Definition at line 73 of file pltbutils_func_pkg.vhd.


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