#include <rc_switch_connector.h>
A switch connector is a utility object that simplifies the binding of switches. The static side as well as the dynamic side can be bound by using the methods bind_static() or bind_dynamic(), respectively. A switch connector can be bound to port maps and rc_reconfigurable instances that are compatible.
Example:
// create the switch connector rc_switch_connector<myPortMap> connector( "connector", clk_portal, reset_portal, A_portal, B_portal, C_portal); // bind static ports and channels connector.bind_static( myPortMap_static(clk_port, reset_signal, A_fifo, B_fifo, C_fifo)); // bind reconfigurable modules connector.bind_dynamic(m1); connector.bind_dynamic(m2);
Definition at line 201 of file rc_switch_connector.h.
Public Types | |
enum | { portmap_size = DynPortMap::portmap_size } |
portmap_size More... | |
typedef DynPortMap | portmap_type |
The type of the port map. | |
Public Member Functions | |
rc_switch_connector (const char *name, rc_switch &s0, _RC_Tmp_arg(1), _RC_Tmp_arg(2), _RC_Tmp_arg(3), _RC_Tmp_arg(4), _RC_Tmp_arg(5), _RC_Tmp_arg(6), _RC_Tmp_arg(7), _RC_Tmp_arg(8), _RC_Tmp_arg(9), _RC_Tmp_arg(10), _RC_Tmp_arg(11), _RC_Tmp_arg(12), _RC_Tmp_arg(13), _RC_Tmp_arg(14), _RC_Tmp_arg(15), _RC_Tmp_arg(16), _RC_Tmp_arg(17), _RC_Tmp_arg(18), _RC_Tmp_arg(19), _RC_Tmp_arg(20), _RC_Tmp_arg(21), _RC_Tmp_arg(22), _RC_Tmp_arg(23), _RC_Tmp_arg(24), _RC_Tmp_arg(25), _RC_Tmp_arg(26), _RC_Tmp_arg(27), _RC_Tmp_arg(28), _RC_Tmp_arg(29), _RC_Tmp_arg(30), _RC_Tmp_arg(31), _RC_Tmp_arg(32), _RC_Tmp_arg(33), _RC_Tmp_arg(34), _RC_Tmp_arg(35), _RC_Tmp_arg(36), _RC_Tmp_arg(37), _RC_Tmp_arg(38), _RC_Tmp_arg(39), _RC_Tmp_arg(40), _RC_Tmp_arg(41), _RC_Tmp_arg(42), _RC_Tmp_arg(43), _RC_Tmp_arg(44), _RC_Tmp_arg(45), _RC_Tmp_arg(46), _RC_Tmp_arg(47), _RC_Tmp_arg(48), _RC_Tmp_arg(49), _RC_Tmp_arg(50), _RC_Tmp_arg(51), _RC_Tmp_arg(52), _RC_Tmp_arg(53), _RC_Tmp_arg(54), _RC_Tmp_arg(55), _RC_Tmp_arg(56), _RC_Tmp_arg(57), _RC_Tmp_arg(58), _RC_Tmp_arg(59), _RC_Tmp_arg(60), _RC_Tmp_arg(61), _RC_Tmp_arg(62)) | |
Constructor. | |
virtual bool | is_compatible (const rc_portmap_base &portmap) const |
check given port map for compatibility | |
Private Types | |
typedef rc_switch_connector < DynPortMap > | this_type |
typedef rc_switch_connector_base | base_type |
typedef internals::template arg< rc_switch, true > | switch_arg |
A valid switch argument. | |
typedef internals::template arg< rc_switch, false > | undef_arg |
An undefined argument. | |
Private Member Functions | |
RC_STATIC_ASSERT_T (portmap_type_check,(boost::is_base_of< rc_portmap_base, DynPortMap >::value==true)) | |
check for DynPortMap is a valid port map type. | |
RC_STATIC_ASSERT_T (portmap_size_check, DynPortMap::portmap_size > 0) | |
check for DynPortMap is of a size greater than zero. | |
void | _rc_set (int i_, const switch_arg &arg_) |
Store the switch from a valid argument. | |
void | _rc_set (int i_, const undef_arg &arg_) const |
Undefined arguments are ignored. | |
Private Attributes | |
rc_switch * | p_switch_arr [portmap_size] |
the array containing the pointers to the switches |
typedef rc_switch_connector<DynPortMap> this_type [private] |
typedef rc_switch_connector_base base_type [private] |
Definition at line 218 of file rc_switch_connector.h.
typedef internals::template arg<rc_switch, true> switch_arg [private] |
typedef DynPortMap portmap_type |
anonymous enum |
portmap_size
Definition at line 243 of file rc_switch_connector.h.
rc_switch_connector | ( | const char * | name, | |
rc_switch & | s0, | |||
_RC_Tmp_arg(1) | , | |||
_RC_Tmp_arg(2) | , | |||
_RC_Tmp_arg(3) | , | |||
_RC_Tmp_arg(4) | , | |||
_RC_Tmp_arg(5) | , | |||
_RC_Tmp_arg(6) | , | |||
_RC_Tmp_arg(7) | , | |||
_RC_Tmp_arg(8) | , | |||
_RC_Tmp_arg(9) | , | |||
_RC_Tmp_arg(10) | , | |||
_RC_Tmp_arg(11) | , | |||
_RC_Tmp_arg(12) | , | |||
_RC_Tmp_arg(13) | , | |||
_RC_Tmp_arg(14) | , | |||
_RC_Tmp_arg(15) | , | |||
_RC_Tmp_arg(16) | , | |||
_RC_Tmp_arg(17) | , | |||
_RC_Tmp_arg(18) | , | |||
_RC_Tmp_arg(19) | , | |||
_RC_Tmp_arg(20) | , | |||
_RC_Tmp_arg(21) | , | |||
_RC_Tmp_arg(22) | , | |||
_RC_Tmp_arg(23) | , | |||
_RC_Tmp_arg(24) | , | |||
_RC_Tmp_arg(25) | , | |||
_RC_Tmp_arg(26) | , | |||
_RC_Tmp_arg(27) | , | |||
_RC_Tmp_arg(28) | , | |||
_RC_Tmp_arg(29) | , | |||
_RC_Tmp_arg(30) | , | |||
_RC_Tmp_arg(31) | , | |||
_RC_Tmp_arg(32) | , | |||
_RC_Tmp_arg(33) | , | |||
_RC_Tmp_arg(34) | , | |||
_RC_Tmp_arg(35) | , | |||
_RC_Tmp_arg(36) | , | |||
_RC_Tmp_arg(37) | , | |||
_RC_Tmp_arg(38) | , | |||
_RC_Tmp_arg(39) | , | |||
_RC_Tmp_arg(40) | , | |||
_RC_Tmp_arg(41) | , | |||
_RC_Tmp_arg(42) | , | |||
_RC_Tmp_arg(43) | , | |||
_RC_Tmp_arg(44) | , | |||
_RC_Tmp_arg(45) | , | |||
_RC_Tmp_arg(46) | , | |||
_RC_Tmp_arg(47) | , | |||
_RC_Tmp_arg(48) | , | |||
_RC_Tmp_arg(49) | , | |||
_RC_Tmp_arg(50) | , | |||
_RC_Tmp_arg(51) | , | |||
_RC_Tmp_arg(52) | , | |||
_RC_Tmp_arg(53) | , | |||
_RC_Tmp_arg(54) | , | |||
_RC_Tmp_arg(55) | , | |||
_RC_Tmp_arg(56) | , | |||
_RC_Tmp_arg(57) | , | |||
_RC_Tmp_arg(58) | , | |||
_RC_Tmp_arg(59) | , | |||
_RC_Tmp_arg(60) | , | |||
_RC_Tmp_arg(61) | , | |||
_RC_Tmp_arg(62) | ||||
) | [inline] |
Constructor.
name | the name of the switch connector | |
s0 | the first switch | |
sX | (variable arguments) |
Definition at line 273 of file rc_switch_connector.h.
RC_STATIC_ASSERT_T | ( | portmap_type_check | , | |
(boost::is_base_of< rc_portmap_base, DynPortMap >::value==true) | ||||
) | [private] |
check for DynPortMap is a valid port map type.
RC_STATIC_ASSERT_T | ( | portmap_size_check | , | |
DynPortMap::portmap_size | , | |||
0 | ||||
) | [private] |
check for DynPortMap is of a size greater than zero.
virtual bool is_compatible | ( | const rc_portmap_base & | portmap | ) | const [inline, virtual] |
check given port map for compatibility
Implements rc_switch_connector_base.
Definition at line 334 of file rc_switch_connector.h.
void _rc_set | ( | int | i_, | |
const switch_arg & | arg_ | |||
) | [inline, private] |
Store the switch from a valid argument.
Definition at line 342 of file rc_switch_connector.h.
Referenced by rc_switch_connector::rc_switch_connector().
void _rc_set | ( | int | i_, | |
const undef_arg & | arg_ | |||
) | const [inline, private] |
Undefined arguments are ignored.
Definition at line 349 of file rc_switch_connector.h.
rc_switch* p_switch_arr[portmap_size] [private] |
the array containing the pointers to the switches
Reimplemented from rc_switch_connector_base.
Definition at line 358 of file rc_switch_connector.h.
Referenced by rc_switch_connector::_rc_set(), and rc_switch_connector::rc_switch_connector().