blob: 80b6146fcb90d97101599d9a3cbb6536ed7a720c (
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
|
entity tb_test is
end tb_test;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
architecture behav of tb_test is
signal s : std_logic := '0';
signal a : unsigned(7 downto 0);
signal r : integer range 0 to 255;
begin
dut: entity work.test
port map (s, a, r);
process
begin
wait for 1 ns;
assert r = 0 severity failure;
s <= '1';
a <= x"a5";
wait for 1 ns;
assert r = 165 severity failure;
wait;
end process;
end behav;
|