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

Subversion Repositories tcp_ip_core_w_dhcp

[/] [tcp_ip_core_w_dhcp/] [trunk/] [TB_lfsr32_mod.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 craighaywo
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:   17:10:44 01/06/2015
6
-- Design Name:   
7
-- Module Name:   /home/craig/Documents/CW/Git_Repos/hw_client/TB_lfsr16_mod.vhd
8
-- Project Name:  hw_client
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:   
12
-- 
13
-- VHDL Test Bench Created by ISE for module: lfsr16_mod
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
 
31
-- Uncomment the following library declaration if using
32
-- arithmetic functions with Signed or Unsigned values
33
--USE ieee.numeric_std.ALL;
34
 
35
ENTITY TB_lfsr32_mod IS
36
END TB_lfsr32_mod;
37
 
38
ARCHITECTURE behavior OF TB_lfsr32_mod IS
39
 
40
    -- Component Declaration for the Unit Under Test (UUT)
41
 
42
    COMPONENT lfsr32_mod
43
    PORT(
44
         CLK_IN : IN  std_logic;
45
         SEED_IN : IN  std_logic_vector(31 downto 0);
46
         SEED_EN_IN : IN  std_logic;
47
         VAL_OUT : OUT  std_logic_vector(31 downto 0)
48
        );
49
    END COMPONENT;
50
 
51
 
52
   --Inputs
53
   signal CLK_IN : std_logic := '0';
54
   signal SEED_IN : std_logic_vector(31 downto 0) := (others => '0');
55
   signal SEED_EN_IN : std_logic := '0';
56
 
57
        --Outputs
58
   signal VAL_OUT : std_logic_vector(31 downto 0);
59
 
60
   -- Clock period definitions
61
   constant CLK_IN_period : time := 10 ns;
62
 
63
BEGIN
64
 
65
        -- Instantiate the Unit Under Test (UUT)
66
   uut: lfsr32_mod PORT MAP (
67
          CLK_IN => CLK_IN,
68
          SEED_IN => SEED_IN,
69
          SEED_EN_IN => SEED_EN_IN,
70
          VAL_OUT => VAL_OUT
71
        );
72
 
73
   -- Clock process definitions
74
   CLK_IN_process :process
75
   begin
76
                CLK_IN <= '0';
77
                wait for CLK_IN_period/2;
78
                CLK_IN <= '1';
79
                wait for CLK_IN_period/2;
80
   end process;
81
 
82
 
83
   -- Stimulus process
84
   stim_proc: process
85
   begin
86
 
87
      wait for CLK_IN_period * 1000;
88
 
89
                wait for CLK_IN_period;
90
                SEED_EN_IN <= '0';
91
                wait for CLK_IN_period;
92
                SEED_IN <= X"12341234";
93
                SEED_EN_IN <= '1';
94
                wait for CLK_IN_period;
95
                SEED_EN_IN <= '0';
96
 
97
      wait;
98
   end process;
99
 
100
END;

powered by: WebSVN 2.1.0

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