- MemObject *master_mem_object = dynamic_cast<MemObject *>(master_object);
- MemObject *slave_mem_object = dynamic_cast<MemObject *>(slave_object);
-
- if (!master_mem_object) {
- throw Exception(master_object->name(), csprintf(
- "Object isn't a mem object and so can have master port:"
- " %s[%d]", master_port_name, master_port_index));
- }
-
- if (!slave_mem_object) {
- throw Exception(slave_object->name(), csprintf(
- "Object isn't a mem object and so can have slave port:"
- " %s[%d]", slave_port_name, slave_port_index));
- }
-
- /* FIXME, check slave_port_index against connection_count