Package: com_pkg
- File: com_api.vhd
Signals
Name | Type | Description |
---|---|---|
net | network_t |
Functions
- destroy (actor : inout actor_t) return ()
Description
Destroy actor. Mailboxes are deallocated and dependent subscriptions are
removed. Returns null_actor.
- reset_messenger () return ()
Description
Reset communication system. All actors are destroyed.
- resize_mailbox (actor : actor_t;
new_size : natural;
mailbox_id : mailbox_id_t := inbox) return ()
Description
Resize actor mailbox. Reducing size below the number of messages in the
mailbox in runtime error
- send ( signal net : inout network_t;
constant receiver : in actor_t;
variable msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Primary send and receive related subprograms
All timeouts will result in a runtime error unless otherwise noted.
Send message to receiver. Blocking if reciever or any subscriber inbox is
full.
- send ( signal net : inout network_t;
constant receivers : in actor_vec_t;
variable msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Send message to an array of receivers. Blocking if any reciever or any subscriber inbox is
full.
- receive ( signal net : inout network_t;
constant receiver : in actor_t;
variable msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Receive message sent to receiver. Returns oldest message or the first
incoming if the inbox is empty. msg is initially deleted.
- receive ( signal net : inout network_t;
constant receivers : in actor_vec_t;
variable msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Receive message sent to any of the receivers. Returns oldest message or the first
incoming if the inboxes are empty. Receiver inboxes are emptied from left
to right. msg is initially deleted.
- reply ( signal net : inout network_t;
variable request_msg : inout msg_t;
variable reply_msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Reply to request_msg with reply_msg. request_msg may be anonymous. Blocking if reciever
or any subscriber inbox is full.
- receive_reply ( signal net : inout network_t;
variable request_msg : inout msg_t;
variable reply_msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Receive a reply_msg to request_msg. request_msg may be anonymous. reply_msg is initially deleted.
- publish ( signal net : inout network_t;
constant sender : in actor_t;
variable msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
Publish a message from sender to all its subscribers. Blocking if reciever or any subscriber inbox is
full.
- acknowledge ( signal net : inout network_t;
variable request_msg : inout msg_t;
constant positive_ack : in boolean := true;
constant timeout : in time := max_timeout) return ()
Description
Secondary send and receive related subprograms
All timeouts will result in a runtime error unless otherwise noted.
Positive or negative acknowledge of a request_msg. Same as a reply with a
boolean reply message.
- receive_reply ( signal net : inout network_t;
variable request_msg : inout msg_t;
variable positive_ack : out boolean;
constant timeout : in time := max_timeout) return ()
Description
Receive positive or negative acknowledge for a request_msg. request_msg
may be anonymous. reply_msg is initially deleted.
- request ( signal net : inout network_t;
constant receiver : in actor_t;
variable request_msg : inout msg_t;
variable reply_msg : inout msg_t;
constant timeout : in time := max_timeout) return ()
Description
This request is the same as send of request_msg to receiver followed by a
receive_reply of a reply_msg
- request ( signal net : inout network_t;
constant receiver : in actor_t;
variable request_msg : inout msg_t;
variable positive_ack : out boolean;
constant timeout : in time := max_timeout) return ()
Description
This request is the same as send of request_msg to receiver followed by a
receive_reply of a positive or negative acknowledge.
- wait_for_message ( signal net : in network_t;
constant receiver : in actor_t;
variable status : out com_status_t;
constant timeout : in time := max_timeout) return ()
Description
Low-level subprograms primarily used for handling timeout wihout error
Wait for message sent to receiver. status = ok if message is
received before the timeout, status = timeout otherwise.
- wait_for_message ( signal net : in network_t;
constant receivers : in actor_vec_t;
variable status : out com_status_t;
constant timeout : in time := max_timeout) return ()
Description
Wait for message sent to any of the listed receivers. status = ok
if message is received before the timeout, status = timeout otherwise.
- wait_for_reply ( signal net : inout network_t;
variable request_msg : inout msg_t;
variable status : out com_status_t;
constant timeout : in time := max_timeout) return ()
Description
Wait for reply to request_msg. status = ok
if message is received before the timeout, status = timeout otherwise.
- get_message (signal net : inout network_t;
receiver : actor_t;
variable msg : inout msg_t) return ()
Description
Get oldest message from receiver inbox. Runtime error if inbox is empty.
- get_reply ( signal net : inout network_t;
variable request_msg : inout msg_t;
variable reply_msg : inout msg_t) return ()
Description
Get reply message to request_msg. Runtime error if reply message isn't available.
- subscribe ( subscriber : actor_t;
publisher : actor_t;
traffic_type : subscription_traffic_type_t := published) return ()
Description
Subscriptions
Make subscriber subscribe on the specified publisher and traffic type. For
a description of the traffic types see com_types.vhd
- unsubscribe ( subscriber : actor_t;
publisher : actor_t;
traffic_type : subscription_traffic_type_t := published) return ()
Description
Remove subscription on the given publisher and traffic type.
- deallocate (variable mailbox_state : inout mailbox_state_t) return ()
Description
Deallocate memory allocated to a mailbox state variable
- deallocate (variable actor_state : inout actor_state_t) return ()
Description
Deallocate memory allocated to a actor state variable
- deallocate (variable messenger_state : inout messenger_state_t) return ()
Description
Deallocate memory allocated to a messenger state variable
- allow_deprecated () return ()
Description
Misc
Allow deprecated APIs
- allow_timeout () return ()
Description
Allow timeout in deprecated functionality. If not allowed timeouts will
cause a runtime error.