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

Subversion Repositories lxp32

[/] [lxp32/] [trunk/] [verify/] [common_pkg/] [common_pkg.vhd] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ring0_mipt
---------------------------------------------------------------------
2
-- Common package for LXP32 testbenches
3
--
4
-- Part of the LXP32 verification environment
5
--
6
-- Copyright (c) 2016 by Alex I. Kuznetsov
7
---------------------------------------------------------------------
8
 
9
library ieee;
10
use ieee.std_logic_1164.all;
11
use ieee.numeric_std.all;
12
 
13
package common_pkg is
14 6 ring0_mipt
        type rng_state_type is record
15
                seed1: positive;
16
                seed2: positive;
17
        end record;
18
 
19
        -- Generate a pseudo-random value of integer type from [a;b] range
20
        -- Output is stored in x
21
        procedure rand(variable st: inout rng_state_type; a,b: integer; variable x: out integer);
22 2 ring0_mipt
 
23 6 ring0_mipt
        -- Convert std_logic_vector to a hexadecimal string (similar to
24
        -- the "to_hstring" function from VHDL-2008
25 2 ring0_mipt
        function hex_string(x: std_logic_vector) return string;
26
end package;

powered by: WebSVN 2.1.0

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