Browse Source

Adds missing functions to test_utility

master
kutningjo 3 weeks ago
parent
commit
691160d653
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      scripts/test_utility.vhd

+ 10
- 1
scripts/test_utility.vhd View File



type real_array is array ( natural range <> ) of real; type real_array is array ( natural range <> ) of real;


procedure assert_eq( a : in std_logic; b : in std_logic );
procedure assert_eq( a : in std_logic_vector; b : in std_logic_vector ); procedure assert_eq( a : in std_logic_vector; b : in std_logic_vector );


procedure assert_near( variable a : in real; procedure assert_near( variable a : in real;


package body test_utility is package body test_utility is


procedure assert_eq( a : in std_logic_vector; b : in std_logic_vector ) is
procedure assert_eq( a : in std_logic; b : in std_logic ) is
begin begin
assert( a = b )
report TEST_FAIL & "assert_eq" & LF &
" a: " & to_string( a ) & LF &
" b: " & to_string( b ) & LF
severity error;
end procedure assert_eq;


procedure assert_eq( a : in std_logic_vector; b : in std_logic_vector ) is
begin
assert( a = b ) assert( a = b )
report TEST_FAIL & "assert_eq" & LF & report TEST_FAIL & "assert_eq" & LF &
" a: " & to_string( a ) & LF & " a: " & to_string( a ) & LF &

Loading…
Cancel
Save