Skip to content

Commit

Permalink
Added test runner lock - rule 12
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMartinPhios committed Nov 26, 2024
1 parent 81d9f64 commit be358bc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vunit/vhdl/verification_components/src/axi_master.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ use work.logger_pkg.all;
use work.queue_pkg.all;
use work.sync_pkg.all;
use work.vc_pkg.all;
use work.runner_pkg.all;
use work.run_pkg.all;
use work.run_types_pkg.all;

entity axi_master is
generic (
Expand Down Expand Up @@ -165,13 +168,19 @@ begin
variable burst : std_logic_vector(arburst'range) := (others => '0');
variable byteenable : std_logic_vector(wstrb'range) := (others => '0');
variable resp : axi_resp_t;
constant key : key_t := get_entry_key(test_runner_cleanup);
begin
-- Initialization
rnd.InitSeed(rnd'instance_name);
drive_idle;

loop
wait until rising_edge(aclk) and not is_empty(message_queue) and areset_n = '1';
if is_empty(message_queue) then
unlock(runner, key);
wait until rising_edge(aclk) and not is_empty(message_queue) and areset_n = '1';
end if;
lock(runner, key);

idle <= false;
wait for 0 ps;

Expand Down

0 comments on commit be358bc

Please sign in to comment.