@@ -12,6 +12,7 @@ use work.bus_master_pkg.all;
1212use work.com_pkg.all ;
1313use work.com_types_pkg.all ;
1414use work.logger_pkg.all ;
15+ use work.sync_pkg.all ;
1516use work.memory_pkg.memory_t;
1617use work.memory_pkg.to_vc_interface;
1718
@@ -49,9 +50,6 @@ package apb_master_pkg is
4950 -- default byte enable is all bytes
5051 constant byte_enable : std_logic_vector := " " );
5152
52- procedure wait_until_idle(signal net : inout network_t;
53- bus_handle : apb_master_t);
54-
5553 -- Non blocking: Read the bus returning a reference to the future reply
5654 procedure read_bus(signal net : inout network_t;
5755 constant bus_handle : apb_master_t;
@@ -107,6 +105,14 @@ package apb_master_pkg is
107105 value : std_logic ;
108106 timeout : delay_length := delay_length 'high ;
109107 msg : string := " " );
108+
109+ procedure wait_until_idle(signal net : inout network_t;
110+ handle : apb_master_t;
111+ timeout : delay_length := max_timeout);
112+
113+ procedure wait_for_time(signal net : inout network_t;
114+ handle : apb_master_t;
115+ delay : delay_length );
110116end package ;
111117
112118package body apb_master_pkg is
@@ -168,12 +174,6 @@ package body apb_master_pkg is
168174 write_bus(net, bus_handle.p_bus_handle, address, data, byte_enable);
169175 end procedure ;
170176
171- procedure wait_until_idle(signal net : inout network_t;
172- bus_handle : apb_master_t) is
173- begin
174- wait_until_idle(net, bus_handle.P_bus_handle);
175- end procedure ;
176-
177177 -- Blocking: read bus with immediate reply
178178 procedure read_bus(signal net : inout network_t;
179179 constant bus_handle : apb_master_t;
@@ -252,4 +252,18 @@ package body apb_master_pkg is
252252 begin
253253 wait_until_read_bit_equals(net, bus_handle.p_bus_handle, addr, idx, value , timeout, msg);
254254 end procedure ;
255+
256+ procedure wait_until_idle(signal net : inout network_t;
257+ handle : apb_master_t;
258+ timeout : delay_length := max_timeout) is
259+ begin
260+ wait_until_idle(net, handle.p_bus_handle.p_actor, timeout);
261+ end procedure ;
262+
263+ procedure wait_for_time(signal net : inout network_t;
264+ handle : apb_master_t;
265+ delay : delay_length ) is
266+ begin
267+ wait_for_time(net, handle.p_bus_handle.p_actor, delay);
268+ end procedure ;
255269end package body ;
0 commit comments