Skip to content

Commit b1331b0

Browse files
committed
let the apb_master ctor be handled by bus_master
The bus_master implementation will create an actor if null_actor is given as parameter. So we don't have to do it in apb_master.
1 parent 8d74268 commit b1331b0

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

vunit/vhdl/verification_components/src/apb_master_pkg.vhd

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ package body apb_master_pkg is
119119
drive_invalid : boolean := true;
120120
drive_invalid_val : std_logic := 'X'
121121
) return apb_master_t is
122-
impure function create_bus (logger : logger_t; actor : actor_t) return bus_master_t is
122+
impure function create_bus (logger : logger_t) return bus_master_t is
123123
begin
124124
return new_bus(
125125
data_length => data_length,
@@ -128,21 +128,15 @@ package body apb_master_pkg is
128128
actor => actor
129129
);
130130
end function;
131-
variable actor_tmp : actor_t := null_actor;
132131
variable logger_tmp : logger_t := null_logger;
133132
begin
134-
if actor = null_actor then
135-
actor_tmp := new_actor;
136-
else
137-
actor_tmp := actor;
138-
end if;
139133
if logger = null_logger then
140134
logger_tmp := bus_logger;
141135
else
142136
logger_tmp := logger;
143137
end if;
144138
return (
145-
p_bus_handle => create_bus(logger_tmp, actor_tmp),
139+
p_bus_handle => create_bus(logger_tmp),
146140
p_drive_invalid => drive_invalid,
147141
p_drive_invalid_val => drive_invalid_val
148142
);

0 commit comments

Comments
 (0)