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

Subversion Repositories noekeoncore

[/] [noekeoncore/] [trunk/] [tb/] [tb_gamma.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 entactogen
 
2
-- Copyright (c) 2013 Antonio de la Piedra
3
 
4
-- This program is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
 
9
-- This program is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
 
14
-- You should have received a copy of the GNU General Public License
15
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
LIBRARY ieee;
18
USE ieee.std_logic_1164.ALL;
19
 
20
ENTITY tb_gamma IS
21
END tb_gamma;
22
 
23
ARCHITECTURE behavior OF tb_gamma IS
24
 
25
    -- Component Declaration for the Unit Under Test (UUT)
26
 
27
    COMPONENT gamma
28
    PORT(
29
         clk : IN  std_logic;
30
         a_0_in : IN  std_logic_vector(31 downto 0);
31
         a_1_in : IN  std_logic_vector(31 downto 0);
32
         a_2_in : IN  std_logic_vector(31 downto 0);
33
         a_3_in : IN  std_logic_vector(31 downto 0);
34
         a_0_out : OUT  std_logic_vector(31 downto 0);
35
         a_1_out : OUT  std_logic_vector(31 downto 0);
36
         a_2_out : OUT  std_logic_vector(31 downto 0);
37
         a_3_out : OUT  std_logic_vector(31 downto 0)
38
        );
39
    END COMPONENT;
40
 
41
 
42
   --Inputs
43
   signal clk : std_logic := '0';
44
   signal a_0_in : std_logic_vector(31 downto 0) := (others => '0');
45
   signal a_1_in : std_logic_vector(31 downto 0) := (others => '0');
46
   signal a_2_in : std_logic_vector(31 downto 0) := (others => '0');
47
   signal a_3_in : std_logic_vector(31 downto 0) := (others => '0');
48
 
49
        --Outputs
50
   signal a_0_out : std_logic_vector(31 downto 0);
51
   signal a_1_out : std_logic_vector(31 downto 0);
52
   signal a_2_out : std_logic_vector(31 downto 0);
53
   signal a_3_out : std_logic_vector(31 downto 0);
54
 
55
   -- Clock period definitions
56
   constant clk_period : time := 10 ns;
57
 
58
BEGIN
59
 
60
        -- Instantiate the Unit Under Test (UUT)
61
   uut: gamma PORT MAP (
62
          clk => clk,
63
          a_0_in => a_0_in,
64
          a_1_in => a_1_in,
65
          a_2_in => a_2_in,
66
          a_3_in => a_3_in,
67
          a_0_out => a_0_out,
68
          a_1_out => a_1_out,
69
          a_2_out => a_2_out,
70
          a_3_out => a_3_out
71
        );
72
 
73
   -- Clock process definitions
74
   clk_process :process
75
   begin
76
                clk <= '0';
77
                wait for clk_period/2;
78
                clk <= '1';
79
                wait for clk_period/2;
80
   end process;
81
 
82
 
83
   -- Stimulus process
84
   stim_proc: process
85
   begin
86
                wait for clk_period/2 + clk_period;
87
 
88
                a_0_in <= X"C5B032AD";
89
                a_1_in <= X"3E48160D";
90
                a_2_in <= X"8C9A3EF5";
91
                a_3_in <= X"AF2DFC9F";
92
 
93
      wait for clk_period;
94
 
95
                a_0_in <= X"AB2DED92";
96
                a_1_in <= X"5C481D1D";
97
                a_2_in <= X"8407F1CF";
98
                a_3_in <= X"C9B824A8";
99
 
100
      -- insert stimulus here 
101
 
102
      wait;
103
   end process;
104
 
105
END;

powered by: WebSVN 2.1.0

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