Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 0 additions & 3 deletions vunit/vhdl/com/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@
prj.add_com()
tb_com_lib = prj.add_library("tb_com_lib")
tb_com_lib.add_source_files(join(root, 'test', '*.vhd'))
pkg = tb_com_lib.package('custom_types_pkg')
pkg.generate_codecs(codec_package_name='custom_codec_pkg', used_packages=['ieee.std_logic_1164', 'constants_pkg',
'tb_com_lib.more_constants_pkg'])
prj.main()
23 changes: 3 additions & 20 deletions vunit/vhdl/com/src/com.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ context work.vunit_context;

use work.queue_pkg.all;
use work.queue_2008_pkg.all;
use work.queue_pool_pkg.all;
use work.integer_vector_ptr_pkg.all;
use work.string_ptr_pkg.all;
use work.codec_pkg.all;
Expand Down Expand Up @@ -233,7 +232,6 @@ package body com_pkg is
variable status : com_status_t;
variable source_actor : actor_t;
variable mailbox : mailbox_id_t;
variable message : message_ptr_t;
begin
delete(reply_msg);

Expand All @@ -252,7 +250,7 @@ package body com_pkg is
wait_on_subscribers(sender, (published, outbound), timeout);
messenger.publish(sender, msg, (published, outbound));
notify(net);
recycle(queue_pool, msg.data);
deallocate(msg.data);
end;

impure function peek_message(
Expand All @@ -266,8 +264,7 @@ package body com_pkg is
return msg;
end if;

msg := messenger.get_all_but_payload(actor, position, mailbox_id);
msg.data := decode(messenger.get_payload(actor, position, mailbox_id));
msg := messenger.get_message(actor, position, mailbox_id);

return msg;
end;
Expand Down Expand Up @@ -374,8 +371,7 @@ package body com_pkg is
begin
started_with_full_mailbox := messenger.is_full(actor, mailbox_id);

msg := messenger.get_all_but_payload(actor, position, mailbox_id);
msg.data := decode(messenger.get_payload(actor, position, mailbox_id));
msg := messenger.get_message(actor, position, mailbox_id);
messenger.delete_envelope(actor, position, mailbox_id);

if started_with_full_mailbox then
Expand Down Expand Up @@ -683,17 +679,4 @@ package body com_pkg is
return l.all;
end;

-----------------------------------------------------------------------------
-- Misc
-----------------------------------------------------------------------------
procedure allow_timeout is
begin
messenger.allow_timeout;
end;

procedure allow_deprecated is
begin
messenger.allow_deprecated;
end;

end package body com_pkg;
11 changes: 0 additions & 11 deletions vunit/vhdl/com/src/com_api.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,4 @@ package com_pkg is
-- Return string representation of the messenger state
impure function get_messenger_state_string(indent : string := "") return string;

-----------------------------------------------------------------------------
-- Misc
-----------------------------------------------------------------------------

-- Allow deprecated APIs
procedure allow_deprecated;

-- Allow timeout in deprecated functionality. If not allowed timeouts will
-- cause a runtime error.
procedure allow_timeout;

end package;
6 changes: 3 additions & 3 deletions vunit/vhdl/com/src/com_common.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package com_common_pkg is

procedure notify (signal net : inout network_t);

impure function no_error_status (status : com_status_t; old_api : boolean := false) return boolean;
impure function no_error_status (status : com_status_t) return boolean;
end package com_common_pkg;

package body com_common_pkg is
Expand All @@ -30,9 +30,9 @@ package body com_common_pkg is
end if;
end procedure notify;

impure function no_error_status (status : com_status_t; old_api : boolean := false) return boolean is
impure function no_error_status (status : com_status_t) return boolean is
begin
return (status = ok) or ((status = timeout) and messenger.timeout_is_allowed and old_api);
return status = ok;
end;

end package body com_common_pkg;
3 changes: 0 additions & 3 deletions vunit/vhdl/com/src/com_context.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ context com_context is
use vunit_lib.com_types_pkg.all;
use vunit_lib.codec_pkg.all;
use vunit_lib.codec_2008_pkg.all;
use vunit_lib.com_string_pkg.all;
use vunit_lib.codec_builder_pkg.all;
use vunit_lib.codec_builder_2008_pkg.all;
use vunit_lib.com_debug_codec_builder_pkg.all;
use vunit_lib.com_deprecated_pkg.all;
use vunit_lib.com_common_pkg.all;
end context;
Loading