RecoSim  1.0
 All Classes Files Functions Variables Enumerations
Public Member Functions | List of all members
User_algorithm_interface< Ni, No > Class Template Referenceabstract
Inheritance diagram for User_algorithm_interface< Ni, No >:
Module< Ni, No >

Public Member Functions

virtual int * get_data_in_ptr (int socket)=0
 Get pointer to incoming data from socket 'socket'. More...
 
virtual int * get_data_in_ptr (string name)=0
 Get pointer to incoming data from socket 'name'. More...
 
virtual int * get_data_out_ptr (int socket)=0
 Get pointer to outgoing data from socket 'socket'. More...
 
virtual int * get_data_out_ptr (string name)=0
 Get pointer to outgoing data from socket 'name'. More...
 
virtual sc_dt::uint64 get_address_in (int socket) const =0
 Retrieve address from the incoming transaction on socket 'socket'. More...
 
virtual sc_dt::uint64 get_address_in (string name) const =0
 Retrieve address from the incoming transaction on socket 'name'. More...
 
virtual void set_address_out (int socket, sc_dt::uint64 value)=0
 Set address for outgoing transaction on socket 'socket'. More...
 
virtual void set_address_out (string name, sc_dt::uint64 value)=0
 Set address for outgoing transaction on socket 'socket'. More...
 
virtual int get_data_in_length (int socket) const =0
 Get input socket data length. More...
 
virtual int get_data_in_length (string name) const =0
 Get input socket data length. More...
 
virtual int get_data_out_length (int socket) const =0
 Get output socket data length. More...
 
virtual int get_data_out_length (string name) const =0
 Get output socket data length. More...
 
virtual sc_time get_WCET (void) const =0
 Get task worst case execution time (WCET), depending on current implementation. More...
 
virtual sc_time get_BCET (void) const =0
 Get task best case execution time (BCET), depending on current implementation. More...
 
virtual int get_input_socket_id (string name) const =0
 Get input socket id by the name of the connection. More...
 
virtual int get_output_socket_id (string name) const =0
 Get input socket id by the name of the connection. More...
 
virtual void end_of_algorithm (void)=0
 Function to call at the end of algorithm.
 
virtual void preemption_point (void)=0
 Function to call to emulate preemption.
 
virtual void b_execution_requested (void)=0
 Wait until an algorithm execution has been requested/granted by the manager.
 
virtual void compute (sc_time duration)=0
 Emulate an execution time of the algorithm. More...
 
virtual void set_algorithm_running (void)=0
 Function to call when the algorithm is running in order to have an accurate trace.
 
virtual void set_algorithm_idle (void)=0
 Function to call when the algorithm is idle in order to have an accurate trace.
 
virtual void set_algorithm_waiting (void)=0
 Function to call when the algorithm is waiting for data in order to have an accurate trace.
 
virtual const sc_event & update_user_algorithm (void) const =0
 Get the event launched when the user algorithm has to be modified (e.g. changing working implementation) More...
 
virtual void wait_for_update_user_algorithm (void)=0
 
virtual bool & kill_user_algorithm (void)=0
 Get a reference to a boolean indicating whether the user algorithm should be killed or not (for instance, to be erplaced with a new thread). More...
 
virtual void b_data_received (string name)=0
 Check if the data from channel 'name' have been received yet. Blocking function: if the data is not available at the time of the call, wait until it is received. More...
 
virtual void b_data_received (int id)=0
 Check if the data from channel 'id' have been received yet. Blocking function: if the data is not available at the time of the call, wait until it is received. More...
 
virtual void b_all_data_received (void)=0
 Check if the data from all channels have been received yet. Blocking function: if the data is not available at the time of the call, wait until it is received.
 
virtual bool nb_data_received (string name)=0
 Check if the data from channel 'name' have been received yet. Non-blocking function. More...
 
virtual bool nb_data_received (int id)=0
 Check if the data from channel 'id' have been received yet. Non-blocking function. More...
 
