aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1675/tb_accum.vhdl
blob: 325072a09025a5c9612a376d8b6d4e85def96808 (plain)
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
entity tb_accum is
end tb_accum;

library ieee;
use ieee.std_logic_1164.all;

use work.pkg.all;

architecture behav of tb_accum is
  signal clk : std_logic;
  signal bi : bus_rec_out_t;
  signal res : std_logic_vector(15 downto 0);
begin
  dut: entity work.accum
    port map (clk, bi, res);

  process
    procedure pulse is
    begin
      clk <= '0';
      wait for 1 ns;
      clk <= '1';
      wait for 1 ns;
    end pulse;
  begin
    bi <= (dat => x"00", stb => '0', rst => '1');
    pulse;
    assert res = x"0000" severity failure;
    wait;
  end process;
end behav;