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

Subversion Repositories xucpu

[/] [xucpu/] [trunk/] [VHDL/] [uCtrl/] [tb_rom.vhdl] - Blame information for rev 39

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

Line No. Rev Author Line
1 2 lcdsgmtr
-- Copyright 2015, Jürgen Defurne
2
--
3
-- This file is part of the Experimental Unstable CPU System.
4
--
5
-- The Experimental Unstable CPU System Is free software: you can redistribute
6
-- it and/or modify it under the terms of the GNU Lesser General Public License
7
-- as published by the Free Software Foundation, either version 3 of the
8
-- License, or (at your option) any later version.
9
--
10
-- The Experimental Unstable CPU System is distributed in the hope that it will
11
-- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
13
-- General Public License for more details.
14
--
15
-- You should have received a copy of the GNU Lesser General Public License
16
-- along with Experimental Unstable CPU System. If not, see
17
-- http://www.gnu.org/licenses/lgpl.txt.
18
 
19
 
20
LIBRARY ieee;
21
USE ieee.std_logic_1164.ALL;
22
USE ieee.numeric_std.ALL;
23
 
24
ENTITY tb_rom IS
25
END tb_rom;
26
 
27
ARCHITECTURE behavior OF tb_rom IS
28
 
29
  -- Component Declaration for the Unit Under Test (UUT)
30
 
31
  COMPONENT test_rom
32
    PORT(
33
      clk : IN  STD_LOGIC;
34
      rst : IN  STD_LOGIC;
35
      led : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
36
      );
37
  END COMPONENT;
38
 
39
 
40
  --Inputs
41
  SIGNAL clk : STD_LOGIC := '0';
42
  SIGNAL rst : STD_LOGIC := '0';
43
 
44
  --Outputs
45
  SIGNAL led : STD_LOGIC_VECTOR(7 DOWNTO 0);
46
 
47
  -- Clock period definitions
48
  CONSTANT clk_period : TIME := 10 ns;
49
 
50
BEGIN
51
 
52
  -- Instantiate the Unit Under Test (UUT)
53
  uut : test_rom PORT MAP (
54
    clk => clk,
55
    rst => rst,
56
    led => led
57
    );
58
 
59
  -- Clock process definitions
60
  clk_process : PROCESS
61
  BEGIN
62
    clk <= '0';
63
    WAIT FOR clk_period/2;
64
    clk <= '1';
65
    WAIT FOR clk_period/2;
66
  END PROCESS;
67
 
68
 
69
  -- Stimulus process
70
  stim_proc : PROCESS
71
  BEGIN
72
    -- hold reset state for 100 ns.
73
    rst <= '1';
74
    WAIT FOR 100 ns;
75
    rst <= '0';
76
 
77
    WAIT FOR clk_period*10;
78
 
79
    -- insert stimulus here 
80
 
81
    WAIT;
82
  END PROCESS;
83
 
84
END;

powered by: WebSVN 2.1.0

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