OpenCores
URL https://opencores.org/ocsvn/distributed_intelligence/distributed_intelligence/trunk

Subversion Repositories distributed_intelligence

[/] [distributed_intelligence/] [trunk/] [LIB/] [UnitTest.vhd] - Diff between revs 4 and 5

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 4 Rev 5
Line 1... Line 1...
--      Package File Template
--              UNIT TESTS
--
--
--      Purpose: This package defines supplemental types, subtypes, 
--      Purpose: This package gives procedures and function to make automated unit tests.
--               constants, and functions 
 
 
 
 
 
library IEEE;
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.all;
use IEEE.NUMERIC_STD.all;
 
 
package UnitTest is
package UnitTest is
 
        -- assertEqual: 
-- Declare constants
        -- This procedure tests if 2 values are equal, if they are not, it shows an error report
 
 
-- Declare functions and procedure
 
 
 
        procedure assertEqual(current, expected: in integer; resultName: in string := "Result");
        procedure assertEqual(current, expected: in integer; resultName: in string := "Result");
        procedure assertEqual(current, expected: in std_logic; resultName: in string := "Result");
        procedure assertEqual(current, expected: in std_logic; resultName: in string := "Result");
        procedure assertEqual(current, expected: in std_logic_vector; resultName: in string := "Result");
        procedure assertEqual(current, expected: in std_logic_vector; resultName: in string := "Result");
 
 
 
        -- assertOperationResult:
 
        -- This procedure tests if an operation is working under overflow conditions. If they are not, it reports an error.
 
        -- You can also specify an overflow bit to be verified automatically by the procedure to be at '1' when there is an
 
        -- overflow and at '0' when there is no overflow.
        procedure assertOperationResult(        actual, expected : in integer; opName: in string:= "operation"; overflowCond: boolean := false; overflowBit: std_logic := '-');
        procedure assertOperationResult(        actual, expected : in integer; opName: in string:= "operation"; overflowCond: boolean := false; overflowBit: std_logic := '-');
        procedure assertOperationResult(        actual, expected : in std_logic_vector; opName: in string:= "operation"; overflowCond: boolean := false; overflowBit: std_logic := '-');
        procedure assertOperationResult(        actual, expected : in std_logic_vector; opName: in string:= "operation"; overflowCond: boolean := false; overflowBit: std_logic := '-');
end UnitTest;
end UnitTest;
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.