Debian Codegraph @

hdl/fpga/ip/nuand/ps_sync/vhdl/tb/ps_sync_tb.vhd

raw
1 -- Copyright (c) 2017 Nuand LLC
2 --
3 -- Permission is hereby granted, free of charge, to any person obtaining a copy
4 -- of this software and associated documentation files (the "Software"), to deal
5 -- in the Software without restriction, including without limitation the rights
6 -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 -- copies of the Software, and to permit persons to whom the Software is
8 -- furnished to do so, subject to the following conditions:
9 --
10 -- The above copyright notice and this permission notice shall be included in
11 -- all copies or substantial portions of the Software.
12 --
13 -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 -- THE SOFTWARE.
20
21 library ieee;
22 use ieee.std_logic_1164.all;
23 use ieee.numeric_std.all;
24 use ieee.math_real.all;
25
26 entity ps_sync_tb is
27 end entity;
28
29 architecture arch of ps_sync_tb is
30
31 signal clock : std_logic := '1';
32
33 begin
34
35 clock <= not clock after 13.021 ns;
36
37 u_uut0 : entity work.ps_sync
38 generic map (
39 OUTPUTS => 1,
40 USE_LFSR => true,
41 HOP_LIST => (4, 5, 6, 7, 8),
42 HOP_RATE => 1
43 )
44 port map (
45 refclk => clock,
46 sync => open
47 );
48
49 u_uut1 : entity work.ps_sync
50 generic map (
51 OUTPUTS => 2,
52 USE_LFSR => false,
53 HOP_LIST => (4, 5, 6, 7, 8),
54 HOP_RATE => 3
55 )
56 port map (
57 refclk => clock,
58 sync => open
59 );
60
61 u_uut2 : entity work.ps_sync
62 generic map (
63 OUTPUTS => 1,
64 USE_LFSR => false,
65 HOP_LIST => (0 => 4),
66 HOP_RATE => 2
67 )
68 port map (
69 refclk => clock,
70 sync => open
71 );
72
73 end architecture;