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

Subversion Repositories ether_arp_1g

[/] [ether_arp_1g/] [trunk/] [testbench/] [tb-ed.vhdl] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jrwagz
library ieee;
2
use ieee.std_logic_1164.all;
3
use std.textio.all;
4
 
5
entity tb_edge_detector is
6
  --empty
7
end tb_edge_detector;
8
 
9
 
10
architecture beh of tb_edge_detector is
11
 
12
  component edge_detector
13
        port(
14
                din   :  in  std_logic;
15
                clk   :  in  std_logic;
16
                rst_n :  in  std_logic;
17
                dout  :  out std_logic
18
            );
19
  end component edge_detector;
20
 
21
 
22
  --signal declaration
23
 
24
     signal clk_net        : std_logic;
25
     signal rst_n_net      : std_logic;
26
     signal din_net        : std_logic;
27
     signal dout_net       : std_logic;
28
 
29
 begin
30
        inst_1: edge_detector
31
          port map(
32
                  din   =>  din_net,
33
                  clk   =>  clk_net,
34
                  rst_n =>  rst_n_net,
35
                  dout  =>  dout_net
36
                  );
37
 
38
 
39
    clk_p : process
40
    begin
41
      clk_net <= '0';
42
      wait for 2 ns;
43
      clk_net <= '1';
44
      wait for 2 ns;
45
    end process clk_p;
46
 
47
    input_data : process
48
        begin
49
            din_net <= '0';
50
                wait for 7 ns;
51
            din_net <= '1';
52
                wait for 10 ns;
53
            din_net <= '0';
54
                wait for 20 ns;
55
        end process input_data;
56
 
57
    test_bench : process
58
        begin
59
 
60
          rst_n_net <= '0';
61
          wait for 1 ns;
62
          rst_n_net <= '1';
63
          wait for 100 ns;
64
 
65
          assert false
66
          report "End of Simulation"
67
          severity failure;
68
 
69
        end process test_bench;
70
 
71
end beh;
72
 
73
 

powered by: WebSVN 2.1.0

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