virtual bool nb_all_data_received (void)=0
 Check if the data from all channels have been received yet. Non-blocking function. More...
 
virtual void nb_send_data (string name)=0
 Send data towards channel 'name'. Non-blocking function. More...
 
virtual void nb_send_data (int id)=0
 Send data towards channel 'id'. Non-blocking function. More...
 
virtual void nb_send_all_data (void)=0
 Send data towards all channels. Non-blocking function.
 
virtual void b_send_data (string name)=0
 Send data towards channel 'name'. Blocking function: it will exit only when the following module has accepted the transaction. More...
 
virtual void b_send_data (int id)=0
 Send data towards channel 'id'. Blocking function: it will exit only when the following module has accepted the transaction. More...
 
virtual void b_send_all_data (void)=0
 Send data towards every channels. Blocking function: it will exit only when the following modules have accepted all transactions.
 
virtual void b_data_sent (int id)=0
 Check if data has been sent on a particular socket. Blocking function: if data send is not finished yet, wait until the end of the transaction. If no send request has ever been made, considers the socket ready. More...
 
virtual void b_data_sent (string name)=0
 Check if data has been sent on a particular socket. Blocking function: if data send is not finished yet, wait until the end of the transaction. If no send request has ever been made, considers the socket ready. More...
 
virtual void b_all_data_sent (void)=0
 Check if data has been sent on every socket. Blocking function: if data send is not finished yet, wait until the end of the transaction. If no send request has ever been made, considers the socket ready.
 
virtual bool nb_data_sent (int id)=0
 Check if data has been sent on a particular socket. Non-blocking function. If no send request has ever been made, considers the socket ready. More...
 
virtual bool nb_data_sent (string name)=0
 Check if data has been sent on a particular socket. Non-blocking function. If no send request has ever been made, considers the socket ready. More...
 
virtual bool nb_all_data_sent (void)=0
 Check if data has been sent on every socket. Non-blocking function.
 
virtual void start_new_transaction_sequence (int id)=0
 Indicate that a new transaction sequence is beginning (i.e. sending new data) for a particular socket. More...
 
virtual void start_new_transaction_sequence (string name)=0
 Indicate that a new transaction sequence is beginning (i.e. sending new data) for a particular socket. More...
 
virtual void start_new_transaction_sequence (void)=0
 Indicate that a new transaction sequence is beginning (i.e. sending new data) for every socket. More...
 
virtual bool is_channel_transient (string name)=0
 Check if channel 'name' is transient or not. More...
 
virtual bool is_channel_transient (int id)=0
 Check if channel 'id' is transient or not. More...
 
virtual string get_algorithm_execution_mode (void)=0
 Get current algorithm execution mode. More...
 
virtual bool is_algorithm_execution_mode (string mode)=0
 Check for a particular execution mode. More...
 
virtual void release_input_socket (int socketID)=0
 Release a particular input socket so that preceding module might send some more data. More...
 
virtual void release_input_socket (string connectionName)=0
 Release a particular input socket so that preceding module might send some more data. More...
 
virtual void release_all_input_sockets (void)=0
 Release all input socket so that preceding modules might send some more data.
 
virtual const char * get_name (void) const =0
 Get task name. More...
 
virtual int get_nb_preemption_points (void)=0
 Get the number of preemption points that should be inserted in the algorithm. More...
 
virtual void wait_until_next_period (void)=0
 Wait until the next period is started. For non-periodic tasks, return immediately.
 
virtual ofstream & get_logfile (void)=0
 Get logfile. More...
 

Member Function Documentation

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::b_data_received ( string  name)
pure virtual

Check if the data from channel 'name' have been received yet. Blocking function: if the data is not available at the time of the call, wait until it is received.

Parameters
nameName of the channel to check

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::b_data_received ( int  id)
pure virtual

Check if the data from channel 'id' have been received yet. Blocking function: if the data is not available at the time of the call, wait until it is received.

Parameters
idID of the channel to check

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::b_data_sent ( int  id)
pure virtual

