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

Subversion Repositories cortexi

[/] [cortexi/] [trunk/] [TestBench.vhd] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 riedelx
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:   18:16:01 07/17/2009
6
-- Design Name:   
7
-- Module Name:   M:/VHDL/CortexI/TestBench.vhd
8
-- Project Name:  CortexI
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:   
12
-- 
13
-- VHDL Test Bench Created by ISE for module: SOC
14
-- 
15
-- Dependencies:
16
-- 
17
-- Revision:
18
-- Revision 0.01 - File Created
19
-- Additional Comments:
20
--
21
-- Notes: 
22
-- This testbench has been automatically generated using types std_logic and
23
-- std_logic_vector for the ports of the unit under test.  Xilinx recommends
24
-- that these types always be used for the top-level I/O of a design in order
25
-- to guarantee that the testbench will bind correctly to the post-implementation 
26
-- simulation model.
27
--------------------------------------------------------------------------------
28
LIBRARY ieee;
29
USE ieee.std_logic_1164.ALL;
30
USE ieee.std_logic_unsigned.all;
31
USE ieee.numeric_std.ALL;
32
 
33
ENTITY TestBench IS
34
END TestBench;
35
 
36
ARCHITECTURE behavior OF TestBench IS
37
 
38
    -- Component Declaration for the Unit Under Test (UUT)
39
 
40
    COMPONENT SOC
41
    PORT(
42
         clkExt : IN  std_logic;
43
         raus : OUT std_logic;
44
         irq : IN  std_logic;
45
         RXD : IN  std_logic;
46
         TXD : OUT  std_logic
47
        );
48
    END COMPONENT;
49
 
50
 
51
   --Inputs
52
   signal clk : std_logic := '0';
53
   signal RXD : std_logic := '0';
54
   signal irq : std_logic := '1';
55
 
56
        --Outputs
57
   signal TXD : std_logic;
58
   signal raus : std_logic;
59
 
60
   -- Clock period definitions
61
   constant clk_period : time := 1us;
62
 
63
BEGIN
64
 
65
        -- Instantiate the Unit Under Test (UUT)
66
   uut: SOC PORT MAP (
67
          clkExt => clk,
68
          raus => raus,
69
          irq  => irq,
70
          RXD => RXD,
71
          TXD => TXD
72
        );
73
 
74
   -- Clock process definitions
75
  clk_process :process
76
  begin
77
    clk <= '0';
78
    wait for 50 ns;
79
    clk <= '1';
80
    wait for 50 ns;
81
  end process;
82
 
83
  process
84
  begin
85
    wait for 4800 ns;
86
    irq <= '0';
87
    wait for 300 ns;
88
    irq <= '1';
89
  end process;
90
 
91
   -- Stimulus process
92
   stim_proc: process
93
   begin
94
      RXD <= '1';
95
      wait;
96
   end process;
97
 
98
END;

powered by: WebSVN 2.1.0

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