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

Subversion Repositories lxp32

[/] [lxp32/] [trunk/] [verify/] [lxp32/] [src/] [tb/] [tb_pkg.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 ring0_mipt
---------------------------------------------------------------------
2
-- LXP32 testbench package
3
--
4
-- Part of the LXP32 testbench
5
--
6
-- Copyright (c) 2016 by Alex I. Kuznetsov
7
--
8
-- Auxiliary package declaration for the LXP32 testbench
9
---------------------------------------------------------------------
10
 
11
library ieee;
12
use ieee.std_logic_1164.all;
13
 
14
package tb_pkg is
15
        constant c_max_program_size: integer:=8192;
16
 
17
        type soc_globals_type is record
18
                rst_i: std_logic;
19
                cpu_rst_i: std_logic;
20
        end record;
21
 
22
        type soc_wbs_in_type is record
23
                cyc: std_logic;
24
                stb: std_logic;
25
                we: std_logic;
26
                sel: std_logic_vector(3 downto 0);
27
                adr: std_logic_vector(31 downto 2);
28
                dat: std_logic_vector(31 downto 0);
29
        end record;
30
 
31
        type soc_wbs_out_type is record
32
                ack: std_logic;
33
                dat: std_logic_vector(31 downto 0);
34
        end record;
35
 
36
        type soc_wbm_in_type is record
37
                ack: std_logic;
38
                dat: std_logic_vector(31 downto 0);
39
        end record;
40
 
41
        type soc_wbm_out_type is record
42
                cyc: std_logic;
43
                stb: std_logic;
44
                we: std_logic;
45
                sel: std_logic_vector(3 downto 0);
46
                adr: std_logic_vector(27 downto 2);
47
                dat: std_logic_vector(31 downto 0);
48
        end record;
49
 
50
        type monitor_out_type is record
51
                data: std_logic_vector(31 downto 0);
52
                valid: std_logic;
53
        end record;
54
 
55
        procedure load_ram(
56
                filename: string;
57
                signal clk: in std_logic;
58
                signal soc_in: out soc_wbs_in_type;
59
                signal soc_out: in soc_wbs_out_type
60
        );
61
 
62
        procedure run_test(
63
                filename: string;
64
                signal clk: in std_logic;
65
                signal globals: out soc_globals_type;
66
                signal soc_in: out soc_wbs_in_type;
67
                signal soc_out: in soc_wbs_out_type;
68
                signal result: in monitor_out_type
69
        );
70
end package;

powered by: WebSVN 2.1.0

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