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

Subversion Repositories xucpu

[/] [xucpu/] [trunk/] [VHDL/] [speed/] [tb_flipflop.vhdl] - Blame information for rev 27

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
 
23
-- Uncomment the following library declaration if using
24
-- arithmetic functions with Signed or Unsigned values
25
--USE ieee.numeric_std.ALL;
26
 
27
ENTITY tb_flipflop IS
28
END tb_flipflop;
29
 
30
ARCHITECTURE behavior OF tb_flipflop IS
31
 
32
    -- Component Declaration for the Unit Under Test (UUT)
33
 
34
    COMPONENT flipflop
35
    PORT(
36
         clock : IN  std_logic;
37
         sig : OUT  std_logic
38
        );
39
    END COMPONENT;
40
 
41
 
42
   --Inputs
43
   signal clock : std_logic := '0';
44
 
45
        --Outputs
46
   signal sig : std_logic;
47
 
48
   -- Clock period definitions
49
   constant clock_period : time := 2.5 ns;
50
 
51
BEGIN
52
 
53
        -- Instantiate the Unit Under Test (UUT)
54
   uut: flipflop PORT MAP (
55
          clock => clock,
56
          sig => sig
57
        );
58
 
59
   -- Clock process definitions
60
   clock_process :process
61
   begin
62
                clock <= '0';
63
                wait for clock_period/2;
64
                clock <= '1';
65
                wait for clock_period/2;
66
   end process;
67
 
68
 
69
   -- Stimulus process
70
   stim_proc: process
71
   begin
72
      -- hold reset state for 100 ns.
73
      wait for 100 ns;
74
 
75
      wait for clock_period*10;
76
 
77
      -- insert stimulus here 
78
 
79
      wait;
80
   end process;
81
 
82
END;

powered by: WebSVN 2.1.0

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