blob: 8bd890df831b1b9fdd3b19ce66013d0f3c9aabe4 (
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
|
entity repro4 is
end entity;
architecture tb of repro4 is
type channel is record
data : bit_vector;
ack : bit;
end record;
type my_bus is record
rd : channel;
wr : channel;
end record;
function init_channel (width : natural) return channel is
begin
return (data => (width - 1 downto 0 => '0'),
ack => '0');
end init_channel;
function init_bus (width : natural) return my_bus is
begin
return (rd => init_channel (width),
wr => init_channel (width));
end init_bus;
constant b : my_bus := init_bus (12);
begin
assert b.rd.data(2) = '0';
end tb;
|