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

Subversion Repositories rv01_riscv_core

[/] [rv01_riscv_core/] [trunk/] [VHDL/] [SELF_TEST/] [RV01_selftest_TB.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 madsilicon
-----------------------------------------------------------------
2
--                                                             --
3
-----------------------------------------------------------------
4
--                                                             --
5
-- Copyright (C) 2016 Stefano Tonello                          --
6
--                                                             --
7
-- This source file may be used and distributed without        --
8
-- restriction provided that this copyright statement is not   --
9
-- removed from the file and that any derivative work contains --
10
-- the original copyright notice and the associated disclaimer.--
11
--                                                             --
12
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY         --
13
-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   --
14
-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   --
15
-- FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      --
16
-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         --
17
-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    --
18
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   --
19
-- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        --
20
-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  --
21
-- LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  --
22
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  --
23
-- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         --
24
-- POSSIBILITY OF SUCH DAMAGE.                                 --
25
--                                                             --
26
-----------------------------------------------------------------
27
 
28
---------------------------------------------------------------
29
-- RV01 self-test module test-bench
30
---------------------------------------------------------------
31
 
32
---------------------------------------------------------------
33
-- Notes:
34
---------------------------------------------------------------
35
 
36
library IEEE;
37
use IEEE.std_logic_1164.all;
38
use IEEE.numeric_std.all;
39
use STD.textio.all;
40
 
41
library work;
42
 
43
entity RV01_SELFTEST_TB is
44
end RV01_SELFTEST_TB;
45
 
46
architecture ARC of RV01_SELFTEST_TB is
47
 
48
  component RV01_SELFTEST is
49
    port(
50
      CLK_i : in std_logic; -- clock
51
      RST_i : in std_logic; -- reset
52
 
53
      DONE_o : out std_logic; -- test complete
54
      PASS_o : out std_logic -- test pass
55
    );
56
  end component;
57
 
58
  signal CLK : std_logic := '0';
59
  signal RST : std_logic := '1';
60
 
61
  signal DONE : std_logic;
62
  signal PASS : std_logic;
63
 
64
begin
65
 
66
  ---------------------------------------------------
67
  -- Clock & Reset signals
68
  ---------------------------------------------------
69
 
70
  CLK <= not(CLK) after 10 ns;
71
 
72
  RST <= '0' after 20 ns;
73
 
74
  ---------------------------------------------------
75
  -- Self-test module instance
76
  ---------------------------------------------------
77
 
78
  U_DUT : RV01_SELFTEST
79
    port map(
80
      CLK_i => CLK,
81
      RST_i => RST,
82
 
83
      DONE_o => DONE,
84
      PASS_o => PASS
85
    );
86
 
87
end ARC;

powered by: WebSVN 2.1.0

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