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

Subversion Repositories lxp32

[/] [lxp32/] [trunk/] [verify/] [common_pkg/] [common_pkg.vhd] - Diff between revs 6 and 9

Only display areas with differences | Details | Blame | View Log

Rev 6 Rev 9
---------------------------------------------------------------------
---------------------------------------------------------------------
-- Common package for LXP32 testbenches
-- Common package for LXP32 testbenches
--
--
-- Part of the LXP32 verification environment
-- Part of the LXP32 verification environment
--
--
-- Copyright (c) 2016 by Alex I. Kuznetsov
-- Copyright (c) 2016 by Alex I. Kuznetsov
---------------------------------------------------------------------
---------------------------------------------------------------------
 
 
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 common_pkg is
package common_pkg is
        type rng_state_type is record
        type rng_state_type is record
                seed1: positive;
                seed1: positive;
                seed2: positive;
                seed2: positive;
        end record;
        end record;
 
 
        -- Generate a pseudo-random value of integer type from [a;b] range
        -- Generate a pseudo-random value of integer type from [a;b] range
        -- Output is stored in x
        -- Output is stored in x
        procedure rand(variable st: inout rng_state_type; a,b: integer; variable x: out integer);
        procedure rand(variable st: inout rng_state_type; a,b: integer; variable x: out integer);
 
 
        -- Convert std_logic_vector to a hexadecimal string (similar to
        -- Convert std_logic_vector to a hexadecimal string (similar to
        -- the "to_hstring" function from VHDL-2008
        -- the "to_hstring" function from VHDL-2008
        function hex_string(x: std_logic_vector) return string;
        function hex_string(x: std_logic_vector) return string;
end package;
end package;
 
 

powered by: WebSVN 2.1.0

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