blob: e45a06518eec51383af1676e0f8328dd69539336 (
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
36
37
|
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity tb_test is end;
architecture arch_tb of tb_test is
signal reset_s, clk_s : std_logic;
signal i_s : integer;
signal u_s : unsigned(7 downto 0);
begin
reset : reset_s <= '0',
'1' after 20 ns,
'0' after 400 ns;
clock : process begin
clk_s <= '0';
wait for 100 ns;
clk_s <= '1';
wait for 100 ns;
end process clock;
process (reset_s, clk_s) begin
if reset_s = '1' then
report integer'image(i_s); -- Will report -2147483648
i_s <= 0;
elsif rising_edge(clk_s) then
i_s <= 3;
end if;
end process;
u_s <= to_unsigned(i_s, 8); -- Will give a bound check failure
end architecture arch_tb;
|