Check if data has been sent on a particular socket. Blocking function: if data send is not finished yet, wait until the end of the transaction. If no send request has ever been made, considers the socket ready.

Parameters
idSocket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::b_data_sent ( string  name)
pure virtual

Check if data has been sent on a particular socket. Blocking function: if data send is not finished yet, wait until the end of the transaction. If no send request has ever been made, considers the socket ready.

Parameters
nameName of the connection bound to the socket

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::b_send_data ( string  name)
pure virtual

Send data towards channel 'name'. Blocking function: it will exit only when the following module has accepted the transaction.

Parameters
nameName of the channel where data will be sent

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::b_send_data ( int  id)
pure virtual

Send data towards channel 'id'. Blocking function: it will exit only when the following module has accepted the transaction.

Parameters
idID of the channel where data will be sent

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::compute ( sc_time  duration)
pure virtual

Emulate an execution time of the algorithm.

Parameters
durationExecution time

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual sc_dt::uint64 User_algorithm_interface< Ni, No >::get_address_in ( int  socket) const
pure virtual

Retrieve address from the incoming transaction on socket 'socket'.

Parameters
socketSocket ID
Returns
The address

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual sc_dt::uint64 User_algorithm_interface< Ni, No >::get_address_in ( string  name) const
pure virtual

Retrieve address from the incoming transaction on socket 'name'.

Parameters
nameName of the socket connection
Returns
The address

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual string User_algorithm_interface< Ni, No >::get_algorithm_execution_mode ( void  )
pure virtual

Get current algorithm execution mode.

Returns
String representation of the execution mode

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual sc_time User_algorithm_interface< Ni, No >::get_BCET ( void  ) const
pure virtual

Get task best case execution time (BCET), depending on current implementation.

Returns
BCET

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_data_in_length ( int  socket) const
pure virtual

Get input socket data length.

Parameters
socketSocket ID
Returns
data length

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_data_in_length ( string  name) const
pure virtual

Get input socket data length.

Parameters
nameName of the socket connection
Returns
data length

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int* User_algorithm_interface< Ni, No >::get_data_in_ptr ( int  socket)
pure virtual

Get pointer to incoming data from socket 'socket'.

Parameters
socketSocket ID
Returns
Pointer to an array of data

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int* User_algorithm_interface< Ni, No >::get_data_in_ptr ( string  name)
pure virtual

Get pointer to incoming data from socket 'name'.

Parameters
nameName of the socket connection
Returns
Pointer to an array of data

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_data_out_length ( int  socket) const
pure virtual

Get output socket data length.

Parameters
socketSocket ID
Returns
data length

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_data_out_length ( string  name) const
pure virtual

Get output socket data length.

Parameters
nameName of the socket connection
Returns
data length

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int* User_algorithm_interface< Ni, No >::get_data_out_ptr ( int  socket)
pure virtual

Get pointer to outgoing data from socket 'socket'.

Parameters
socketSocket ID
Returns
Pointer to an array of data

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int* User_algorithm_interface< Ni, No >::get_data_out_ptr ( string  name)
pure virtual

Get pointer to outgoing data from socket 'name'.

Parameters
nameName of the socket connection
Returns
Pointer to an array of data

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_input_socket_id ( string  name) const
pure virtual

Get input socket id by the name of the connection.

Parameters
nameConnection name
Returns
Socket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual ofstream& User_algorithm_interface< Ni, No >::get_logfile ( void  )
pure virtual

Get logfile.

Returns
Log file

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual const char* User_algorithm_interface< Ni, No >::get_name ( void  ) const
pure virtual

Get task name.

Returns
char* representation of task name

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_nb_preemption_points ( void  )
pure virtual

Get the number of preemption points that should be inserted in the algorithm.

Returns
number of preemption points

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual int User_algorithm_interface< Ni, No >::get_output_socket_id ( string  name) const
pure virtual

Get input socket id by the name of the connection.

