~ruther/jesd204b-vhdl

ref: beef61ddc3c126491591771376d8bf4bfd38f3cf jesd204b-vhdl/testbench/descrambler_tb.vhd -rw-r--r-- 798 bytes
beef61dd — František Boháček fix: save previous sample data in octets_to_sample 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library ieee;
use ieee.std_logic_1164.all;
use work.testing_functions.all;
use work.data_link_pkg.all;

entity descrambler_tb is
end entity descrambler_tb;

architecture a1 of descrambler_tb is
  constant clk_period : time := 1 ns;    -- The clock period

  signal clk : std_logic := '0';        -- The clock
  signal reset : std_logic := '0';      -- The reset

  signal di_char : frame_character;
  signal do_char : frame_character;

begin  -- architecture a1
  uut: entity work.descrambler
    port map (
      di_char =>  di_char,
      do_char => do_char,
      ci_reset => reset,
      ci_char_clk => clk
    );

  clk <= not clk after clk_period/2;
  reset <= '1' after clk_period*2;

  test: process is
  begin  -- process test
    wait for 200 ms;
  end process test;
end architecture a1;
Do not follow this link