blob: 17b09824c9a07a72fc6c3ad107ce08e2bad84c73 (
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
|
library ieee;
use ieee.std_logic_1164.all;
entity tb4 is
end;
architecture behav of tb4 is
function repeat(val : std_ulogic; n : natural) return std_ulogic_vector
is
variable res : std_ulogic_vector(n - 1 downto 0);
begin
-- No aggregate use.
for i in res'range loop
res (i) := val;
end loop;
return res;
end function;
begin
process
constant c : std_ulogic_vector (3 downto 0) := ('1', repeat ('0', 3));
begin
assert c = "1000" severity failure;
wait;
end process;
end behav;
|