blob: 669850b9a93516b0cde3cb4dcf852121591f3aa2 (
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
32
33
34
35
|
entity tb_leftmost01 is
end tb_leftmost01;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
architecture behav of tb_leftmost01 is
signal a : unsigned (7 downto 0);
signal b : unsigned (8 to 12);
signal c : unsigned (0 to 3);
signal ra, rb, rc : integer;
begin
dut_a: entity work.leftmost01
port map (a, ra);
-- dut_b: entity work.leftmost01
-- port map (b, rb);
-- dut_c: entity work.leftmost01
-- port map (c, rc);
process
begin
a <= b"0010_0101";
b <= b"00101";
c <= b"0000";
wait for 1 ns;
assert ra = 5 severity failure;
-- assert rb = 10 severity failure;
-- assert rc = -1 severity failure;
wait;
end process;
end behav;
|