Parameters
nameConnection name
Returns
Socket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual sc_time User_algorithm_interface< Ni, No >::get_WCET ( void  ) const
pure virtual

Get task worst case execution time (WCET), depending on current implementation.

Returns
WCET

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::is_algorithm_execution_mode ( string  mode)
pure virtual

Check for a particular execution mode.

Parameters
modeExecution mode to look after
Returns
true if current execution mode is 'mode', false otherwise

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::is_channel_transient ( string  name)
pure virtual

Check if channel 'name' is transient or not.

Parameters
nameName of the channel to check for transience
Returns
true if channel is transient

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::is_channel_transient ( int  id)
pure virtual

Check if channel 'id' is transient or not.

Parameters
idID of the channel to check for transience
Returns
true if channel is transient

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool& User_algorithm_interface< Ni, No >::kill_user_algorithm ( void  )
pure virtual

Get a reference to a boolean indicating whether the user algorithm should be killed or not (for instance, to be erplaced with a new thread).

Returns
reference to the boolean

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::nb_all_data_received ( void  )
pure virtual

Check if the data from all channels have been received yet. Non-blocking function.

Returns
true if data is available

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::nb_data_received ( string  name)
pure virtual

Check if the data from channel 'name' have been received yet. Non-blocking function.

Parameters
nameName of the channel to check
Returns
true if data is available

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::nb_data_received ( int  id)
pure virtual

Check if the data from channel 'id' have been received yet. Non-blocking function.

Parameters
idID of the channel to check
Returns
true if data is available

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::nb_data_sent ( int  id)
pure virtual

Check if data has been sent on a particular socket. Non-blocking function. If no send request has ever been made, considers the socket ready.

Parameters
idSocket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual bool User_algorithm_interface< Ni, No >::nb_data_sent ( string  name)
pure virtual

Check if data has been sent on a particular socket. Non-blocking function. If no send request has ever been made, considers the socket ready.

Parameters
nameName of the connection bound to the socket

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::nb_send_data ( string  name)
pure virtual

Send data towards channel 'name'. Non-blocking function.

Parameters
nameName of the channel where data will be sent

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::nb_send_data ( int  id)
pure virtual

Send data towards channel 'id'. Non-blocking function.

Parameters
idID of the channel where data will be sent

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::release_input_socket ( int  socketID)
pure virtual

Release a particular input socket so that preceding module might send some more data.

Parameters
socketIDSocket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::release_input_socket ( string  connectionName)
pure virtual

Release a particular input socket so that preceding module might send some more data.

Parameters
connectionNameName of the connection bound to the socket

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::set_address_out ( int  socket,
sc_dt::uint64  value 
)
pure virtual

Set address for outgoing transaction on socket 'socket'.

Parameters
socketSocket ID
valueNew value
Returns
The address

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::set_address_out ( string  name,
sc_dt::uint64  value 
)
pure virtual

Set address for outgoing transaction on socket 'socket'.

Parameters
nameName of the socket connection
valueNew value
Returns
The address

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::start_new_transaction_sequence ( int  id)
pure virtual

Indicate that a new transaction sequence is beginning (i.e. sending new data) for a particular socket.

Parameters
idSocket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::start_new_transaction_sequence ( string  name)
pure virtual

Indicate that a new transaction sequence is beginning (i.e. sending new data) for a particular socket.

Parameters
nameName of the connection bound to the socket.

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual void User_algorithm_interface< Ni, No >::start_new_transaction_sequence ( void  )
pure virtual

Indicate that a new transaction sequence is beginning (i.e. sending new data) for every socket.

Parameters
idSocket ID

Implemented in Module< Ni, No >.

template<int Ni, int No>
virtual const sc_event& User_algorithm_interface< Ni, No >::update_user_algorithm ( void  ) const
pure virtual

Get the event launched when the user algorithm has to be modified (e.g. changing working implementation)

Returns
constant reference to the SystemC event

Implemented in Module< Ni, No >.


The documentation for this class was generated from the following file: