Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to define the actor on new_axi_slave function #709

Merged
merged 4 commits into from
Mar 16, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vunit/vhdl/verification_components/src/axi_slave_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ package axi_slave_pkg is

constant axi_slave_logger : logger_t := get_logger("vunit_lib:axi_slave_pkg");
impure function new_axi_slave(memory : memory_t;
actor : actor_t := null_actor;
address_fifo_depth : positive := 1;
write_response_fifo_depth : positive := 1;
check_4kbyte_boundary : boolean := true;
Expand Down Expand Up @@ -137,6 +138,7 @@ end package;

package body axi_slave_pkg is
impure function new_axi_slave(memory : memory_t;
actor : actor_t := null_actor;
address_fifo_depth : positive := 1;
write_response_fifo_depth : positive := 1;
check_4kbyte_boundary : boolean := true;
Expand All @@ -147,7 +149,7 @@ package body axi_slave_pkg is
max_response_latency : delay_length := 0 ns;
logger : logger_t := axi_slave_logger) return axi_slave_t is
begin
return (p_actor => new_actor,
return (p_actor => actor,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I was a bit unclear here. You still need to call new_actor. p_actor has to be set to

actor when actor /= null_actor else new_actor

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you've fixed that you can also rebase on master and then, hopefully, the remaining lint issues will disappear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of that at first, but got worried that it would not be the acceptable way. Will do it.

p_initial_address_fifo_depth => address_fifo_depth,
p_initial_write_response_fifo_depth => write_response_fifo_depth,
p_initial_check_4kbyte_boundary => check_4kbyte_boundary,
Expand Down