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

Subversion Repositories manchesterwireless

[/] [manchesterwireless/] [branches/] [singledouble/] [waitForStart/] [simTest.vhd] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 kingmu
library ieee;
2
use ieee.std_logic_1164.all;
3
 
4
entity testSim is
5
end testSim;
6
 
7
architecture Behavioral of testSim is
8
  constant start_length : integer := 20;
9
 
10
  component waitForStart
11
  generic (start_length : integer);
12
  port (
13
    data_i : in  std_logic;
14
    clk_i : in  std_logic;
15
    rst_i : in std_logic;
16
    ready_o : out  std_logic
17
  );
18
  end component;
19
 
20
  constant half_period : time := 10 ns;
21
 
22
  signal data_i : std_logic;
23
  signal clk_i : std_logic;
24
  signal rst_i : std_logic := '1';
25
  signal ready_o : std_logic;
26
begin
27
 
28
  process
29
  begin
30
    rst_i <= '1';
31
    wait for 5 ns;
32
    rst_i <= '0';
33
    data_i <= '1';
34
 
35
    wait for 400 ns;
36
    data_i <= '0';
37
 
38
    wait for 100 ns;
39
    data_i <= '1';
40
 
41
    wait for 2000 ns;
42
  end process;
43
 
44
  waitForStart1 : waitForStart
45
  generic map(start_length => start_length)
46
  port map(
47
    data_i => data_i,
48
    clk_i => clk_i,
49
    rst_i => rst_i,
50
    ready_o => ready_o
51
  );
52
 
53
  clock : process
54
  begin
55
    clk_i <= '1';
56
    loop
57
      wait for half_period;
58
      clk_i <= not clk_i;
59
    end loop;
60
  end process;
61
end Behavioral;
62
 

powered by: WebSVN 2.1.0

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